This is the mail archive of the 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] ppc64le/gdbserver: Fix ppc_collect/supply_ptrace_register() routines

On Monday, September 08 2014, Ulrich Weigand wrote:

>> Why not use gdbarch_byte_order here?  We don't use __BYTE_ORDER anywhere
>> in the code.
> Well, this is gdbserver code, so there is no gdbarch ...
> In gdbserver, we usually check for host properties, so the above check
> seems fine to me.

Ouch, missed that, sorry.

> However, there is one additional problem:
>>+      /* Big-endian values sit at the right end of the buffer. In case of
>>+         registers whose size is smaller than sizeof (long), we must use a
>>+         padding to access it correctly.  */
>>+      int padding = (sizeof (long) - register_size (regcache->tdesc, regno));
>>+      collect_register (regcache, regno, buf + padding);
> This will be wrong for registers larger than "long", e.g. vector registers.
> The old code handled them correctly, but this new code does not.

This part seemed "strange" to me as well, but then I figured you guys
know more about PPC than I do :-).

Anyway, thanks for the corrections, Ulrich.

GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible

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