RFC: Generating per-function DWARF line number sections
nick clifton
nickc@redhat.com
Wed May 1 16:46:00 GMT 2013
Hi Cary,
> If we have a .debug_line.dwo section, readelf will treat that as a
> fragment, and will not parse the section correctly. We end up with a
> divide-by-zero error when trying to dump the section.
OK I can add a test for .debug_line.dwo and not treat it as a debug_line
fragement.
> I think we need a better way of identifying fragments of a debug
> sections. What if someone has a function named "dwo"?
Under normal circumstances the fix proposed above will still work
because gas will create a debug line fragment section called
.debug_line.text.dwo. (Assuming that dwo() was compiled with function
sectioning enabled).
To really muck things up the programmer would have to provide a section
attribute to the dwo() function as well. Ie:
void dwo (void) __attribute__((section("dwo"));
void dwo (void) { ; }
And then compile it without function sectioning enabled but with
--gdwarf-sections enabled. Which seems pretty unlikely to me.
Cheers
Nick
More information about the Binutils
mailing list