From: Sergio Durigan Junior <sergiodj@redhat.com>
To: "Ulrich Weigand" <uweigand@de.ibm.com>
Cc: emachado@linux.vnet.ibm.com (Edjunior Barbosa Machado),
gdb-patches@sourceware.org
Subject: Re: [PATCH] ppc64le/gdbserver: Fix ppc_collect/supply_ptrace_register() routines
Date: Mon, 08 Sep 2014 15:20:00 -0000 [thread overview]
Message-ID: <87y4tuxhos.fsf@redhat.com> (raw)
In-Reply-To: <201409081151.s88BpOJX015412@d06av02.portsmouth.uk.ibm.com> (Ulrich Weigand's message of "Mon, 8 Sep 2014 13:51:24 +0200 (CEST)")
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.
--
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
prev parent reply other threads:[~2014-09-08 15:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 20:00 Edjunior Barbosa Machado
2014-09-05 22:54 ` Sergio Durigan Junior
2014-09-08 11:51 ` Ulrich Weigand
2014-09-08 14:40 ` Edjunior Barbosa Machado
2014-09-08 14:43 ` Ulrich Weigand
2014-09-08 16:51 ` Edjunior Barbosa Machado
2014-09-08 15:20 ` Sergio Durigan Junior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4tuxhos.fsf@redhat.com \
--to=sergiodj@redhat.com \
--cc=emachado@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox