[Bug tools/28043] New: Add LSDA decoding to eu-readelf
woodard at redhat dot com
Thu Jul 1 16:30:44 GMT 2021
Bug ID: 28043
Summary: Add LSDA decoding to eu-readelf
Assignee: unassigned at sourceware dot org
Reporter: woodard at redhat dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
One thing that is an important aspect of compatibility between libraries and
their consumers (apps and other libraries) are the exceptions thrown and
caught. Ideally you want to make sure that all exceptions that could be thrown
are properly caught
Unfortunately it is currently EXTREMELY difficult to look at an ELF file see
which exceptions are thrown or caught. That information is readily available in
the ELF file it just isn't being decoded. This forces a user to manually
interpret the ELF file and decode the LSDA by hand to list the types. This is
very likely above the level of most developers. It would be nice if eu-readelf
were able to decode the LSDA and print it in a human understandable form.
I propose a feature that does this:
eu-readelf --exceptions-thrown <elf_file>
eu-readelf --exceptions-caught <elf_file>
which effectively is the same as eu-readelf --exceptions-thrown
So far the best descriptions of how to decode those sections that I have been
able to find are:
(start at about page 35)
The code that processes that section in GCC can be found in
gcc/libgcc/unwind-c.c that could be a good reference.
Once you have the LSDA decoding capabilities it may also be worthwhile to print
out the decoded fields when doing --debug-dump=frame and pretty print the
structures pointed to by the LSDA pointers.
There is a possibility that at least at times llvm generates a different
version of the LSDA and so for a fully functional tool you may also want to
decode any flavors of LSDA that llvm may generate as well.
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Elfutils-devel