This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Patch: Dwarf2 reader -vs- DW_OP_piece
- From: Tom Tromey <tromey at redhat dot com>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 21 Feb 2002 16:23:53 -0700
- Subject: Re: Patch: Dwarf2 reader -vs- DW_OP_piece
- References: <87664qej9l.fsf@creche.redhat.com> <npr8neqyft.fsf@zwingli.cygnus.com>
- Reply-to: tromey at redhat dot com
>>>>> "Jim" == Jim Blandy <jimb@redhat.com> writes:
Jim> Can you explain what sorts of location expressions this is
Jim> supposed to help GDB handle?
Yes, sorry.
Suppose a value spans multiple registers. Currently gcc encodes this
as DW_OP_reg for the first register. However, I believe that is not
fully correct according to the Dwarf-2 spec.
The gcc patch changes the output in this case to a series of
DW_OP_reg/DW_OP_piece instructions.
So previously gcc could generate this for a `long long' value (on x86
Linux):
DW_OP_reg1
With the patch gcc will now generate:
DW_OP_reg1
DW_OP_piece 4
DW_OP_reg2
DW_OP_piece 4
Tom