Hi,
I'm starting to look at https://bugs.kde.org/show_bug.cgi?id=217615
(new/new[]/malloc mismatch detection when valgrinding win32 apps with wine).

Rather than replace the whole heap, I'd like to stick
with the wine system heap (which already is pretty
valgrind-friendly, and getting more so), and just override msvcrt's
implementations of new, new[], malloc, etc. with thin
shims that allocate a slightly larger block using
the win32 system heap (the one in kernel32,
which is below the one in msvcrt) and saves the
type of allocation in the extra space.

I have successfully intercepted msvcrt's malloc
in valgrind, but then I don't know how to look up
and call target functions inside the interceptor.
The functions I want to call ought to be easy to
look up from the loaded debug info, but I'm not
familiar enough with valgrind's symbol table stuff
to be able to do that straight off.

If anyone can supply a hint, that'd be welcome.  In
the meantime I'll try to lurch along by linking replacement
functions into the target app instead of doing a shiny
interceptor in valgrind.
- Dan

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to