public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Thread switching and stepping bug
@ 2001-04-24  2:06 Jonathan Larmour
  2001-04-24  6:33 ` David Smith
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Larmour @ 2001-04-24  2:06 UTC (permalink / raw)
  To: gdb

It seems GDB (a fairly recent CVS) doesn't do the right thing when a thread
view has been switched and then the system stepped.

I've got a program with a bunch of threads. The default one is thread 3 and
has a function breakme which I set a breakpoint. The other threads run
other stuff.

If I set a breakpoint on breakme, thread 3 hits it. If I manually step off
that breakpoint, switch to e.g. thread 5 then do another step, GDB can't
recognise that it hit a sensible breakpoint, and instead reports a SIGTRAP.

So the commands I'm doing are:

b breakme
c
[ hits breakpoint in thread 3]
step
thread 5
step

I'm surprised no-one has noticed this before, so is my understanding wrong?

I've tried looking in wait_for_inferior() but got lost quickly :-). I think
the problem may be that step_resume_breakpoint is changed when GDB notices
the thread has changed. But I'm no expert.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

end of thread, other threads:[~2001-05-10  8:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-24  2:06 Thread switching and stepping bug Jonathan Larmour
2001-04-24  6:33 ` David Smith
2001-04-24  8:14   ` Jonathan Larmour
2001-05-01 18:37   ` Jonathan Larmour
2001-05-02  6:30     ` David Smith
2001-05-03 17:32       ` Andrew Cagney
2001-05-04  8:28         ` David Smith
2001-05-10  8:33           ` Andrew Cagney

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