From: "H.J. Lu" <hjl.tools@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
gdb-patches@sourceware.org
Subject: Re: sparc gdbserver bug? (Re: [RFA] handle android bionic ptrace in gdbserver.)
Date: Thu, 29 Mar 2012 17:23:00 -0000 [thread overview]
Message-ID: <CAMe9rOoyNjHZSRu_AUWbxB1NpY9S3mRZ__D3UceH=B2kdLSSdA@mail.gmail.com> (raw)
In-Reply-To: <4F749597.6000600@redhat.com>
On Thu, Mar 29, 2012 at 10:02 AM, Pedro Alves <palves@redhat.com> wrote:
> On 03/28/2012 01:26 AM, Thiago Jung Bauermann wrote:
>
>> #ifndef __sparc__
>> - res = ptrace (regset->get_request, pid, nt_type, data);
>> + res = ptrace (regset->get_request, pid,
>> + (PTRACE_ARG3_TYPE) nt_type, data);
>> #else
>> res = ptrace (regset->get_request, pid, &iov, data);
>> #endif
>
>
> BTW, I notice the __sparc__ branch here appears to be broken?
> (sparc has the last two ptrace arguments reversed...).
>
> $ git show d0aa472c
> commit d0aa472c6770baccb29dc37d0e64a81afda99911
> Author: H.J. Lu <hjl.tools@gmail.com>
> Date: Wed Apr 7 18:49:43 2010 +0000
>
> Add x86 AVX support to gdbserver.
> ...
>
> +
> + nt_type = regset->nt_type;
> + if (nt_type)
> + {
> + iov.iov_base = buf;
> + iov.iov_len = regset->size;
> + data = (void *) &iov;
> + }
> + else
> + data = buf;
> +
> #ifndef __sparc__
> - res = ptrace (regset->get_request, pid, 0, buf);
> + res = ptrace (regset->get_request, pid, nt_type, data);
> #else
> - res = ptrace (regset->get_request, pid, buf, 0);
> + res = ptrace (regset->get_request, pid, &iov, data);
> #endif
>
> I think that should have ended up with:
>
> #ifndef __sparc__
> res = ptrace (regset->get_request, pid, nt_type, data);
> #else
> res = ptrace (regset->get_request, pid, data, nt_type);
> #endif
>
It may be a typo for sparc branch.
--
H.J.
next prev parent reply other threads:[~2012-03-29 17:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-26 22:47 [RFA] handle android bionic ptrace in gdbserver Thiago Jung Bauermann
2012-03-27 16:12 ` Mark Kettenis
2012-03-28 0:27 ` Thiago Jung Bauermann
2012-03-29 16:42 ` Pedro Alves
2012-03-30 20:29 ` Thiago Jung Bauermann
2012-04-23 18:53 ` Thiago Jung Bauermann
2012-04-24 13:14 ` Pedro Alves
2012-04-24 15:08 ` Thiago Jung Bauermann
2012-03-29 17:02 ` sparc gdbserver bug? (Re: [RFA] handle android bionic ptrace in gdbserver.) Pedro Alves
2012-03-29 17:23 ` H.J. Lu [this message]
2012-03-29 18:50 ` Pedro Alves
2012-03-29 21:29 ` Pedro Alves
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='CAMe9rOoyNjHZSRu_AUWbxB1NpY9S3mRZ__D3UceH=B2kdLSSdA@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=palves@redhat.com \
--cc=thiago.bauermann@linaro.org \
/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