Valgrinding large win32 app worked!
dank at kegel.com
Tue Jan 15 20:18:14 CST 2008
builds a copy of valgrind-3.3.0 with
John Reiser's forward port of the Wine support patch.
With that, I can run Picasa for Windows under Wine under Valgrind.
It takes 40 seconds to start up on my 1.3GHz Athlon 64,
which is right in line with Valgrind's legendary ~10x overhead.
It seemed to find lots of little problems, but since there
were lots of numeric addresses without symbolic info in the
valgrind log, it wasn't directly useful to the Picasa developers.
The next step, I suppose, is to find a way to make the valgrind
log contain symbolic identifiers for the functions in the Windows app.
I looked at that for a few minutes; here are some notes that
might provide a starting point.
http://www.debuginfo.com/articles/gendebuginfo.html is the best
overview I've seen so far on how to tell Visual C++ to generate
debugging info; for most apps, the preferred debug info format will be .pdb.
http://www.debuginfo.com/articles/dbghelptypeinfo.html has an example
win32 app that will dump all public symbols from a win32 app.
It runs fine on Windows XP, and can dump symbols for Picasa
(generating a 9MB text file). (I happen to have the .pdb file for Picasa
handy since I are an honorary Picasa developer.)
Sadly, that symbol dumper crashes on Wine, see
Also, the unresolved error addresses in the valgrind trace were mostly
in the 0x400000 - 0x420000 range, whereas the symbols dumped
by that dumper app were all in the range 0x1000000 - 0x1080000...
maybe the base load address is different between the two OS's.
I haven't tried valgrinding a toy app yet, but that's probably the easiest
way to figure out how to match the symbols up.
More information about the wine-devel