This is the mail archive of the gdb-patches@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: FYI: fix big-endian bug with DWARF_VALUE_STACK


Mark Wielaard wrote:
> On Wed, 2010-02-24 at 15:11 +0100, Ulrich Weigand wrote:
> > However, maybe I'm missing something here, in particular as I haven't been
> > able to find a formal specification of DW_OP_stack_value -- I assume this
> > is in the current DWARF4 draft?  Is this available somewhere?
> 
> The latest drafts are here: http://www.dwarfstd.org/doc/

Thanks!

So in the latest draft we have:

  The DW_OP_stack_value operation specifies that the object does not exist
  in memory but its value is nonetheless known and is at the top of the DWARF
  expression stack. In this form of location description, the DWARF expression
  represents the actual value of the object, rather than its location.
  The DW_OP_stack_value operation terminates the expression.

and an example:

  DW_OP_lit1 DW_OP_stack_value DW_OP_piece 4
  DW_OP_breg3 0 DW_OP_breg4 0 DW_OP_plus DW_OP_stack_value DW_OP_piece 4

  The object value is found in an anonymous (virtual) location whose value
  consists of two parts, given in memory address order: the 4 byte value 1
  followed by the four byte value computed from the sum of the contents of
  r3 and r4.

This doesn't fully resolve the question for me, but at least there's no
explicit reference to the address size here ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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