This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Commands for a minimal GDB stub?


> 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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]