From: Rémi B. <rb...@co...> - 2021-03-05 09:18:29
|
On 11/30/20 10:00 AM, Rémi Bernon wrote: > Hi! > > I've been trying to fix Valgrind support for Wine that got pretty broken > lately, as the recent refactoring there makes most code now be compiled > as PE .dll files. > > There's already some support in Valgrind to notify it and load debug > information from PDB files, but in general when compiling Wine using GCC > the debug information is instead generated as DWARF info, so that > doesn't work. > > I figured that it was just a matter of adding support for parsing PE > files in Valgrind, and here it is. I've hooked that to the existing PDB > notification, in the case no PDB file could be found, and it now works > pretty nicely for all Wine code, whether it's within ELF .so files, or > PE .dll, including backtraces with a hybrid mix of both. > > I'm not sure how contributions to Valgrind are supposed to go, so I'm > sending these as patches here, but feel free to redirect me. > > Cheers, > > Rémi Bernon (3): > Update Windows PE / PDB struct definitions using fixed-size types. > Increase the number of supported CFI registers. > Implement DWARF in PE parsing support, as PDB fallback. > > coregrind/m_debuginfo/debuginfo.c | 63 +- > coregrind/m_debuginfo/priv_readelf.h | 23 + > coregrind/m_debuginfo/priv_readpdb.h | 8 + > coregrind/m_debuginfo/readdwarf.c | 2 +- > coregrind/m_debuginfo/readelf.c | 42 +- > coregrind/m_debuginfo/readpdb.c | 1598 ++++++++++++++++++++++---- > 6 files changed, 1506 insertions(+), 230 deletions(-) > Hello! I sent these a while ago, but I didn't really get any feedback about it. There's a related bug entry, on which there's been a bit of discussion too, but I was wondering if that what the best way to contribute some code to Valgrind? Right now, because of changes in how Wine builds its modules, the code that is supposed to support this use-case in Valgrind is broken, and pretty much useless, I'd love to help making it work again. Cheers, -- Rémi Bernon <rb...@co...> |