Re: [Mingw-users] help for a small debug tool on Windows

13 views
Skip to first unread message

Vincent Torri

unread,
Mar 31, 2012, 4:49:11 PM3/31/12
to mingw...@lists.sourceforge.net, mingw-w6...@lists.sourceforge.net
On Sat, Mar 31, 2012 at 6:58 PM, Vincent Torri <vincen...@gmail.com> wrote:
> Hey
>
> I'm writing a  small tool to do mem leak check, and later GDI leak
> checks. That tool, named 'examine', is intended to be used like
> valgrind, that is, no linkage (unlike mpatrol, for example). The usage
> is : examine my_test_app.exe

I have forgotten that there is a test app. If you install in /usr/local:

examine /usr/local/bin/examine_test.exe

(you must pass the absolute path for the program you check)

Vincent Torri

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MinGW-users mailing list
MinGW...@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-use...@lists.sourceforge.net?subject=unsubscribe

asmwarrior

unread,
Apr 1, 2012, 9:43:28 PM4/1/12
to MinGW Users List, Vincent Torri
On 2012-4-1 0:58, Vincent Torri wrote:
> Hey
>
> I'm writing a small tool to do mem leak check, and later GDI leak
> checks. That tool, named 'examine', is intended to be used like
> valgrind, that is, no linkage (unlike mpatrol, for example). The usage
> is : examine my_test_app.exe
>
> I've beginning to write it for several reasons. First : improving
> mpatrol, but the lead dev, Graeme Roy is busy for several months.
> Secondly, by curiosity (how to do such things). And finally, to use it
> in one of the projects i'm involved in (the Enlightenment project),
> until mpatrol supports that feature (no linkage of the app against
> mpatrol library).
>
> The desing is : DLL injection, API hooking and stack trace (using libbfd).
>
> The overloading of the memory functions seems correct (though there is
> a small little bug), but the stack tracing seems broken. While it
> works with my test examples, when I use it with 'examine', the call
> stack seems to "be" only in the DLL. More precisely, instead of having
> something like:
>
> my_app.c : line 18
> my_app.c : line 56
> crtexe.c : line ???
> crtexe.c : line ???
>
> I only get :
>
> crtexe.c : line ???
> crtexe.c : line ???
>
> I've searched a lot but i can't find anything.
>
> The code can be downloaded in our svn repo :
>
> svn co http://svn.enlightenment.org/svn/e/trunk/DEBUG/examine
>
> or can be viewed here :
>
> http://trac.enlightenment.org/e/browser/trunk/DEBUG/examine/src/lib
> http://trac.enlightenment.org/e/browser/trunk/DEBUG/examine/src/bin
>
> Any help or ideas are greatly appreciated
>
> thank you
>
> regards
>
> Vincent Torri
>

Good job!

We have recently discuss some memory detect tool Dr. Memory. (LGPL licensed)
http://forums.codeblocks.org/index.php/topic,15981.msg108919.html#msg108919

Hope you take's its source as a reference.

asmwarrior

Reply all
Reply to author
Forward
0 new messages