Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: "Ulrich Weigand" <uweigand@de.ibm.com>
Subject: Re: [rfc] [2/7] infrun cleanup: miscellaneous cleanups
Date: Sun, 07 Dec 2008 01:24:00 -0000	[thread overview]
Message-ID: <200812070123.40787.pedro@codesourcery.com> (raw)
In-Reply-To: <200812070017.mB70HagV018378@d12av02.megacenter.de.ibm.com>

On Sunday 07 December 2008 00:17:36, Ulrich Weigand wrote:
>   This patch changes wait_for_inferior to *always* invalidate
>   registers (and overlay cache state) before every call to target_wait,
>   and removes this from prepare_to_wait and handle_inferior_event.

I welcome this bit in particular very much.  I know I was confused
by this when I first learnt about expedite registers.

> * fetch_inferior_event uses the contents of ecs->ptid and
>   ecs->event_thread after handle_inferior_event returns.  As later
>   patches will remove those fields, I've replaced them with accessing
>   the current inferior -- just like normal_stop, which is called
>   by fetch_inferior_event anyway, does as well.

Yes, but not through current_inferior.

On Sunday 07 December 2008 00:17:36, Ulrich Weigand wrote:
>    if (!ecs->wait_some_more)
>      {
> -      struct inferior *inf = find_inferior_pid (ptid_get_pid (ecs->ptid));
> +      struct inferior *inf = current_inferior ();
>  

Please change this bit to:

-      struct inferior *inf = find_inferior_pid (ptid_get_pid (ecs->ptid));
+      struct inferior *inf = find_inferior_pid (ptid_get_pid (inferior_ptid));

Although inferior_ptid is pointing ecs->ptid at this point,
current_inferior asserts if the inferior is not listed, which does happen today.
See this just below:

     /* We may not find an inferior if this was a process exit.  */
      if (inf == NULL || inf->stop_soon == NO_STOP_QUIETLY)
	normal_stop ();

I've got  patches that fix the targets to not do that, so I can
revisit this bit by then.

-- 
Pedro Alves


  reply	other threads:[~2008-12-07  1:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-07  0:18 Ulrich Weigand
2008-12-07  1:24 ` Pedro Alves [this message]
2008-12-07 17:19   ` Pedro Alves
2008-12-07 18:23     ` Ulrich Weigand
2008-12-07 19:04       ` 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=200812070123.40787.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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