public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* thread debugging problem
@ 2003-09-11 17:09 Andreas Westin
  2003-09-11 17:13 ` Elena Zannoni
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Westin @ 2003-09-11 17:09 UTC (permalink / raw)
  To: gdb

Hi,

I'm trying to debug a multithreaded program in linux, but I'm not able 
to get any kind of thread info while running the program in gdb.
I've tested with gdb 5.3, 5.3.91 and cvs from yesterday (10th) not any 
of them works.
info thread shows nothing and the program stops with signal 32 when a 
new thread starts.

I'm using Trustix 2.0 with gcc 3.3 and glibc 2.3.2.

Any help is appreciated.

/Andreas

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: thread debugging problem
@ 2003-09-15 14:36 Michael Elizabeth Chastain
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Elizabeth Chastain @ 2003-09-15 14:36 UTC (permalink / raw)
  To: ac131313, andwes-8; +Cc: gdb

aw> I've switched to redhat9 and now I get thread info, but I'm having other
aw> problems instead. Strange behaviour which I believe shouldn't happen.
aw> When I step forward in the code it seems to be running into somekind of
aw> loop running the same lines of code several times when it shouldn't, as
aw> you can see in the gdb session below. This is with gdb 5.3.91 but I saw
aw> the same behaviour with 5.3 on my gentoo box at home.

This is normal gdb behavior when the code is optimized
(compiled with -O or -O1 or -O2 or -O3).  The compiler interleaves
instructions from different source lines to improve performance.
You can get used to it, which takes a few days, or you can
compile your code with -O0 and get simpler "next" behavior
at the cost of more object code.

Michael C

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

end of thread, other threads:[~2003-09-15 14:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-11 17:09 thread debugging problem Andreas Westin
2003-09-11 17:13 ` Elena Zannoni
2003-09-12  7:18   ` Andreas Westin
2003-09-12 14:30     ` Daniel Jacobowitz
2003-09-12 14:49       ` Andreas Westin
2003-09-14 23:48         ` Andrew Cagney
2003-09-15 13:10           ` Andreas Westin
2003-09-15 14:36 Michael Elizabeth Chastain

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