[Dwarf-Discuss] DWARF and online-compiled programs (Simon Brand)

Earlam, David dearlam at qti.qualcomm.com
Wed Jun 15 06:31:53 PDT 2016


>From: Dwarf-Discuss [mailto:dwarf-discuss-bounces at lists.dwarfstd.org] On Behalf Of Simon Brand
>Sent: 13 June 2016 09:08
>Could you expand on why this is not in the spirit of DW_AT_location?

I'll try to answer this point.

I think re-using DW_AT_location for source code text lookup is "not in the spirit of DW_AT_location" because that attribute describes the place(s) in memory, register or stack frame - or combination of these - that the value of a _data object_ can be read (or written) by a DWARF consumer. Places plural, because the current live place holding a value can vary during a subprogram, influenced by register allocation optimisation decisions, for example.

The phrase 'location description' has had a meaning in the standard since DWARF1 was superseded by DWARF2 and is used to describe how data objects can be found (exact place in all the program's addressable memories including registers). In DWARF2 onwards, the  description of a data object's location can be present either inline in .debug_info  or as reference to a 'location list' in .debug_loc, or - since DWARF4 - be referenced from a DW_TAG_dwarf_procedure. See DWARF2 section 2.4, DWARF3 section 2.6 and DWARF4 section 2.6  and section 2.16.

All DW_AT_location in those specifications describe data objects and how to find them, not source code input texts.


David Earlam
Staff-Senior[Engineer]/Manager ? Software : Development Tools() {
Qualcomm Technologies International, Ltd.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/private.cgi/dwarf-discuss-dwarfstd.org/attachments/20160615/30d7c217/attachment.htm>


More information about the Dwarf-Discuss mailing list