From: Pedro Alves <palves@redhat.com>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb-patches@sourceware.org
Subject: Re: [RFA] handle android bionic ptrace in gdbserver.
Date: Thu, 29 Mar 2012 16:42:00 -0000 [thread overview]
Message-ID: <4F7490E9.40903@redhat.com> (raw)
In-Reply-To: <1332894408.16415.14.camel@hactar>
On 03/28/2012 01:26 AM, Thiago Jung Bauermann wrote:
> Hi Mark,
>
> On Tue, 2012-03-27 at 18:11 +0200, Mark Kettenis wrote:
>>> > > From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
>>> > > Date: Mon, 26 Mar 2012 19:46:42 -0300
>> > Sad to see all this compatibility goo just a different prototype.
>> > This could almost certainly be fixed by just fixing the header.
> I completely agree. IMHO in this case the header to be fixed is actually
> glibc's, since it declares ptrace in a different way than what is
> supported by the kernel.
The kernel just supports the system call. The man page is really not a
part of the kernel. It's a separately maintained project.
>> > Anyway, you should test this on a 64-bit platform. I have a strong
>> > suspicion things will break there because of plain integers that are
>> > being cast to void *.
> Good catch, that's what happened indeed. I don't know what would be the
> correct fix. I changed the types of the variables that are passed to
> ptrace from int to long. At least it hurts the eyes less than two casts
> in a row.
:-)
Honestly, I'd prefer the double cast, in order to leave the ptrace arg
type intricacy closest the the ptrace call as possible, instead of that care
being spread and diluted about. It's also what other places in the code
base already do (both gdb and gdbserver).
--
Pedro Alves
next prev parent reply other threads:[~2012-03-29 16:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-26 22:47 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 [this message]
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
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=4F7490E9.40903@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--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