From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 3/8] Set general_thread after restart
Date: Thu, 23 Jul 2015 22:58:00 -0000 [thread overview]
Message-ID: <55B1718B.10100@redhat.com> (raw)
In-Reply-To: <1437392126-29503-4-git-send-email-yao.qi@linaro.org>
On 07/20/2015 12:35 PM, Yao Qi wrote:
> When I run gdb.server/ext-restart.exp, I get the following GDB internal
> error,
>
> run^M
> The program being debugged has been started already.^M
> Start it from the beginning? (y or n) y^M
> Sending packet: $vKill;53c5#3d...Packet received: OK^M
> Packet vKill (kill) is supported^M
> Sending packet: $vFile:close:6#b6...Packet received: F0^M
> Sending packet: $vFile:close:3#b3...Packet received: F0^M
> Starting program: /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/gdb.server/ext-restart ^M
> Sending packet: $QDisableRandomization:1#cf...Packet received: OK^M
> Sending packet: $R0#82...Sending packet: $qC#b4...Packet received: QCp53c5.53c5^M <-- [1]
> Sending packet: $qAttached:53c5#c9...Packet received: E01^M
> warning: Remote failure reply: E01^M
Curious. Kevin's original patch to handle bogus qC replies would
have hidden this bug.
Plus, today I wrote a patch that exposed a bunch of stale
general_thread issues (but not this one).
Funny how sometimes we all end up staring at the same things
at the same time.
>
> /* Wait till we are at 1st instruction in prog. */
> if (program_argv != NULL)
> - start_inferior (program_argv);
> + {
> + start_inferior (program_argv);
> + general_thread = last_ptid;
> + }
I think this should be:
if (last_status.kind == TARGET_WAITKIND_STOPPED)
{
/* Stopped at the first instruction of the target process. */
general_thread = last_ptid;
}
else
{
/* Something went wrong. */
general_thread = null_ptid;
}
> +# Test running programs using extended-remote.
Comment looks stale. Looks like I missed pointing out the same
in patch #2.
Otherwise looks good to me.
(I think it's likely we have lots of stale-data bugs on the
gdb side after R, as we don't resync much. It previously crossed my mind
that immediately after sending R, gdb should refresh all its
remote state anew, like if it had just disconnected and then reconnected.
That is, do most of what remote_start_remote does, except the
connection-specific details (qSupported, etc.)
Hard to justify the effort though -- I don't think I ever worked with
a stub that relies on R.)
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-07-23 22:58 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 11:35 [PATCH 0/8] Fix various issues in --wrapper in GDBserver Yao Qi
2015-07-20 11:35 ` [PATCH 1/8] Disallow using --attach and --wrapper together Yao Qi
2015-07-23 22:29 ` Pedro Alves
2015-07-24 8:44 ` Yao Qi
2015-07-24 8:51 ` Pedro Alves
2015-07-20 11:35 ` [PATCH 2/8] Test --wrapper in extended-remote Yao Qi
2015-07-23 22:35 ` Pedro Alves
2015-07-20 11:35 ` [PATCH 4/8] Test --wrapper when restarting process Yao Qi
2015-07-23 22:59 ` Pedro Alves
2015-07-20 11:36 ` [PATCH 7/8] Initialise target descrption after skipping extra traps for --wrapper Yao Qi
2015-07-23 23:26 ` Pedro Alves
2015-07-24 11:12 ` Yao Qi
2015-07-24 11:52 ` Pedro Alves
2015-07-24 13:08 ` Yao Qi
2015-07-24 13:44 ` Pedro Alves
2015-07-20 11:36 ` [PATCH 5/8] Refactor start_inferior Yao Qi
2015-07-23 23:27 ` Pedro Alves
2015-07-20 11:36 ` [PATCH 6/8] Set proc->priv->new_inferior out of linux_add_process Yao Qi
2015-07-23 23:26 ` Pedro Alves
2015-07-20 11:36 ` [PATCH 3/8] Set general_thread after restart Yao Qi
2015-07-23 22:58 ` Pedro Alves [this message]
2015-07-24 9:33 ` Yao Qi
2015-07-24 9:53 ` Pedro Alves
2015-07-24 11:31 ` Yao Qi
2015-07-20 11:36 ` [PATCH 8/8] Remove proc->priv->new_inferior Yao Qi
2015-07-23 23:27 ` Pedro Alves
2015-07-24 13:49 ` [PATCH 0/8] Fix various issues in --wrapper in GDBserver Yao Qi
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=55B1718B.10100@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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