Re: Commands for a minimal GDB stub?
Tristan Gingold <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
> On 24 Nov 2015, at 14:38, Clifford Wolf <[email protected]> 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.