This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Add missing call to restore_child_signals_mask.
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Mon, 2 May 2011 20:21:13 -0700 (PDT)
- Subject: [patch] Add missing call to restore_child_signals_mask.
Hi.
Perhaps there's an obscure reason why this patch is wrong,
but I can't think of one.
[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;