From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10225 invoked by alias); 9 Aug 2016 19:28:18 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 10216 invoked by uid 89); 9 Aug 2016 19:28:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MIME_BASE64_BLANKS,SPF_PASS autolearn=ham version=3.3.2 spammy=Individual, notifications, Hx-languages-length:1299, GDB's X-HELO: esa5.dell-outbound.iphmx.com Received: from Unknown (HELO esa5.dell-outbound.iphmx.com) (68.232.153.95) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 09 Aug 2016 19:28:08 +0000 Received: from mailuogwhop.emc.com ([168.159.213.141]) by esa5.dell-outbound.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Aug 2016 14:28:00 -0500 Received: from maildlpprd05.lss.emc.com (maildlpprd05.lss.emc.com [10.253.24.37]) by mailuogwprd04.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u79JRvJ0025457 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 9 Aug 2016 15:27:59 -0400 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com u79JRvJ0025457 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd04.lss.emc.com u79JRvJ0025457 Received: from mailusrhubprd51.lss.emc.com (mailusrhubprd51.lss.emc.com [10.106.48.24]) by maildlpprd05.lss.emc.com (RSA Interceptor); Tue, 9 Aug 2016 15:26:27 -0400 Received: from MXHUB230.corp.emc.com (MXHUB230.corp.emc.com [10.253.68.100]) by mailusrhubprd51.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id u79JRdp7013774 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=FAIL); Tue, 9 Aug 2016 15:27:40 -0400 Received: from MX203CL03.corp.emc.com ([fe80::4dee:b763:b476:8fbc]) by MXHUB230.corp.emc.com ([10.253.68.100]) with mapi id 14.03.0266.001; Tue, 9 Aug 2016 15:27:39 -0400 From: "taylor, david" To: Michael Eager , "gdb@sourceware.org" Subject: RE: Remote Serial Protocol -- reply to '?' when target running Date: Tue, 09 Aug 2016 19:28:00 -0000 Message-ID: <63F1AEE13FAE864586D589C671A6E18B06C4AB@MX203CL03.corp.emc.com> References: <57AA13FC.2000707@eagerm.com> <63F1AEE13FAE864586D589C671A6E18B06C467@MX203CL03.corp.emc.com> <57AA2A19.2030509@eagerm.com> In-Reply-To: <57AA2A19.2030509@eagerm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd51.lss.emc.com X-RSA-Classifications: public X-SW-Source: 2016-08/txt/msg00010.txt.bz2 DQo+IEZyb206IE1pY2hhZWwgRWFnZXIgW21haWx0bzplYWdlckBlYWdlcm0u Y29tXQ0KPiBTZW50OiBUdWVzZGF5LCBBdWd1c3QgMDksIDIwMTYgMzowOCBQ TQ0KPiBUbzogdGF5bG9yLCBkYXZpZDsgZ2RiQHNvdXJjZXdhcmUub3JnDQo+ IFN1YmplY3Q6IFJlOiBSZW1vdGUgU2VyaWFsIFByb3RvY29sIC0tIHJlcGx5 IHRvICc/JyB3aGVuIHRhcmdldCBydW5uaW5nDQo+IA0KPiBPbiAwOC8wOS8y MDE2IDExOjQwIEFNLCB0YXlsb3IsIGRhdmlkIHdyb3RlOg0KPiA+PiBGcm9t OiBnZGItb3duZXJAc291cmNld2FyZS5vcmcgW21haWx0bzpnZGItb3duZXJA c291cmNld2FyZS5vcmddDQo+IE9uDQo+ID4+IEJlaGFsZiBP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BhbHNvIGEgbmV0d29ya2luZyB0aHJlYWQgYW5kIGEg YnVuY2ggb2Ygb3RoZXIgdGhyZWFkcy4NCg0KT3VyIHRhcmdldCBuZXZlciBz dG9wcy4gIEluZGl2aWR1YWwgdGhyZWFkcz8gIFllcy4gIFRoZSB0YXJnZXQg YXMgYSB3aG9sZT8gIE5vLg0K >From gdb-return-45216-listarch-gdb=sources.redhat.com@sourceware.org Tue Aug 09 19:31:49 2016 Return-Path: Delivered-To: listarch-gdb@sources.redhat.com Received: (qmail 21639 invoked by alias); 9 Aug 2016 19:31:49 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Delivered-To: mailing list gdb@sourceware.org Received: (qmail 21622 invoked by uid 89); 9 Aug 2016 19:31:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=HTo:D*nz, HTo:D*co.nz, McMullin, mcmullin X-HELO: homiemail-a43.g.dreamhost.com Received: from sub5.mail.dreamhost.com (HELO homiemail-a43.g.dreamhost.com) (208.113.200.129) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 09 Aug 2016 19:31:39 +0000 Received: from homiemail-a43.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a43.g.dreamhost.com (Postfix) with ESMTP id 4BF0B6002637; Tue, 9 Aug 2016 12:31:37 -0700 (PDT) Received: from vm-fedora21.eagercon.com (c-71-202-23-94.hsd1.ca.comcast.net [71.202.23.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by homiemail-a43.g.dreamhost.com (Postfix) with ESMTPSA id 254DE6002631; Tue, 9 Aug 2016 12:31:37 -0700 (PDT) Subject: Re: Remote Serial Protocol -- reply to '?' when target running To: Gareth McMullin References: <57AA13FC.2000707@eagerm.com> Cc: "gdb@sourceware.org" From: Michael Eager Message-ID: <57AA2F98.90002@eagerm.com> Date: Tue, 09 Aug 2016 19:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00011.txt.bz2 Content-length: 2167 On 08/09/2016 12:14 PM, Gareth McMullin wrote: > On Wed, Aug 10, 2016 at 5:33 AM, Michael Eager wrote: >> >> When gdb connects to a remote target, it asks about >> features, and then sends a '?' packet, asking why the >> target is stopped. When the target connection is through >> a JTAG pod, the pod may be able to respond to the feature >> request, but not be able to determine what the current state of >> the target is, likely because it is not stopped. What should a >> JTAG pod reply in this case? >> >> The GDB Remote Protocol doc doesn't seem to be entirely consistent. >> >> The description for '?' is >> Indicate the reason the target halted. The reply is the >> same as for step and continue. >> >> The description for Stop Reply Packet says the following: >> The =E2=80=98C=E2=80=99, =E2=80=98c=E2=80=99, =E2=80=98S=E2=80=99, = =E2=80=98s=E2=80=99, =E2=80=98vCont=E2=80=99, =E2=80=98vAttach=E2=80=99, = =E2=80=98vRun=E2=80=99, =E2=80=98vStopped=E2=80=99, >> and =E2=80=98?=E2=80=99 packets can receive any of the below as a rep= ly. Except >> for =E2=80=98?=E2=80=99 and =E2=80=98vStopped=E2=80=99, that reply is= only returned when the >> target halts. >> >> This suggests that the target can reply to '?' even if it is not >> stopped, which seems to contradict the description for '?'. But >> none of the listed replies seem to be appropriate. None of the >> replies look like "Don't bother me, I'm busy". >> >> How should the JTAG pod respond? What do most do in this situation? > > I can't comment on others, but the Black Magic debug project that I maint= ain [1] > implements the extended-remote prototcol, and initially responds to > '?' with 'W00' indicating > the target exited (there is no attached target). The user initiates a > scan for connected > targets with 'monitor jtag_scan' from GDB, and then uses the GDB > 'attach' command > to connect, sending the 'vAttach' packet. This interrupts the target > and the reply comes > back as 'T05'. > > [1] https://github.com/blacksphere/blackmagic Thanks. --=20 Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077