This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix Linux attach to signalled/stopped processes
Hi,
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 <dan@codesourcery.com>
Pedro Alves <pedro@codesourcery.com>
Based on work by Jan Kratochvil <jan.kratochvil@redhat.com> and Jeff
Johnston <jjohnstn@redhat.com>.
...
2008-04-14 Jan Kratochvil <jan.kratochvil@redhat.com>
Daniel Jacobowitz <dan@codesourcery.com>
* gdb.threads/attach-into-signal.c, gdb.threads/attach-into-signal.exp,
gdb.threads/attach-stopped.c, gdb.threads/attach-stopped.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.
Regards,
Jan
--- ./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)
raise (SIGALRM);
- /* 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. */
abort ();
/* NOTREACHED */