This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Generate DW_AT_ranges for non-contiguous code
Nick Clifton wrote:
Ok thanks - in which case the patch looks good, but I would like
Sterling to confirm that it actually fixes the problem since it did not
appear to do so for me.
I believe that the debugging information is correct. However gdb's
support of DW_AT_ranges is immature. At least as far as I can tell.
gdb/dwarf2read.c:read_partial_die--which handles low_pc and high_pc
attributes in the normal case--ignores the ranges attribute completely.
This is one location in gdb that will have to be fixed.
Also bfd/dwarf2.c:scan_unit_for_symbols also only supports aranges
inside functions, but not inside compilation units. This is another
place that gdb will need to be fixed for full support.
I'm probably missing others.
In any event, I believe that this is the correct first step to a
solution, rather than the complete solution.
Thanks,
Sterling