This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Add missing call to restore_child_signals_mask.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Doug Evans <dje at google dot com>
- Date: Tue, 3 May 2011 11:06:36 +0100
- Subject: Re: [patch] Add missing call to restore_child_signals_mask.
- References: <20110503032113.9BFA12461A9@ruffy.mtv.corp.google.com>
On Tuesday 03 May 2011 04:21:13, Doug Evans wrote:
> Hi.
>
> Perhaps there's an obscure reason why this patch is wrong,
> but I can't think of one.
Neither can I. No objections, thanks.
> [The function calls block_child_signals at the start - all exit
> paths should, presumably, call restore_child_signals_mask before returning.]
>
> I will check it in in a few days if there are no objections.
>
> 2011-05-02 Doug Evans <dje@google.com>
>
> * linux-nat.c (lin_lwp_attach_lwp): For !WIPSTOPPED case,
> adding missing call to restore_child_signals_mask.
>
> Index: linux-nat.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/linux-nat.c,v
> retrieving revision 1.202
> diff -u -p -r1.202 linux-nat.c
> --- linux-nat.c 29 Apr 2011 15:54:12 -0000 1.202
> +++ linux-nat.c 3 May 2011 03:17:33 -0000
> @@ -1476,7 +1476,10 @@ lin_lwp_attach_lwp (ptid_t ptid)
>
> status = linux_nat_post_attach_wait (ptid, 0, &cloned, &signalled);
> if (!WIFSTOPPED (status))
> - return -1;
> + {
> + restore_child_signals_mask (&prev_mask);
> + return -1;
> + }
>
> lp = add_lwp (ptid);
> lp->stopped = 1;
>
--
Pedro Alves