This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] DWARF support for .debug_loc offsets
- From: Petr Sorfa <petrs at caldera dot com>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: "gdb-patches at sources dot redhat dot com" <gdb-patches at sources dot redhat dot com>
- Date: Thu, 11 Jul 2002 15:14:23 -0400
- Subject: Re: [PATCH] DWARF support for .debug_loc offsets
- Organization: Caldera
- References: <3D2DB435.AC2C6DA0@caldera.com> <npptxuw3jr.fsf@zwingli.cygnus.com>
Hi Jim,
Sorry for the [PATCH] debacle will use [RFA]. Comments below.
> Petr Sorfa <petrs@caldera.com> writes:
> > This patch provides support for offsets into .debug_loc.
> >
> > The patch does not include .debug_loc support in read_tag_string_type()
> > as the DW_AT_string_length attribute is currently being misused by GCC
> > (it uses it to hold the length, rather than the location to the length)
> > and GDB supports the incorrect form.
> >
> > There is a second part of this patch which is dependent on FORTRAN95
> > support of modules and will be released later.
>
> I'm confused. If (say) a DW_AT_frame_base attribute's value uses
> DW_FORM_data4 or DW_FORM_data8, then that data is the offset in the
> ..debug_loc section of a location list describing how to find the
> object at various points in the code. But your code seems to assume
> that the data in the .debug_loc section is simply the address of the
> object.
>
> Having location list support would be great, but if we can get
> Daniel's LOC_COMPUTED patch committed, adding location list support
> will be very simple.
Oops, you are completely correct. Let me remove the DW_FORM_data4/8
stuff for DW_AT_frame_base and resubmit the patch for RFA. Is this OK?
Petr