This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Fix Linux attach to signalled/stopped processes
please apply the attached patch to the testcase as this workaround is no longer
required with your GDB code patch variant.
On Mon, 14 Apr 2008 17:09:19 +0200, Daniel Jacobowitz wrote:
> Big thanks to Jeff Johnston and Jan Kratochvil for the original work,
> Roland for advice, Pedro for async mode fixups, and Doug for prodding
> me to look at this issue again.
Please fix the authorship of the patch as there is no significant line of code
of mine left there.
2008-04-14 Daniel Jacobowitz <email@example.com>
Pedro Alves <firstname.lastname@example.org>
Based on work by Jan Kratochvil <email@example.com> and Jeff
2008-04-14 Jan Kratochvil <firstname.lastname@example.org>
Daniel Jacobowitz <email@example.com>
* gdb.threads/attach-into-signal.c, gdb.threads/attach-into-signal.exp,
gdb.threads/attachstop-mt.c, gdb.threads/attachstop-mt.exp: New.
The attachment part works for me OK; I hope also the detach-as-stopped part
gets imported later to make gdb_gcore.sh of a stopped process transparent.
--- ./gdb/testsuite/gdb.threads-upstream/attach-into-signal.c 2008-04-15 21:57:13.000000000 +0200
+++ ./gdb/testsuite/gdb.threads/attach-into-signal.c 2008-04-15 22:15:24.000000000 +0200
@@ -40,10 +40,8 @@ static void *func (void *arg)
- /* This should be NOTREACHED but sometimes it is reached - Bug 427860.
- We never get here without ptrace(2). It may also be a kernel bug. */
- for (;;)
- pause ();
+ /* We must not get past this point, either in a free standing or debugged
+ state. */
/* NOTREACHED */