This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Implementation of DW_OP_deref and DW_OP_deref_size operators
Sender: jimb@zwingli.cygnus.com
Cc: gdb@sources.redhat.com, gdb-patches@sources.redhat.com
From: Jim Blandy <jimb@redhat.com>
Date: 04 Jul 2002 22:27:02 -0500
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1
Content-Type: text/plain; charset=us-ascii
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.
Yup, I came to the same conclusion. The code that was origionally
there also used unsigned pointers.
I'll check it in.
Thanks,
Mark