[RFC] Implementation of DW_OP_deref and DW_OP_deref_size operators

Jim Blandy jimb@redhat.com
Thu Jul 4 20:34:00 GMT 2002


Jim Blandy <jimb@redhat.com> writes:
> Yes!  However, pointers are not always unsigned.  I think on some
> 32-bit ABIs for 64-bit MIPS chips they need to be signed.  Andrew will
> know the facts.

But it doesn't matter whether pointers are unsigned.  The Dwarf spec
says that DW_OP_deref pushes a value which is "the size of an address
on the target machine", which is the full width of a Dwarf
expression stack element; it doesn't need to be extended.  And it
further says that DW_OP_deref_size zero-extends its argument.  So the
patch looks correct to me.



More information about the Gdb-patches mailing list