From: Rémi B. <rb...@co...> - 2020-11-30 09:01:27
|
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(-) -- 2.29.2 |