From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103207 invoked by alias); 11 Sep 2018 20:57:54 -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 103196 invoked by uid 89); 11 Sep 2018 20:57:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,KAM_LOTSOFHASH,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=suspected, ack, SYSTEM, qc X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Sep 2018 20:57:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A5970117B9E; Tue, 11 Sep 2018 16:57:49 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JdYaeZZOndOc; Tue, 11 Sep 2018 16:57:49 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id DF1D2117B9B; Tue, 11 Sep 2018 16:57:48 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 74E0783AD3; Tue, 11 Sep 2018 22:57:42 +0200 (CEST) Date: Tue, 11 Sep 2018 20:57:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org, Jerome Guitton Subject: Re: [RFA] arm-pikeos: software single step Message-ID: <20180911205742.GB12573@adacore.com> References: <1536592407-13448-1-git-send-email-brobecker@adacore.com> <808bd91f-3ad3-9a42-bc04-ac42835fceb9@redhat.com> <20180911110417.GB3379@adacore.com> <15fd4c1d-d265-073d-a4d8-14de3d607a44@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15fd4c1d-d265-073d-a4d8-14de3d607a44@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-SW-Source: 2018-09/txt/msg00345.txt.bz2 Hi again Pedro, > > Unfortunately, the problem is that we do not control the stub (muxa), > > it is a tool that the vendor provides. > > Did you check whether it is already reporting the RSP packets as I > had suggested? We wouldn't be adding new packets, but instead using > some that are already defined. > > If the stub really needs modification, I'm not opposed to your patch > as stop gap. Would there be any chance to forward the information to > the sysgo folks, see if they're willing to tweak the stub? It should > be a trivial change. So, here is what I could gather (full log at the end of this email [1]). GDB sends the $qSupported packet, equiring about support... | Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Ack ... and the list returned is fairly small, as I suspected: | Packet received: qXfer:features:read+ After that, I don't see very much happening at the vCont level, so fast-forward to the first "cont" command (after having inserted a breakpoint), and we see some interesting stuff. In particular, GDB asks the target what vCont support it provides, and here is what we receive: | Sending packet: $vCont?#49...Ack | Packet received: vCont;c;s;C;S | Packet vCont (verbose-resume) is supported Hah! So, on the one end, the stub says stepping is supported ('s' and 'S'), but on the other hand we were told that this feature is not supported on ARM. So, if I understand correctly the current situation, we do have one small infrastructure adjustment to do in GDB, but then once done, if the stub on advertised support for "vCont;c;C", then GDB would automatically be switching to software single step. Do I understand correctly? If that's correct, I'll make sure AdaCore forwards the suggestion to Sysgo. Thanks! -- Joel [1] For the record, complete copy/paste of a short "target remote" + "break xxx" + "cont" + "next" session, just for the record. | (gdb) tar rem :1502 | Remote debugging using :1502 | Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Ack | Packet received: qXfer:features:read+ | Packet qSupported (supported-packets) is supported | Sending packet: $vMustReplyEmpty#3a...Ack | Packet received: | Sending packet: $Hg0#df...Ack | Packet received: OK | Sending packet: $qXfer:features:read:target.xml:0,18a#15...Ack | Packet received: m\n\n\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n\n\n\n\n\n | Sending packet: $qTStatus#49...Ack | Packet received: | Packet qTStatus (trace-status) is NOT supported | Sending packet: $?#3f...Ack | Packet received: S05 | Sending packet: $qfThreadInfo#bb...Ack | Packet received: m1 | Sending packet: $qsThreadInfo#c8...Ack | Packet received: l | Sending packet: $qAttached#8f...Ack | Packet received: | Packet qAttached (query-attached) is NOT supported | Sending packet: $Hc-1#09...Ack | Packet received: OK | Sending packet: $qC#b4...Ack | Packet received: QC1 | Sending packet: $qOffsets#4b...Ack | Packet received: | Sending packet: $g#67...Ack | Packet received: 01000000e07b0f08c47b0f082014030800000000000000000000000000000000000000000000000000000000fc7f0f0800000000987f0f083c040108502a0108100000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[144 bytes omitted] | Sending packet: $m8018748,4#41...Ack | Packet received: 1eff2fe1 | Sending packet: $qfThreadInfo#bb...Ack | Packet received: m1 | Sending packet: $qsThreadInfo#c8...Ack | Packet received: l | Sending packet: $m8012a50,4#5e...Ack | Packet received: 700020e1 | gdbarch_breakpoint () at arm-gdbstub.c:290 | 290 arm-gdbstub.c: No such file or directory. | Sending packet: $qSymbol::#5b...Ack | Packet received: | Packet qSymbol (symbol-lookup) is NOT supported | (gdb) b test_simple | Sending packet: $m8010500,40#5b...Ack | Packet received: 00b08de200f020e300d08be204b09de41eff2fe104b02de500b08de200f020e300d08be204b09de41eff2fe100482de904b08de230d04de20030a0e308300be5 | Sending packet: $m8010538,4#36...Ack | Packet received: 0030a0e3 | Breakpoint 1 at 0x8010538: file simple.adb, line 16. | (gdb) cont | Continuing. | Sending packet: $Z0,8010538,4#7f...Ack | Packet received: | Packet Z0 (software-breakpoint) is NOT supported | Sending packet: $m8010538,4#36...Ack | Packet received: 0030a0e3 | Sending packet: $X8010538,0:#57...Ack | Packet received: | binary downloading NOT supported by target | Sending packet: $M8010538,4:fedeffe7#4c...Ack | Packet received: OK | Sending packet: $vCont?#49...Ack | Packet received: vCont;c;s;C;S | Packet vCont (verbose-resume) is supported | Sending packet: $vCont;c#a8...Ack | Packet received: T050f:38050108;0d:407f0f08;thread:1; | Sending packet: $qfThreadInfo#bb...Ack | Packet received: m1 | Sending packet: $qsThreadInfo#c8...Ack | Packet received: l | Sending packet: $M8010538,4:0030a0e3#3c...Ack | Packet received: OK | | Breakpoint 1, Sending packet: $m8010538,4#36...Ack | Packet received: 0030a0e3 | simple.test_simple () at simple.adb:16 | 16 A : Integer := 0; | (gdb) n | Sending packet: $g#67...Ack | Packet received: 4851020860510208010000004450020800000000000000000000000000000000000000000000000000000000747f0f0825000000407f0f08b405010838050108100000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[144 bytes omitted] | Sending packet: $m8018748,4#41...Ack | Packet received: 1eff2fe1 | Sending packet: $M8018748,4:fedeffe7#57...Ack | Packet received: OK | Sending packet: $m8010538,4#36...Ack | Packet received: 0030a0e3 | Sending packet: $m8010538,4#36...Ack | Packet received: 0030a0e3 | Sending packet: $m801053c,4#61...Ack | Packet received: 08300be5 | Sending packet: $m8010538,4#36...Ack | Packet received: 0030a0e3 | Sending packet: $m8010538,4#36...Ack | Packet received: 0030a0e3 | Sending packet: $m8010538,4#36...Ack | Packet received: 0030a0e3 | Sending packet: $m801053c,4#61...Ack | Packet received: 08300be5 | Sending packet: $M801053c,4:fedeffe7#77...Ack | Packet received: OK | Sending packet: $vCont;c:1#13...Ack | Packet received: T050f:3c050108;0d:407f0f08;thread:1; | Sending packet: $M801053c,4:08300be5#72...Ack | Packet received: OK | Sending packet: $m8010538,4#36...Ack | Packet received: 0030a0e3 | Sending packet: $M8010538,4:fedeffe7#4c...Ack | Packet received: OK | Sending packet: $g#67...Ack | Packet received: 4851020860510208010000000000000000000000000000000000000000000000000000000000000000000000747f0f0825000000407f0f08b40501083c050108100000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[144 bytes omitted] | Sending packet: $m801053c,4#61...Ack | Packet received: 08300be5 | Sending packet: $m801053c,4#61...Ack | Packet received: 08300be5 | Sending packet: $m8010540,4#2f...Ack | Packet received: 0030a0e3 | Sending packet: $m801053c,4#61...Ack | Packet received: 08300be5 | Sending packet: $m801053c,4#61...Ack | Packet received: 08300be5 | Sending packet: $m801053c,4#61...Ack | Packet received: 08300be5 | Sending packet: $m8010540,4#2f...Ack | Packet received: 0030a0e3 | Sending packet: $M8010540,4:fedeffe7#45...Ack | Packet received: OK | Sending packet: $vCont;c#a8...Ack | Packet received: T050f:40050108;0d:407f0f08;thread:1; | Sending packet: $M8010540,4:0030a0e3#35...Ack | Packet received: OK | Sending packet: $m8010540,4#2f...Ack | Packet received: 0030a0e3 | Sending packet: $g#67...Ack | Packet received: 4851020860510208010000000000000000000000000000000000000000000000000000000000000000000000747f0f0825000000407f0f08b405010840050108100000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[144 bytes omitted] | Sending packet: $M8018748,4:1eff2fe1#eb...Ack | Packet received: OK | Sending packet: $qfThreadInfo#bb...Ack | Packet received: m1 | Sending packet: $qsThreadInfo#c8...Ack | Packet received: l | Sending packet: $M8010538,4:0030a0e3#3c...Ack | Packet received: OK | 17 B : Float := 0.0;