public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB problems with pthread_join()
@ 2011-10-24 21:06 Jeff Kenton
  2011-10-26 15:56 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kenton @ 2011-10-24 21:06 UTC (permalink / raw)
  To: gdb


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).

Any clues? Anyone seen this before? Thoughts besides "sounds nasty and 
you'll have to figure it out yourself"?

Thanks.

--jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GDB problems with pthread_join()
  2011-10-24 21:06 GDB problems with pthread_join() Jeff Kenton
@ 2011-10-26 15:56 ` Pedro Alves
  0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2011-10-26 15:56 UTC (permalink / raw)
  To: gdb; +Cc: Jeff Kenton

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-26 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-24 21:06 GDB problems with pthread_join() Jeff Kenton
2011-10-26 15:56 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).