This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Generate DW_AT_ranges for non-contiguous code

On Mon, Aug 07, 2006 at 01:30:33PM -0700, Sterling Augustine wrote:
> 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.

You are probably correct.

I posted a patch to the GDB list recently which handled DW_AT_ranges
for lexical blocks better - not perfect, but pretty good.  The same
approach could be used to handle compilation units.

So in the mean time, I recommend that you verify by hand that the
debugging information is better than before, rather than relying on

Daniel Jacobowitz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]