[Dwarf-Discuss] question about [0x0..0xffffffff] location list entry

Michael Eager eager@eagercon.com
Thu Jan 20 16:54:19 GMT 2011


Joel Brobecker wrote:

> The location list entry, as dumped by readelf looks is:
> 
>     Offset   Begin    End      Expression
>     00090068 0009f7c4 0009f7c3 (DW_OP_addr: 4000d120)
>     00090068 <End of list>

This is an invalid location list.

DWARF 4, Section 2.6.2, page 30:

   A location list entry consists of:

   1. A beginning address offset. This address offset has
      the size of an address and is relative to the applicable
      base address of the compilation unit referencing this
      location list. It marks the beginning of the address
      range over which the location is valid.

   2. An ending address offset. This address offset again has
      the size of an address and is relative to the applicable
      base address of the compilation unit referencing this
      location list. It marks the first address past the end
      of the address range over which the location is valid.
      The ending address must be greater than or equal to the
      beginning address.

In this case, the LocList violates the requirements for an
ending address.

DWARF does not mention overflow in address computations.
(Not that there is an address computation here.)  Nor does
it mention address ranges wrapping.

The best interpretation I can give for this LocList is that
the live range for the variable is empty.  But that would
be an attempt to give meaning to an illegal DWARF construct.

The correct LocList for this variable would be [0..0xffffffff].

-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077




More information about the Dwarf-discuss mailing list