[Dwarf-Discuss] Some DWARFv5 draft feedback

Andreas Arnez arnez at linux.vnet.ibm.com
Thu Dec 1 06:17:16 PST 2016

On Thu, Dec 01 2016, Mark Wielaard wrote:

> BTW. It would be handy if there were sources for the spec so one can
> create patches for simple typos. Also it is somewhat opaque how Issues
> are handled. Could they and any comments from the committee be sent to
> the mailinglist to make tracking changes to the draft easier.


While we're at it, DWARF5 should improve the description of DW_OP_piece
and DW_OP_bit_piece.  AFAIK, their handling is fairly broken in all
existing DWARF producers and consumers (certainly in GDB -- in multiple
ways!), so even incompatible changes may not cause much harm.  See my
previous mails on this topic:



* DW_OP_bit_piece: [...] "If the location is a register, the offset is
  from the least significant bit end of the register."

  Is it intentional that this differs from the definition of
  DW_OP_piece, where the "placement of the piece within that register is
  defined by the ABI"?  Or can it be assumed (like all current
  producers/consumers do, AFAIK) that DW_OP_piece shall behave as if it
  was a DW_OP_bit_piece with offset 0?  What does the least significant
  bit end even mean, say, for a vector register?  And is this really a
  useful definition for FP registers, where the natural alignment is
  from the *most* significant bit end?

* DW_OP_piece: Some existing producers may emit DW_OP_piece operations
  that exceed the size of a single register, supposedly referring to
  multiple ("consecutive") registers.

  This usage is not covered by the current description of DW_OP_piece.
  Should it be?


More information about the Dwarf-Discuss mailing list