From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Andreas Schwab <schwab@suse.de>
Subject: Re: GDB loses running state of inferior
Date: Fri, 21 Nov 2008 01:38:00 -0000 [thread overview]
Message-ID: <200811201518.44548.pedro@codesourcery.com> (raw)
In-Reply-To: <jeskpmzcut.fsf@sykes.suse.de>
On Thursday 20 November 2008 14:33:14, Andreas Schwab wrote:
> When an error occurs during startup of the child the running state of
> the child is lost and gdb is refusing to continue it:
> (gdb) c
> Continuing.
> Cannot execute this command while the selected thread is running.
>
> 2008-11-20 Andreas Schwab <schwab@suse.de>
>
> * fork-child.c (startup_inferior): Don't lose running state of
> inferior.
Thanks. Could you hold on to this a bit? This will make it so that
MI outputs more *running, *stopped notifications when going through
the shell on startup.
This a problem that can happen in several other places, and I've
been solving them with a cleanup and a new function that sets
the threads' running state (tp->state_) from the tp->executing_ property.
I'll have to clean it up a bit to submit, then we can fix this too.
>
> --- gdb/fork-child.c.~1.47.~ 2008-11-10 11:25:09.000000000 +0100
> +++ gdb/fork-child.c 2008-11-20 14:27:26.000000000 +0100
> @@ -494,6 +494,9 @@ startup_inferior (int ntraps)
> resume_ptid = pid_to_ptid (-1);
> else
> resume_ptid = event_ptid;
> + /* Update running state now, in case an error occurs during
> + resume. */
> + set_running (resume_ptid, 0);
>
> if (resume_signal != TARGET_SIGNAL_TRAP)
> {
--
Pedro Alves
prev parent reply other threads:[~2008-11-20 15:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-21 0:17 Andreas Schwab
2008-11-21 1:38 ` Pedro Alves [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=200811201518.44548.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=schwab@suse.de \
/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