Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: gdb@sources.redhat.com
Subject: Re: Multithreaded debugging: strange thread switches
Date: Tue, 24 Jan 2006 14:44:00 -0000	[thread overview]
Message-ID: <200601241741.45231.ghost@cs.msu.su> (raw)
In-Reply-To: <20060124142846.GA15268@nevyn.them.org>

On Tuesday 24 January 2006 17:28, Daniel Jacobowitz wrote:

> > Well, strictly speaking I want "next" to mean "move this thread to next
> > source line, then single-step all other threads until there are at the
> > same time as the current thread". (The remote side is sumulator, so "same
> > time" is well-defined).
> >
> > I do not think that vCont can exactly express what I want, so there's
> > always be some difference between what gdb says over remote connection
> > and what I want to be done -- are you sure using vCont will be any
> > better?
>
> Well, GDB doesn't have any command that it expects to have that
> behavior.  If you want GDB to do that, I recommend adding such an
> interface.  From what I can see, you can get the same effect by "single
> step all threads in sync, repeatedly, until this thread reaches the
> next source line", which is "vCont;s", 

Generally speaking if 2 threads execute 10 steps each, they no longer are at 
the same time, because instructions in thread 1 can take one cycle each, 
while instructions in thread can take two cycles each. I'd prefer this 
synchronization logic to be inside my remote part, which is specifialized for 
that task.

> or possibly "Hc-1" "s" - not 
> completely sure about the last one, the documentation suggests that's
> right, but I don't know any stub that handles either of these
> correctly.
>
> > I see. But after we've single-stepped over breakpoint, will we switch
> > back to the thread where "next" was issued?
>
> At the moment, no.  This is definitely a bug but it's a pretty nasty
> infrun limitation; really that whole subsystem needs some love and
> attention.

Is that bug filed in the bug tracker? Should I file it?

> > > The current code was modified to always select the previous thread
> > > in arch-utils.c revision 1.28 in order to support resuming after
> > > hitting Control-C:
> > >   http://sourceware.org/ml/gdb-patches/2001-05/msg00419.html
> > >
> > > I can't tell from Jonathan's post what problem he's trying to fix.
> >
> > Hmmm, maybe that's a sign that Changelog requirements are suboptimal?
> > Most often, Changelog entries contain lots of details about
> > changes to specific functions, but no general overview of the goal of the
> > patch.
>
> No, the mailing list archives are where this sort of thing is supposed
> to live 

But if I'm looking at Changelog entry, how can I guess the subject of email 
that discusses this change?

> - and the comments in the code.   

But if change is across 10 files, a comment in one of them is not likely to 
give the entire pictire.

- Volodya


  reply	other threads:[~2006-01-24 14:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-23 15:46 Vladimir Prus
2006-01-23 16:02 ` Daniel Jacobowitz
2006-01-24 14:28   ` Vladimir Prus
2006-01-24 14:41     ` Daniel Jacobowitz
2006-01-24 14:44       ` Vladimir Prus [this message]
2006-01-24 16:16         ` Daniel Jacobowitz
2006-01-24 21:21         ` Eli Zaretskii
2006-01-25  0:04   ` vCont [was Re: Multithreaded debugging: strange thread switches] Nathan J. Williams
2006-01-25 11:20     ` Daniel Jacobowitz

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=200601241741.45231.ghost@cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=gdb@sources.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