From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
when a thread ends, GDB consider the program exited, i.e. I can't debug
the codes after pthread_create.
Steps to Reproduce:
1.create a new thread and wait it
2.the new thread ends
3.now GDB considers the program exited normally
[...]$ cat main.c
printf( "MyProc : .......Thread : %d......\r\n", (int)
void *ThreadProc( void *pParam )
printf( "ThreadProc : \r\n" );
int main(int argc, char *argv)
pthread_t aThread = 0;
void *pRet = NULL;
pthread_create( &aThread, NULL, ThreadProc, NULL );
pthread_join( aThread, &pRet );
printf( "Main : ...\r\n" );
[...]$ gcc -lpthread -g -Wall -othread main.c
[...]$ gdb ./thread
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
welcome to change it and/or distribute copies of it under certain
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"...
Starting program: /home/jizy/./thread
[New Thread 1024 (LWP 12127)]
[New Thread 2049 (LWP 12128)]
[New Thread 1026 (LWP 12129)]
MyProc : .......Thread : 1026......
Program exited normally.
Expected Results: "Main : ..." and "MyProc : .......Thread :
1024......"should be outputed.
First of all, this is gdb issue and I cannot see why it should have severity
security when it has nothing to do with security.
I haven't been able to reproduce this with gdb-5.0rh-3, with gdb in 7.0
I haven't seen the behaviour you describe, but got some weird message every
couple invocations, but that seems to be gone in current rawhide gdb.
It works with gdb-5.0rh-3 from Rawhide.