Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: threads and target-function-calls
Date: Wed, 15 Jan 2003 19:39:00 -0000	[thread overview]
Message-ID: <3E25B8F0.6690551A@redhat.com> (raw)
In-Reply-To: <3E1CCAD1.6030009@redhat.com>

Andrew Cagney wrote:
> 
> > Michael Snyder wrote:
> >
> >>
> >> Andrew Cagney wrote:
> >
> >> >
> >
> >> > > Hey folks,
> >> > >
> >> > > Did you know that (at least on x86 linux), if you have a multi-thread
> >> > > program and you execute a target function call, all the threads get to
> >> > > run?  Doesn't that seem like a bad thing?  Wouldn't we really rather
> >> > > only run the thread that is executing the target function call?
> >
> >> >
> >> > Ha!  That's just the start.  Doing nested inferior function calls on
> >> > alternative threads scrables the dummy frame cache:
> >> > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=468
> >
> >>
> >> But... that's just sick.   ;-(
> >> Wait -- you can't do that.  It isn't meaningful to change threads
> >> and then continue/whatever.  It assumes gdb has more control over
> >> scheduling than it actually has.
> >
> >
> > Oh, I think I misunderstood.  You have in mind this:
> >       (gdb) print foo()
> >       [switching thread to xyz]
> >       Breakpoint 2 in foo ()
> >       (gdb) print bar()
> >
> > not this:
> >       (gdb) print foo ()
> >       breakpoint 2 in foo()
> >       (gdb) thread xyz
> >       (gdb) print bar()
> >
> > right?
> 
> Either.  

OK, well, the second should not be a concern, because
prepare_to_proceed is supposed to switch us back to the
event thread before we resume.


      reply	other threads:[~2003-01-15 19:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-08  1:00 Michael Snyder
2003-01-08  1:08 ` Daniel Jacobowitz
2003-01-08  2:49   ` Dan Mosedale
2003-01-08  3:27     ` Daniel Jacobowitz
2003-01-09  0:48   ` Michael Snyder
2003-01-09  1:51     ` Daniel Jacobowitz
2003-01-08 16:18 ` Andrew Cagney
2003-01-08 16:32   ` Daniel Jacobowitz
2003-01-09  0:47   ` Michael Snyder
2003-01-09  0:56     ` Michael Snyder
2003-01-09  1:05       ` Andrew Cagney
2003-01-15 19:39         ` Michael Snyder [this message]

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=3E25B8F0.6690551A@redhat.com \
    --to=msnyder@redhat.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@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