Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: David Smith <dsmith@redhat.com>
To: Jonathan Larmour <jlarmour@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: Thread switching and stepping bug
Date: Tue, 24 Apr 2001 06:33:00 -0000	[thread overview]
Message-ID: <3AE57FA9.5090009@redhat.com> (raw)
In-Reply-To: <3AE541F1.C8D1976F@redhat.com>

Jonathan,

If I understand you correctly, you may have hit a problem I'm familiar with. 
  Basically your target (which you didn't mention) hasn't implemented 
PREPARE_TO_PROCEED which gets called in infrun.c.  I submitted a patch back 
at the end of March to implement a generic PREPARE_TO_PROCEED which should 
work for most targets.

For more details, here's the start of the thread where we discussed this:

< http://sources.redhat.com/ml/gdb-patches/2001-03/msg00541.html >

I hope this helps.

Jonathan Larmour wrote:

> 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



-- 
David Smith
dsmith@redhat.com
Red Hat, Inc.
http://www.redhat.com
256.704.9222 (direct)
256.837.3839 (fax)


  reply	other threads:[~2001-04-24  6:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-24  2:06 Jonathan Larmour
2001-04-24  6:33 ` David Smith [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3AE57FA9.5090009@redhat.com \
    --to=dsmith@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=jlarmour@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox