https://sourceware.org/bugzilla/show_bug.cgi?id=28043
Bug ID: 28043
Summary: Add LSDA decoding to eu-readelf
Product: elfutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: tools
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>
and maybe:
eu-readelf --exceptions
which effectively is the same as eu-readelf --exceptions-thrown
--exceptions-caught
So far the best descriptions of how to decode those sections that I have been
able to find are:
https://www.airs.com/blog/archives/464 and
http://www.hexblog.com/wp-content/uploads/2012/06/Recon-2012-Skochinsky-Compiler-Internals.pdf
(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.