This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DWARF-2 expression error in location list entries


  A couple of us have looked for that first restriction in the DWARF3
standard and not found it.  I also went back to the DWARF2 standard
literally cited by the message and failed to find it there as well.  Can
anyone point out where to read the restriction these error() calls refer to?

The clearest hint is in DWARF3 2.6.1: "The following DWARF operations can be used to name a register. They can be used only in
location expressions. Each register name operator must be used alone (as a DWARF expression
consisting of just that one operation)."
(goes on to mention DW_OP_reg*).


It's true that this is not as clear as it should be (DW_OP_piece is not mentioned in 2.6.1, for example).
2.6.2 does try to clarify this, but it's not easy to interpret.
But Daniel Jacobowitz is exactly right. These can only be used stand-alone (or with DW_OP_piece).


Jim Blandy suggested a nice little grammar
which made all this quite clear (March 8 2007, dwarf-discuss mailing list).

The lack of clarity issue got lost in a discussion about a proposal
on constant expressions in location lists.    I'll resurrect Jim's suggestion
for the DWARF committee.

Regards,
David Anderson








Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]