From: Yao Qi <yao@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: <gdb-patches@sourceware.org>,
"Metzger, Markus T" <markus.t.metzger@intel.com>
Subject: Re: [patch] Fix remote.c incorrectly using pop_target (wrt btrace)
Date: Tue, 12 Mar 2013 10:05:00 -0000 [thread overview]
Message-ID: <513EFD81.6050401@codesourcery.com> (raw)
In-Reply-To: <20130311172836.GA22575@host2.jankratochvil.net>
On 03/12/2013 01:28 AM, Jan Kratochvil wrote:
> @@ -4348,7 +4344,7 @@ remote_open_1 (char *name, int from_tty,
> /* Pop the partially set up target - unless something else did
> already before throwing the exception. */
> if (remote_desc != NULL)
> - pop_target ();
> + remote_unpush_target ();
Since it is in remote_open_1, the remote target or exteneded-remote
target is just pushed and top most, so pop_target should be fine here.
It is not necessary to change it to remote_unpush_target.
> if (target_async_permitted)
> wait_forever_enabled_p = 1;
> throw_exception (ex);
> @@ -5096,7 +5092,7 @@ interrupt_query (void)
> if (query (_("Interrupted while waiting for the program.\n\
> Give up (and stop debugging it)? ")))
> {
> - pop_target ();
> + remote_unpush_target ();
> deprecated_throw_reason (RETURN_QUIT);
> }
> }
> @@ -7051,11 +7047,11 @@ readchar (int timeout)
> switch ((enum serial_rc) ch)
> {
> case SERIAL_EOF:
> - pop_target ();
> + remote_unpush_target ();
Supposing we are in 'record-btrace' target and get a communication
error, the current target stack looks like:
record-btrace
remote
exec
none
remote_unpush_target will unpush or remove the remote target in the
stack. So the stack is changed to:
record-btrace
exec
none
Is it what we want? When GDB is in record-btrace target, and get some
errors in communication, both record-btrace and remote target should be
popped from the stack.
--
Yao (é½å°§)
next prev parent reply other threads:[~2013-03-12 10:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 17:29 Jan Kratochvil
2013-03-11 17:46 ` Joel Brobecker
2013-03-12 10:05 ` Yao Qi [this message]
2013-03-15 22:29 ` Jan Kratochvil
2013-03-18 2:09 ` Yao Qi
2013-03-22 19:28 ` Pedro Alves
2013-03-22 20:31 ` [commit+7.6] " Jan Kratochvil
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=513EFD81.6050401@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=markus.t.metzger@intel.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