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, drow@false.org
Subject: Re: [rfc] Fix PR 2250 - multithreaded single-step problems in all-stop mode
Date: Tue, 18 Nov 2008 01:43:00 -0000	[thread overview]
Message-ID: <200811172030.mAHKU54d002481@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <200811171948.33905.pedro@codesourcery.com> from "Pedro Alves" at Nov 17, 2008 07:48:33 PM

Pedro Alves wrote:

> I don't think there's any reason to keep random_signal
> untouched across handle_inferior_event invocations in the while (1)
> loop in wait_for_inferior ? --- handle_inferior_event seems
> to set or clear it itself before relying on its value, but I wouldn't
> be that surprised there's a weird twisted code path where that isn't
> happening, and we could be reading a random_signal from a previous stop.
> Maybe moving the memset to inside the while (1) loop in
> wait_for_inferior would make things a bit clearer (if my reasoning
> about random_signal not being needed across events is correct).

I agree that random_signal need not survive beyond a handling of a
single event.  In fact, I think random_signal should probably simply
be a local variable of handle_inferior_event; it's not accessed
anywhere else.

In fact other members of the ecs struct should probably be
local variables, maybe some of them passed explicitly to
subroutines.  I think this would help simplify understanding
the data-flow along handle_inferior_event and its subroutines ...

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-17 20:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-15 16:42 Ulrich Weigand
2008-11-15 21:30 ` Pedro Alves
2008-11-17 22:19   ` Ulrich Weigand
2008-11-17 23:36     ` Pedro Alves
2008-11-18  1:43       ` Ulrich Weigand [this message]
2008-11-18  3:36         ` Pedro Alves
2008-12-07  0:16           ` [rfc] [0/7] infrun cleanup Ulrich Weigand
2008-12-07  1:29             ` Pedro Alves
2008-12-07 17:12               ` Pedro Alves
2008-12-07 18:20                 ` Ulrich Weigand
2008-12-07 19:16                   ` Pedro Alves

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=200811172030.mAHKU54d002481@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=drow@false.org \
    --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