[RFC] DW_OP_piece vs. DW_OP_bit_piece on a Register

Andreas Arnez arnez@linux.vnet.ibm.com
Mon Jan 18 16:00:00 GMT 2016


On Sat, Jan 16 2016, Joel Brobecker wrote:

>> After analyzing some test case failures in GCC and GDB I realized that
>> there are various problems with the handling of DWARF pieces
>> (particularly from registers) in the current implementations of GCC and
>> GDB.  I'm working on a fix for the GDB part, but first I'd like to check
>> whether I'm heading into the right direction -- or what the right
>> direction is supposed to be.  The article below outlines these issues
>> and the suggested solution options.
>
> This is a very nice and detailed analysis of the current situation.
> Thank You!
>
> I admit that I read through the document fairly rapidly; it does
> seem to me, at this point, that the first step might be to get
> clarification from the DWARF committee? Or is input from the GCC/GDB
> community going to help the discussion with the DWARF committee?

I think it would be helpful to form an opinion within the GCC/GDB
community first.  Then we can open a DWARF issue with a specific change
request, if necessary.

FWIW, here's my (current) opinion:

I don't like option 4.2 ("loose interpretation"), because it doesn't
seem to have any significant advantages over 4.3 and is more complex.
I'm less sure about 4.3 versus 4.1.  Option 4.3 seems more intuitive and
may require a bit less code than 4.1, but is not compliant with the
current standards' wording and does not support the SPU "preferred
slots".

And regarding the padding support, I prefer 5.3.1 ("no padding
support").

--
Andreas



More information about the Gdb mailing list