From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128909 invoked by alias); 24 Nov 2015 13:51:54 -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 128893 invoked by uid 89); 24 Nov 2015 13:51:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 24 Nov 2015 13:51:53 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 11F87352829E; Tue, 24 Nov 2015 14:51:50 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0ig1pUbfHTzE; Tue, 24 Nov 2015 14:51:50 +0100 (CET) Received: from dhcp-guest-231.act-europe.fr (dhcp-guest-231.act-europe.fr [10.10.127.231]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id F293A3528285; Tue, 24 Nov 2015 14:51:49 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: Commands for a minimal GDB stub? From: Tristan Gingold In-Reply-To: <20151124133817.GA10033@clifford.at> Date: Tue, 24 Nov 2015 13:51:00 -0000 Cc: gdb@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20151124133817.GA10033@clifford.at> To: Clifford Wolf X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00038.txt.bz2 > On 24 Nov 2015, at 14:38, Clifford Wolf wrote: >=20 > Hi, >=20 > I'm trying to write a minimal GDB stub. The documentation states that it = is > sufficient to implement the g, G, m, M, c, and s commands and that $#00 > should be returned for any command not supported by the stub: >=20 > https://sourceware.org/gdb/onlinedocs/gdb/Overview.html >=20 > I've now started by implementing a minimal stub that just returns $#00 to > everything. This is the conversation my stub is having with gdb (not > showing the '+' acknowledgments, '->' for packets from gdb and '<-' for > packets from my stub): [=E2=80=A6] > I did compare that to what I record when gdb is talking to gdbserver, and > the general syntax seems to be the same, meaning I don't think I have > screwed up implementing the low-level protocol.. >=20 > Is the documentation correct and I only need to implement g, G, m, M, c, > and s? If so: What did I do wrong? I think the documentation is slightly incorrect. For an almost minimal gdb stub, I have also implemented: ?, z, Z, qSupported, qC, qSymbol::, P, k, H z, Z, H, k, qSupported returned $#00. You shouldn=E2=80=99t be very far from having a communication. Tristan.