How to properly implement dwz support

15 views
Skip to first unread message

Lars Volker

unread,
Sep 26, 2016, 2:03:15 PM9/26/16
to google-br...@googlegroups.com
Hi,

I opened Issue 717 regarding the lack of support for dwz compressed object files. In short, the dwz compressor used in recent Fedora and RHEL versions introduces new DWARF macros, which make breakpad crash with SIGSEGV.

As a workaround I created a change to ignore these macros, which prevents the crashes, but will leave these compressed symbols unresolved: https://chromium-review.googlesource.com/#/c/388768/

However I assume one would want to support dumping those symbols with breakpad. Can someone advise me on how to properly fix this? In particular, should we add an optional argument to the dump_syms binary with the folder containing dwz's output, which might add more complexity to the usage. Or should we try to read that from the debug object file we are processing, which might be more fragile? In the example I added to the bug report you could dump the path of the common object file by running 'readelf -p .gnu_debugaltlink main'. I'd also much appreciate help with where and how to integrate this properly into the codebase.

Thanks for any feedback, Lars

Ted Mielczarek

unread,
Sep 26, 2016, 2:56:42 PM9/26/16
to google-br...@googlegroups.com
We've already got support for dumping symbols from separate debug info files, so this seems like it would be sensible to support in a similar way. If we can detect that an object file has a DWZ file just from reading .gnu_debugaltlink we should just make the symbol dumping code do that, and fix it to handle the new DWARF attributes. This code is where we read the various .debug sections for ELF binaries on Linux:

and it uses the code under src/common/dwarf to parse the DWARF, and src/common/dwarf_{cfi,cu,line}_to_module.cc to convert the DWARF into data it understands.

-Ted

Mike Frysinger

unread,
Sep 26, 2016, 3:27:48 PM9/26/16
to google-br...@googlegroups.com
is dwz that diff from dwp ?  latest breakpad has dwp support now.
-mike

--
You received this message because you are subscribed to the Google Groups "google-breakpad-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages