From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47019 invoked by alias); 19 Oct 2018 13:40:31 -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 47001 invoked by uid 89); 19 Oct 2018 13:40:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Metal, D*ca, stepping, unrecognized 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 ESMTP; Fri, 19 Oct 2018 13:40:29 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D64130224BA; Fri, 19 Oct 2018 13:40:28 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB88D5D77C; Fri, 19 Oct 2018 13:40:27 +0000 (UTC) Subject: Re: gdb ignoring vCont supported commands To: Bill Morgan References: <0eeb55ca-d4e1-4db4-e601-74ca7e1151e2@redhat.com> <11b018ef2ea200e314dbce95f424eb6c@polymtl.ca> Cc: Simon Marchi , gdb@sourceware.org From: Pedro Alves Message-ID: <1b531704-d9a0-3024-5bb9-7e26d2a6fcc4@redhat.com> Date: Fri, 19 Oct 2018 13:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-10/txt/msg00040.txt.bz2 On 10/09/2018 10:33 PM, Bill Morgan wrote: > On Tue, Oct 9, 2018 at 4:16 PM Bill Morgan > wrote: > >> >> >> On Tue, Oct 9, 2018 at 4:12 PM Pedro Alves wrote: >> >>> On 10/09/2018 09:29 PM, Bill Morgan wrote: >>>> On Tue, Oct 9, 2018 at 3:16 PM Simon Marchi >>> wrote: >>>> >>>>> On 2018-10-09 16:12, Bill Morgan wrote: >>>>>> I get a warning that vContSupported is unrecognized: >>>>>> >>>>>> Sending packet: >>>>>> >>>>> >>> $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df...Ack >>>>>> Packet received: >>>>>> >>>>> >>> PacketSize=3fff;QPassSignals+;qXfer:features:read+;qXfer:threads:read+;vContSupported >>>>>> Packet qSupported (supported-packets) is supported >>>>>> warning: unrecognized item "vContSupported" in "qSupported" response >>>>> >>>>> I believe you are missing the + after vContSupported. >>>>> >>>>> You are correct, I was missing the +. Thank you. >>>> >>>> So it is now recognizing the vContSupported, but it is still sending >>>> vCont;s >>>> >>> >>> Argh, I forgot that this only really works on ARM GNU/Linux. >>> What is your target? >>> >> >> Custom OS on ARM. >> >> This is what I'm reporting to GDB: >> >> Sending packet: $qXfer:features:read:target.xml:0,fff#7d...Ack >> Packet received: larm >> >> >> >>> >>> We're missing the small infrastructure change in GDB >>> mentioned in the discussion I linked before. >>> >> > What does GDB need to know about my OS for using software breakpoints for > stepping? From looking at this document: > http://infocenter.arm.com/help/topic/com.arm.doc.ihi0036b/IHI0036B_bsabi.pdf > I'd be using the ARM Architecture Procedure Call Standard and probably be > considered Bare Metal. Although I have some ELF processes loaded and > running, I think that should be opaque to GDB though. My stub switches MMU > TTB as necessary for writing the software breakpoints to memory. > > Could I report an existing OS to GDB? You could try using a --target=arm-linux-gnu GDB (or an --enablet-targets=all) build, and forcing GNU/Linux ABI, with "set osabi GNU/Linux". I think that should be enough. If that works, you could also report that automatically in the tdesc, with: GNU/Linux Of course, that's a hack. As discussed on the other thread, GDB should be able to fallback to software single-step automatically. With the hack, some things might not work correctly, as GDB will be assuming a GNU/Linux environment in your target. But maybe it's still good enough. Thanks, Pedro Alves