This is the mail archive of the gdb-patches@sources.redhat.com 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: Patch: Dwarf2 reader -vs- DW_OP_piece


>>>>> "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


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