madTraceProcess from the command-line

delphi package - automated exception handling
Post Reply
StephaneGrobety
Posts: 19
Joined: Tue Jul 17, 2018 9:21 am

madTraceProcess from the command-line

Post by StephaneGrobety »

Hello,

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.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: madTraceProcess from the command-line

Post by madshi »

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.
Post Reply