Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: marcus.shawcroft@arm.com
Cc: gdb-patches@sourceware.org, palves@redhat.com
Subject: Re: [PATCH] gdbserver ptrace() argument type cleanups.
Date: Mon, 04 Feb 2013 18:57:00 -0000	[thread overview]
Message-ID: <201302041857.r14IvSWJ000937@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <510FF048.8070701@arm.com> (message from Marcus Shawcroft on Mon,	04 Feb 2013 17:30:48 +0000)

> Date: Mon, 04 Feb 2013 17:30:48 +0000
> From: Marcus Shawcroft <marcus.shawcroft@arm.com>
> 
> Hi,
> 
> This patch is ripped out of the aarch64 gdbserver patch here:
> 
> http://sourceware.org/ml/gdb-patches/2013-01/msg00535.html
> 
> These changes are not directly related to the aarch64 port itself.
> Since ptrace() has a variadic prototype, the anonymous arguments,
> notably arguments 3 and 4, should be given their correct types.
> 
> /Marcus
> 
> Proposed ChangeLog:
> 
>     gdb/gdbserver/
> 
>          * linux-low.c (handle_extended_wait, linux_create_inferior)
>          (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
>          (dequeue_one_deferred_signal, linux_resume_one_thread)
>          (fetch_register, linux_write_memory, linux_enable_event_reporting)
>          (linux_tracefork_grandchild, linux_test_for_tracefork)
>          (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo ): Add
>          PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
>          where the argument is 0.

> diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
> index 8988509..c52cd2e 100644
> --- a/gdb/gdbserver/linux-low.c
> +++ b/gdb/gdbserver/linux-low.c
> @@ -445,7 +445,8 @@ handle_extended_wait (struct lwp_info *event_child, int=
>  wstat)
>        unsigned long new_pid;
>        int ret, status;
> =20
> -      ptrace (PTRACE_GETEVENTMSG, lwpid_of (event_child), 0, &new_pid);
> +      ptrace (PTRACE_GETEVENTMSG, lwpid_of (event_child), (PTRACE_ARG3_TYPE) 0,
> +	      &new_pid);

I'd use the word "obfuscation" instead of "cleanup".


  parent reply	other threads:[~2013-02-04 18:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 17:31 Marcus Shawcroft
2013-02-04 17:35 ` Pedro Alves
2013-02-04 17:41   ` Marcus Shawcroft
2013-02-04 18:57 ` Mark Kettenis [this message]
2013-02-04 19:01   ` Tom Tromey
2013-02-04 19:25     ` Pedro Alves
2013-02-04 22:09     ` Mark Kettenis
2013-02-04 19:04   ` Marcus Shawcroft

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=201302041857.r14IvSWJ000937@glazunov.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    --cc=marcus.shawcroft@arm.com \
    --cc=palves@redhat.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