From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44572 invoked by alias); 30 Nov 2015 18:25:44 -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 44558 invoked by uid 89); 30 Nov 2015 18:25:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Mon, 30 Nov 2015 18:25:43 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id F1753C0B7AD6; Mon, 30 Nov 2015 18:25:41 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAUIPec1028443; Mon, 30 Nov 2015 13:25:41 -0500 Message-ID: <565C94A4.5090005@redhat.com> Date: Mon, 30 Nov 2015 18:25:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 06/18] New vCtrlC packet, non-stop mode equivalent of \003 References: <1444836486-25679-1-git-send-email-palves@redhat.com> <1444836486-25679-7-git-send-email-palves@redhat.com> <86io5t26rr.fsf@gmail.com> In-Reply-To: <86io5t26rr.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg00609.txt.bz2 I see now that I never responded to this one... On 10/26/2015 11:44 AM, Yao Qi wrote: > Pedro Alves writes: > >> gdb/ >> 2015-10-14 Pedro Alves >> >> * NEWS (New remote packets): Mention vCtrlC. >> >> gdb/doc/ >> 2015-10-14 Pedro Alves >> >> * gdb.texinfo (Bootstrapping): Add >> "interrupting remote targets" anchor. >> (Packets): Document vCtrlC. >> >> gdb/gdbserver/ >> 2015-10-14 Pedro Alves >> >> * server.c (handle_v_requests): Handle vCtrlC. > > These entries below should be hoisted above to gdb/ChangeLog, Whoops, indeed. > >> * remote.c (PACKET_vCtrlC): New enum value. >> (async_remote_interrupt): Call target_interrupt instead of >> target_stop. >> (remote_interrupt_as): Remove 'ptid' parameter. >> (remote_interrupt_ns): New function. >> (remote_stop): Adjust. >> (remote_interrupt): If the target is in non-stop mode, try >> interrupting with vCtrlC. >> (initialize_remote): Install set remote ctrl-c packet. >> --- >> gdb/NEWS | 4 ++++ >> gdb/doc/gdb.texinfo | 34 +++++++++++++++++++++++---- >> gdb/gdbserver/server.c | 7 ++++++ >> gdb/remote.c | 64 ++++++++++++++++++++++++++++++++++++++++++++------ >> 4 files changed, 98 insertions(+), 11 deletions(-) >> > >> >> +/* Non-stop version of target_interrupt. Uses `vCtrlC' to interrupt >> + the remote target. It is undefined which thread of which process >> + reports the interrupt. */ >> + > > We need to document the return value of this function in comments. I've added this: diff --git i/gdb/remote.c w/gdb/remote.c index ae8c708..7256c23 100644 --- i/gdb/remote.c +++ w/gdb/remote.c @@ -5709,7 +5709,8 @@ remote_interrupt_as (void) /* Non-stop version of target_interrupt. Uses `vCtrlC' to interrupt the remote target. It is undefined which thread of which process - reports the interrupt. */ + reports the interrupt. Returns true if the packet is supported by + the server, false otherwise. */ static int remote_interrupt_ns (void) > Patch looks good to me otherwise. Thanks, Pedro Alves