This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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  <>
	    Pedro Alves  <>

	Based on work by Jan Kratochvil <> and Jeff
	Johnston <>.

2008-04-14  Jan Kratochvil  <>
	    Daniel Jacobowitz  <>

	* 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 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)
   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 ();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]