Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: pedro@codesourcery.com (Pedro Alves)
Cc: gdb-patches@sourceware.org
Subject: Re: Fix foll-fork.exp foll-vfork.exp fork-child-threads.exp
Date: Fri, 21 Nov 2008 11:40:00 -0000	[thread overview]
Message-ID: <200811201824.mAKIORtZ014998@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <200811201652.35125.pedro@codesourcery.com> from "Pedro Alves" at Nov 20, 2008 04:52:34 PM

Pedro Alves wrote:
> On Thursday 20 November 2008 16:36:58, Ulrich Weigand wrote:
> > As a separate question, I'm wondering why this is the right place to
> > put the follow-fork logic anyway (and not in handle_inferior_event
> > like follow-exec ...).  Do you know the history of this?
> 
> To be able to decide if you want to follow a child or a parent
> when you catch a fork with "catch fork".

Ah, I see.  Makes sense.

However, even given that we need to do it in "resume" -- why so late
in resume, after e.g. displaced stepping or software single-step
was already set up?   For example, isn't singlestep_ptid set to the
wrong value if we later decide to follow the child?

It seems to me it would make more sense to have that decision come
*first* -- and then we could use the correct thread_info and regcache
etc. pointers throughout.  I guess there may have been a good reason
to place the call where it is, but I don't see it off-hand ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2008-11-20 18:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20 19:15 Pedro Alves
2008-11-20 23:52 ` Ulrich Weigand
2008-11-21  1:35   ` Pedro Alves
2008-11-21  1:49     ` Ulrich Weigand
2008-11-21  2:09       ` Pedro Alves
2008-11-21 11:40         ` Ulrich Weigand [this message]
2008-11-21 12:58           ` Pedro Alves
2008-12-01 19:01 ` Michael Snyder
2008-12-01 20:56   ` Daniel Jacobowitz
2008-12-01 22:36     ` Michael Snyder
2008-12-01 21:06   ` Pedro Alves
2008-12-01 22:38     ` Michael Snyder

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=200811201824.mAKIORtZ014998@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.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