Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
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: Mon, 18 Mar 2013 02:09:00 -0000	[thread overview]
Message-ID: <51467302.6010600@codesourcery.com> (raw)
In-Reply-To: <20130315195451.GB19841@host2.jankratochvil.net>

On 03/16/2013 03:54 AM, Jan Kratochvil wrote:
>> 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.
> OK; but one should remove pop_target later, there remain only few uses of it.
> When its use is not incorrect it is at least fragile/dangerous.
>

Jan,
I can imagine that using pop_target is fragile in general, but is it 
fragile/dangerous to use pop_target in remote_open_1?  IMO, pop_target 
naturally fits the needs there (push target on stack -> setting up -> 
pop target out of stack on error).  pop_target is also used in 
tracepoint.c:tfile_open, which is similar to this case.

The rest of this patch looks right to me.

-- 
Yao (齐尧)


  reply	other threads:[~2013-03-18  1:52 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
2013-03-15 22:29   ` Jan Kratochvil
2013-03-18  2:09     ` Yao Qi [this message]
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=51467302.6010600@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