GDB problems with pthread_join()
Pedro Alves
pedro@codesourcery.com
Wed Oct 26 15:56:00 GMT 2011
On Monday 24 October 2011 21:03:39, Jeff Kenton wrote:
>
> I have gdb-7.1 mostly working on our two processors (one is 32-bit, the
> other 64-bit). With a trivial pthread program running under GDB with no
> breakpoints set, it runs to completion on one machine (32-bit) but hangs
> on the other with:
>
> Program received signal SIGTRAP, Trace/breakpoint trap.
> [Switching to Thread 0xaaab54f200 (LWP 721)]
> 0x000000aaaab09e58 in pthread_join (threadid=733018911232,
> thread_return=0x0)
> at pthread_join.c:89
>
> The SIGTRAP could be GDB's hook into the pthread library but I'm not
> sure. Other SIGTRAPs succeed happily (traced with set debug infrun 1).
"maint info breakpoints" shows the addresses of thread event
breakpoints, if your port uses those.
> Any clues? Anyone seen this before? Thoughts besides "sounds nasty and
> you'll have to figure it out yourself"?
There's not much information in your email to go by, but similar
weird things can happen if you use a 32-bit gdb to debug a 64-bit
program on other archs. If that's the case, try building a 64-bit
gdb for the 64-bit machine. If not, assuming you're native linux,
maybe "set debug lin-lwp 1" casts some more light. Good luck.
--
Pedro Alves
More information about the Gdb
mailing list