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

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
somic
User
User
Posts: 66
Joined: Sun Jun 29, 2008 9:11 am
Location: Italy
Contact:

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

Post 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
----------------------------------------------------------------------------
Semel in anno licet insanire (Seneca)
email: somic@libero.it, website: http://www.semelinanno.com
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

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

Post by Mistrel »

Can your debugging tool unwind and backtrace the call stack?
somic
User
User
Posts: 66
Joined: Sun Jun 29, 2008 9:11 am
Location: Italy
Contact:

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

Post 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
----------------------------------------------------------------------------
Semel in anno licet insanire (Seneca)
email: somic@libero.it, website: http://www.semelinanno.com
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

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

Post 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?
somic
User
User
Posts: 66
Joined: Sun Jun 29, 2008 9:11 am
Location: Italy
Contact:

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

Post 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
----------------------------------------------------------------------------
Semel in anno licet insanire (Seneca)
email: somic@libero.it, website: http://www.semelinanno.com
somic
User
User
Posts: 66
Joined: Sun Jun 29, 2008 9:11 am
Location: Italy
Contact:

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

Post 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
----------------------------------------------------------------------------
Semel in anno licet insanire (Seneca)
email: somic@libero.it, website: http://www.semelinanno.com
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

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

Post by Mistrel »

I have not yet had an opportunity to test it. Sorry.
somic
User
User
Posts: 66
Joined: Sun Jun 29, 2008 9:11 am
Location: Italy
Contact:

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

Post by somic »

No problem at all.

Rgds,
Somic
----------------------------------------------------------------------------
Semel in anno licet insanire (Seneca)
email: somic@libero.it, website: http://www.semelinanno.com
Post Reply