[PATCH 3/4] gdb.trace: Use g packet order in tfile_fetch_registers.

Marcin Kościelnicki koriakin@0x04.net
Wed Feb 10 13:21:00 GMT 2016


On 10/02/16 14:20, Pedro Alves wrote:
> On 02/06/2016 03:39 PM, Marcin Kościelnicki wrote:
>> tfile_fetch_registers currently wrongly fetches registers using
>> gdb order instead of g packet order.  On x86_64 with AVX, this causes
>> problems with ymm*h and orig_rax registers: gdb has ymm*h first, while
>> g packet has orig_rax first.
>>
>> gdb/ChangeLog:
>>
>> 	* tracefile-tfile.c (tfile_fetch_registers): Use g packet order
>> 	instead of gdb order.
>
> OK.
>
> The docs already explicitly say that we use g packet order, though the
> bit about GDB register order seems odd:
>
>   @table @code
>   @item R @var{bytes}
>   Register block.  The number and ordering of bytes matches that of a
>                                   ^^^^^^^^          ^^^^^^^
>
>   @code{g} packet in the remote protocol.  Note that these are the
>   ^^^^^^^^^^^^^^^
>   actual bytes, in target order and @value{GDBN} register order, not a
>                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>                                              ????
>
>   hexadecimal encoding.
>
>
> I can't make sense of that.  I think we should
> s/and @value{GDBN} register order,// .
>
> WDYT?
>
> Thanks,
> Pedro Alves
>

Yeah, I think so.  Should I add it to the patch?



More information about the Gdb-patches mailing list