Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Program Debugging

Posted on 1998-11-26
5
Medium Priority
?
234 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 400 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

Industry Leaders: 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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

618 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