Solved

Program Debugging

Posted on 1998-11-26
5
225 Views
Last Modified: 2010-08-05
Where I find docs or info about making a program that can load another programmer into the debugger, allowing me to intercept any API calls made by the debugged program???  I don't want a program that does this for me but info on making the program myself. thanks in advance.
0
Comment
Question by:Bashfull
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Expert Comment

by:guga
ID: 1178697
It can be very useful (source code) www.sysinternals.com
0
 

Author Comment

by:Bashfull
ID: 1178698
nothing there is specifically what i need....
0
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 1178699
Well, debugging a program is not that difficult (see documentation on 'DebugActiveProcess()'), but intercepting the API calls definitively is - but (assuming the target platform is Win32) that's the way to go:
- create a DLL that is mapped into the address space of the program to debug (see injlib.exe 'ftp://ftp.microsoft.com/softlib/mslfiles/INJLIB.EXE') and MS Systems Jounal May '94 'Load Your 32-bit DLL into Another Process's Address Space Using INJLIB' at http://www.microsoft.com/msj')
- patch the function tables so that every API call is redirected to one of your functions before you pass the through to the original function.

If that is what you need, i could even give you some code that illustrates this (well, at least patching the function tables is a task that _needs_ examples, as i would have to take another look at the sources as well)...

0
 

Author Comment

by:Bashfull
ID: 1178700
If you can send the code or any help on patching the address tables please do so to darkgod@isdn.net.il.  thanks

p.s. my main objective is intercepting socket calls...
0
 
LVL 86

Expert Comment

by:jkr
ID: 1178701
Did you receive the source code?
I got the following:
   ----- The following addresses had transient non-fatal errors -----
<darkgod@isdn.net.il>

   ----- Transcript of session follows -----
451 timeout writing message to p1.isdn.net.il.
451 <darkgod@isdn.net.il>... I/O error: Error 0
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ question 3 75
Unable to start eclipse ? 17 163
Why  my code (program) build with old compiler? 11 115
Adding items to a C# list incrementally 5 64
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question