This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Commands for a minimal GDB stub?
- From: Tristan Gingold <gingold at adacore dot com>
- To: Clifford Wolf <clifford at clifford dot at>
- Cc: gdb at sourceware dot org
- Date: Tue, 24 Nov 2015 14:51:49 +0100
- Subject: Re: Commands for a minimal GDB stub?
- Authentication-results: sourceware.org; auth=none
- References: <20151124133817 dot GA10033 at clifford dot at>
> On 24 Nov 2015, at 14:38, Clifford Wolf <clifford@clifford.at> wrote:
>
> Hi,
>
> 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:
>
> https://sourceware.org/gdb/onlinedocs/gdb/Overview.html
>
> 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):
[â]
> 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..
>
> 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ât be very far from having a communication.
Tristan.