+++ This bug was initially created as a clone of Bug #209521 +++ Attaching to a process in 'T' (Stopped; after kill -STOP) state cases assertion failure for gdb-6.5. It has been fixed in RH gdb-6.5-11.fc6. The bug is present upstream. Problem was not verified for 'frysk'. I have been asked to clone this Bug for frysk by Andrew Cagney. $ stty sane & [1] 22216 $ # newline [1]+ Stopped stty sane $ gdb stty 22216 GNU gdb Red Hat Linux (6.5-8.fc6rh) Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". Attaching to program: /bin/stty, process 22216 ../../gdb/linux-nat.c:1057: internal-error: linux_nat_attach: Assertion `pid == GET_PID (inferior_ptid) && WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP' failed. A problem internal to GDB has been detected, It is already fixed in gdb-6.5-9.fc6 which will be present in RawHide after FC6 gets released. FC6 will contain "gdb-6.5-8.fc6". Bug is present even upstream. 'T' state is a SIGSTOP from some SIGTTIN or SIGTTOU due to stty(1) accessing console no longer having access to as a background process.
Works for frysk, as of: 2006-10-11 frysk-core/frysk/proc * LinuxTask.java (sendAttach): Manually tell the thread that the process has been attached Fixes 3316. * TestProcStopped.java: Added license. (stopped): Added. (running): Ditto. (testStoppedDetached): (testStoppedAttached): (testRunningAckDaemon): (testRunningDetached): (testRunningAttached): Ditto. (testStoppedAckDaemon): Changed to use stopped. (MyTester): Changed to stop eventloop after an attach.