> Is there any chance that the attached could be reviewed over the next few hours? > > Apparently not :-(. Anyway, I've looked at it now and it appears that > GDB as it stands now isn't ready to cope with the abstraction of the > lin-lwp layer as I intended it. So I guess that until we overhaul the > way GDB deals with threads, Daniels patch (sans the #ifdef) is the way > to go. > > (The US has holidays round this time?) > > Thanks! I'll merge it in, test it and then start the 5.2.91 process. Er, no I wont :-( The attached is the refind patch. I added the comment: + /* NOTE: cagney/2002-12-02: This assumes that the target code can + directly transfer the register values into the register cache. + This works fine when there is a 1:1 mapping between light weight + process (LWP) (a.k.a. process on GNU/Linux) and the thread. On + an N:1 (user-land threads), or N:M (combination of user-land and + LWP threading), this does not work. An LWP can be sitting in the + thread context switch code and hence, the LWP's registers belong + to no thread. */ however, with the patch applied, I see (and consistently, well 2 out of 2, which is pretty amasing for the thread testsuite) the new failure: gdb.threads/killed.exp: GDB exits after multi-threaded program exits messily looking at the log file: (gdb) run Starting program: /home/cagney/gdb/native/gdb/testsuite/gdb.threads/killed [New Thread 1024 (LWP 6831)] [New Thread 2049 (LWP 6832)] [New Thread 1026 (LWP 6833)] Cannot find user-level thread for LWP 6833: generic error (gdb) PASS: gdb.threads/killed.exp: run program to completion quit The program is running. Exit anyway? (y or n) y Cannot find thread 2049: generic error (gdb) FAIL: gdb.threads/killed.exp: GDB exits after multi-threaded program exits messily (gdb/568) Which doesn't occure when the patch isn't applied. The test system was: $ uname -a Linux torrens 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown I'm instead, for the moment, going to document this as a known problem. (It's a maintainer command so normal users won't use it). Andrew