Fallon, David wrote:
I am having problems debugging an application under Linux using gdb and the boost threads library. The problem I am basically having is the stack trace is only going back to the join statement rather than to point in the program that caused the crash. My application is reasonable complicated so to reproduce it I have created a buggy version of the helloword4 tutorial. The slightly modified the helloworld4 tutorial program to loop 7 times and then crash. The stack trace given in gdb points back to the join statement rather than the source code line that generated the error. Has anyone else come across this problem?
This behaviour seems correct to me. gdb is showing you the state of the first thread. If you want to see the state of the other thread, you have to switch to that first - use "info threads" to list the thread numbers and then "thread <n>" to switch. Ben.