Page 1 of 1

Tracer: a tool to debug binaries -i.e DLL's (ver. 0.0.3.0)

Posted: Fri Oct 02, 2009 11:22 pm
by somic
Dear PBColleagues, here we are.

After hours (if not minutes) spent negletting the TV and, even more, my wife (who in any case was watching the TV) the revision 0.0.3.0 of the Tracer code has been completed.
In addition to some features, it has been tested a littel more, so some bugs have been discovered and fixed.
I took the opportunity to test some code that could be usefull for MathPad, a program derived from the Plugin developed for Notepad++, that now pretends to do almost the same for every text editor (we will see...)

As the previous versions, both binary and source code are free for any use (at your wish and risk)

NEW File (ver. 0030) can be found here:
http://www.semelinanno.com/downloads/tr ... _v0030.zip

Tracer page here:
http://www.semelinanno.com/downloads/tr ... _Page.html

DebugView by Sysinternals can be found here:
http://download.sysinternals.com/Files/DebugView.zip

Feel free to make any questions, comments or suggestions.

Uh, by the way, I've added some interesting links (ASM, Interl, performance, optimization) on my web site.
I can't say I understand everything but I got some interesting hints from those readings.
http://www.semelinanno.com/FavoriteLinks.html

Regards,
Somic

Re: Tracer: a tool to debug binaries -i.e DLL's (ver. 0.0.3.0)

Posted: Sat Oct 03, 2009 3:12 am
by Mistrel
Can your debugging tool unwind and backtrace the call stack?

Re: Tracer: a tool to debug binaries -i.e DLL's (ver. 0.0.3.0)

Posted: Sat Oct 03, 2009 1:06 pm
by somic
I'm not sure to completely understand what you mean.

The tool basically automatically add a line of code to every source code line and save the result in another file(s), called "_$_FileName", rebuilding if necessary all the dependencies (IncludeFile etc).
You can then review the new (Traced) code and if ok, build the dll and run (load) like the original one.
This additional code is execute immediately before (or after, when necessary) the original code and send to a "receiving app" a string with some info (es. the procedure name, the code line, the source text -optional, for readeability).

Reading the output you can see the sequence of lines executed during the run, then you can rebuild the sequence of calls.
In the future is will show also the values of the variables and simulate the execution in the IDE.

Is this what you mean?

Rgds,
Somic

Re: Tracer: a tool to debug binaries -i.e DLL's (ver. 0.0.3.0)

Posted: Sat Oct 03, 2009 9:47 pm
by Mistrel
What I mean is, when a runtime error is encountered can you walk backwards on the call stack to see what lines were executed prior?

Re: Tracer: a tool to debug binaries -i.e DLL's (ver. 0.0.3.0)

Posted: Sun Oct 04, 2009 7:42 pm
by somic
I would say yes, because the receiving application (es. DebugView) is external and receives the output and will show the lines of code executed, including the last one before the runtime error.
But if the error is caused by the exe hosting the dll, then the result (last line of code shown) may be different time to time and then not very meaningful of the cause.

Rgds,
Somic

Re: Tracer: a tool to debug binaries -i.e DLL's (ver. 0.0.3.0)

Posted: Mon Nov 02, 2009 8:52 pm
by somic
@Mistrel,

I'm courious to know if you used the program and if it was usefull to your purpose :?:
(or may be you only want to be polite with my bugs ... :?: :!: :?: )

feel free to let me know.

thanks and regards,
Somic

Re: Tracer: a tool to debug binaries -i.e DLL's (ver. 0.0.3.0)

Posted: Tue Nov 03, 2009 1:15 am
by Mistrel
I have not yet had an opportunity to test it. Sorry.

Re: Tracer: a tool to debug binaries -i.e DLL's (ver. 0.0.3.0)

Posted: Tue Nov 03, 2009 6:16 am
by somic
No problem at all.

Rgds,
Somic