System information: distribution: SuSE Linux 7.1 GDB version: 5.0 OS version: Linux 2.2.18-SMP i686 computer: dual Pentium III compiler used to compile test program: g++ 2.95.2 compiler used to compile GDB: don't know, probably g++ 2.95.2 since it is packaged with SuSE Linux 7.1 glibc-2.2 The following file "gdb_bug.c++" is used to demonstrate the problem: ------------------- int main() { return 0; } ------------------- The program linked with -lpthread can't be restarted in GDB. See the following example: first the program is compiled (line 1), the debugger is invoked (line 2), and the program is run twice (lines 10 and 14) without problems. Then the program is compiled again with "-lpthread" (line 19), and the debugger is invoked (line 20). Starting it the first time works fine (line 28), but the second attempt (line 33) gives an error message (lines 35/36). 1 mark:~/prgs/test$ g++ -g gdb_bug.c++ 2 mark:~/prgs/test$ gdb a.out 3 GNU gdb 5.0 4 Copyright 2000 Free Software Foundation, Inc. 5 GDB is free software, covered by the GNU General Public License, and you are 6 welcome to change it and/or distribute copies of it under certain conditions. 7 Type "show copying" to see the conditions. 8 There is absolutely no warranty for GDB. Type "show warranty" for details. 9 This GDB was configured as "i386-suse-linux"... 10 (gdb) r 11 Starting program: /home/mgrabner/prgs/test/a.out 12 13 Program exited normally. 14 (gdb) r 15 Starting program: /home/mgrabner/prgs/test/a.out 16 17 Program exited normally. 18 (gdb) quit 19 mark:~/prgs/test$ g++ -g gdb_bug.c++ -lpthread 20 mark:~/prgs/test$ gdb a.out 21 GNU gdb 5.0 22 Copyright 2000 Free Software Foundation, Inc. 23 GDB is free software, covered by the GNU General Public License, and you are 24 welcome to change it and/or distribute copies of it under certain conditions. 25 Type "show copying" to see the conditions. 26 There is absolutely no warranty for GDB. Type "show warranty" for details. 27 This GDB was configured as "i386-suse-linux"... 28 (gdb) r 29 Starting program: /home/mgrabner/prgs/test/a.out 30 [New Thread 1024 (LWP 9884)] 31 32 Program exited normally. 33 (gdb) r 34 Starting program: /home/mgrabner/prgs/test/a.out 35 warning: Cannot insert breakpoint -6: 36 Cannot access memory at address 0x40037600 37 (gdb) -- Markus Grabner - Computer Graphics and Vision Graz University of Technology, Inffeldgasse 16/II, 8010 Graz, Austria Phone: +43/316/873-5041, Fax: +43/316/873-5050 Email: [EMAIL PROTECTED], WWW: http://www.icg.tu-graz.ac.at/~grabner _______________________________________________ Bug-gdb mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gdb