[Dwarf-Discuss] null entries in location list

Mark Wielaard mjw@redhat.com
Mon Jul 1 07:15:38 GMT 2013


On Mon, 2013-07-01 at 08:57 +0200, Mark Wielaard wrote:
> On Mon, 2013-07-01 at 08:32 +0200, Attila Csosz wrote:
> 
> > How to interpret/read the null entries in .debug_loc?
> >
> > For example
> >
> >     00016462 c0028510 c002851f (DW_OP_reg2 (r2))
> >     00016462 <End of list>
> >     00016475 <End of list>
> >     000164a1 c00114b4 c00114b8 (DW_OP_breg13 (r13): 0)
> >     000164a1 c00114b8 c00114c0 (DW_OP_breg12 (r12): 0)
> >     000164a1 c00114c0 c0011534 (DW_OP_breg11 (r11): 4)
> >     000164a1 <End of list>
> >
> > At 0x00016475 I have read 0x0 and 0x0 for beginaddress and endaddress
> > but the next entry start at 0x000164a1.
> 
> I believe the entries only have value/meaning if some DIE attribute
> points at them (up till the end of list marker). At least in elfutils
> libdw we keep a list of loclistptrs seen in the associated CUs and treat
> everything "outside" as garbage. Does anything point at 00016475?

And if something points at just the end of list marker then 2.6.2 says:
"A location list containing only an end of list entry describes an
object that exists in the source code but not in the executable
program."





More information about the Dwarf-discuss mailing list