Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [ping]: [PATCH] Attach discard_pending_stop_replies to observer inferior_exit
Date: Fri, 14 Dec 2012 01:57:00 -0000	[thread overview]
Message-ID: <50CA8760.20703@codesourcery.com> (raw)
In-Reply-To: <1354848657-10348-1-git-send-email-yao@codesourcery.com>

On 12/07/2012 10:50 AM, Yao Qi wrote:
> Hi,
> discard_pending_stop_replies is called in three places, remote_detach_1,
> extended_remote_mourn_1 (/w param pid) and remote_close (/w param -1).
> They will finally call observer_notify_inferior_exit in some way,
>
> remote_detach_1 >remote_mourn_1 >generic_mourn_inferior >exit_inferior >observer_notify_inferior_exit
>          extended_remote_mourn_1 >generic_mourn_inferior >exit_inferior >observer_notify_inferior_exit
> remote_close >discard_all_inferiors >exit_inferior_silent >observer_notify_inferior_exit
>
> so this inspires me that we can attach discard_pending_stop_replies
> to inferior_exit observer, and don't have to worry about the case that
> PID is -1.  This is what this patch does.  Regression tested on
> x86_64-linux with native and gdbserver.  Is it OK?
>
> gdb:
>
> 2012-12-07  Yao Qi  <yao@codesourcery.com>
>
> 	* remote.c (discard_pending_stop_replies): Remove declaration.
> 	(remote_close): Remove call discard_pending_stop_replies.
> 	(remote_detach_1, extended_remote_mourn_1): Likewise.
> 	(discard_pending_stop_replies): Change parameter from PID to
> 	INF.
> 	(_initialize_remote): Attach discard_pending_stop_replies to
> 	inferior_exit observer.

Ping.  http://sourceware.org/ml/gdb-patches/2012-12/msg00126.html

This patch is kind of a cleanup/preparatory patch for 'async remote 
notification' patch series.  This patch uses 'inferior_exit' observer to 
discard pending stop replies, which is better than the current approach 
(call discard_pending_stop_replies in different places).

-- 
Yao (齐尧)


  reply	other threads:[~2012-12-14  1:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-07  2:51 Yao Qi
2012-12-14  1:57 ` Yao Qi [this message]
2012-12-14  9:53 ` Pedro Alves
2012-12-14 13:30   ` Yao Qi
2012-12-14 13:48     ` 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=50CA8760.20703@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /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