madTraceProcess from the command-line

delphi package - automated exception handling

madTraceProcess from the command-line

Postby StephaneGrobety » Tue Jul 31, 2018 8:41 am


In order to attempt to find a particularly tricky error (race condition between long-running threads), I would like to be able to get a trace of the program at regular interval.

I have checked the source code of madTraceProcess and I might be able to modify it to accept new command-line arguments for performing in an automated fashion but, unfortunately I'm missing the necessary "madRemote" unit to recompile it (this unit also seems to contain some of the important structures used by madTraceProcess).

What I'm attempting to do is add a command-line parameter providing the name of the executable to trace and the name of a trace file to save the report to. The program should then extract the trace, save it and exit.
Posts: 19
Joined: Tue Jul 17, 2018 9:21 am

Re: madTraceProcess from the command-line

Postby madshi » Tue Jul 31, 2018 4:53 pm

madRemote can do some things that the OS blocks. But in most cases you can simply replace the madRemote APIs with pure win32 APIs. E.g. instead of madRemote's CreateRemoteThreadEx() you can simply use CreateRemoteThread(). It should be possible to recompile madTraceProcess with most of its functionality, without madRemote.
Site Admin
Posts: 10207
Joined: Sun Mar 21, 2004 5:25 pm

Return to madExcept

Who is online

Users browsing this forum: No registered users and 56 guests