From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29943 invoked by alias); 19 Sep 2014 16:16:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 29848 invoked by uid 89); 19 Sep 2014 16:16:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 19 Sep 2014 16:16:27 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8JGGPcl003914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Sep 2014 12:16:25 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8JGGNF5031089; Fri, 19 Sep 2014 12:16:24 -0400 Message-ID: <541C56D7.3070505@redhat.com> Date: Fri, 19 Sep 2014 16:16:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Gary Benson , gdb-patches@sourceware.org CC: Doug Evans Subject: Re: [PATCH 1/3] Rename target_{stop,continue}_ptid References: <1411034346-868-1-git-send-email-gbenson@redhat.com> <1411034346-868-2-git-send-email-gbenson@redhat.com> In-Reply-To: <1411034346-868-2-git-send-email-gbenson@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-09/txt/msg00632.txt.bz2 On 09/18/2014 10:59 AM, Gary Benson wrote: > This commit renames target_stop_ptid as target_stop_and_wait and > target_continue_ptid as target_continue_no_signal. Comments are > updated to more fully describe the functions' behaviour. > > gdb/ChangeLog: > > * target/target.h (target_stop_ptid): Renamed as... > (target_stop_and_wait): New function. Updated comment. > All uses updated. > (target_continue_ptid): Renamed as... > (target_continue_no_signal): New function. Updated comment. > All uses updated. Fine with me. > --- > gdb/ChangeLog | 9 +++++++++ > gdb/common/agent.c | 4 ++-- > gdb/gdbserver/target.c | 4 ++-- > gdb/target.c | 4 ++-- > gdb/target/target.h | 16 +++++++++------- > 5 files changed, 24 insertions(+), 13 deletions(-) > > diff --git a/gdb/common/agent.c b/gdb/common/agent.c > index 854a997..0c3d7a3 100644 > --- a/gdb/common/agent.c > +++ b/gdb/common/agent.c > @@ -204,7 +204,7 @@ agent_run_command (int pid, const char *cmd, int len) > DEBUG_AGENT ("agent: resumed helper thread\n"); > > /* Resume helper thread. */ > - target_continue_ptid (ptid); > + target_continue_no_signal (ptid); > > fd = gdb_connect_sync_socket (pid); > if (fd >= 0) > @@ -238,7 +238,7 @@ agent_run_command (int pid, const char *cmd, int len) > { > /* Stop thread PTID. */ > DEBUG_AGENT ("agent: stop helper thread\n"); > - target_stop_ptid (ptid); > + target_stop_and_wait (ptid); > } > > if (fd >= 0) > diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c > index c95b2f0..d63e211 100644 > --- a/gdb/gdbserver/target.c > +++ b/gdb/gdbserver/target.c > @@ -137,7 +137,7 @@ mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options, > /* See target/target.h. */ > > void > -target_stop_ptid (ptid_t ptid) > +target_stop_and_wait (ptid_t ptid) > { > struct target_waitstatus status; > int was_non_stop = non_stop; > @@ -156,7 +156,7 @@ target_stop_ptid (ptid_t ptid) > /* See target/target.h. */ > > void > -target_continue_ptid (ptid_t ptid) > +target_continue_no_signal (ptid_t ptid) > { > struct thread_resume resume_info; > > diff --git a/gdb/target.c b/gdb/target.c > index 339b1d1..c1b5182 100644 > --- a/gdb/target.c > +++ b/gdb/target.c > @@ -3030,7 +3030,7 @@ target_stop (ptid_t ptid) > /* See target/target.h. */ > > void > -target_stop_ptid (ptid_t ptid) > +target_stop_and_wait (ptid_t ptid) > { > struct target_waitstatus status; > int was_non_stop = non_stop; > @@ -3047,7 +3047,7 @@ target_stop_ptid (ptid_t ptid) > /* See target/target.h. */ > > void > -target_continue_ptid (ptid_t ptid) > +target_continue_no_signal (ptid_t ptid) > { > target_resume (ptid, 0, GDB_SIGNAL_0); > } > diff --git a/gdb/target/target.h b/gdb/target/target.h > index 99a7966..c8b9c80 100644 > --- a/gdb/target/target.h > +++ b/gdb/target/target.h > @@ -59,15 +59,17 @@ extern int target_read_uint32 (CORE_ADDR memaddr, uint32_t *result); > extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr, > ssize_t len); > > -/* Make target stop in a continuable fashion. (For instance, under > - Unix, this should act like SIGSTOP). This function must be > - provided by the client. */ > +/* Cause the target to stop in a continuable fashion--for instance, > + under Unix, this should act like SIGSTOP--and wait for the target > + to be stopped before returning. This function must be provided by > + the client. */ > > -extern void target_stop_ptid (ptid_t ptid); > +extern void target_stop_and_wait (ptid_t ptid); > > -/* Restart a target that was previously stopped by target_stop_ptid. > - This function must be provided by the client. */ > +/* Restart a target previously stopped by target_stop_and_wait. > + No signal is delivered to the target. This function must be > + provided by the client. */ > > -extern void target_continue_ptid (ptid_t ptid); > +extern void target_continue_no_signal (ptid_t ptid); > > #endif /* TARGET_COMMON_H */ > Thanks, Pedro Alves