This is the mail archive of the
mailing list for the GDB project.
Re: GDB problems with pthread_join()
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb at sourceware dot org
- Cc: Jeff Kenton <jkenton at tilera dot com>
- Date: Wed, 26 Oct 2011 15:48:49 +0100
- Subject: Re: GDB problems with pthread_join()
- References: <4EA5C49B.firstname.lastname@example.org>
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,
> 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.