Location lists again
Daniel Jacobowitz
drow@mvista.com
Fri Feb 14 16:04:00 GMT 2003
On Fri, Feb 14, 2003 at 01:36:02PM +0100, Michal Ludvig wrote:
> And how about this piece:
> [...]
> /* ??? This shouldn't be needed now that we've forced the
> compilation unit base address to zero when there is code
> in more than one section. */
> if (strcmp (curr->section, ".text") != 0)
> {
> /* dw2_asm_output_data will mask off any extra bits in the ~0. */
> dw2_asm_output_data (DWARF2_ADDR_SIZE, ~(unsigned HOST_WIDE_INT) 0,
> "Location list base address specifier fake entry");
> dw2_asm_output_offset (DWARF2_ADDR_SIZE, curr->section,
> "Location list base address specifier base");
> }
> [...]
>
> Imagine there is a non-null base address in Compilation unit DIE, and
> the appropriate location lists have headers in the form
> .quad 0xffffff...
> .quad .text[.label] # loclist base address
>
> Are both base addresses the same? Well, as far as I could see they are,
> but is it ensured? Or does one of them have a higher "preference" in the
> case they differ?
You could look at the code I added for DW_AT_ranges, which explains
this - do you have a copy of the DWARF spec? If not, it's available on
the web. I recommend reading the bit that describes the format of the
lists.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
More information about the Gcc
mailing list