From: Tristan Gingold <gingold@adacore.com>
To: Clifford Wolf <clifford@clifford.at>
Cc: gdb@sourceware.org
Subject: Re: Commands for a minimal GDB stub?
Date: Tue, 24 Nov 2015 13:51:00 -0000 [thread overview]
Message-ID: <F6089B0E-C497-44B1-B184-715BF1E8BE44@adacore.com> (raw)
In-Reply-To: <20151124133817.GA10033@clifford.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.
next prev parent reply other threads:[~2015-11-24 13:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 13:38 Clifford Wolf
2015-11-24 13:51 ` Tristan Gingold [this message]
2015-11-24 14:38 ` Clifford Wolf
2015-11-24 16:41 ` Tristan Gingold
2015-11-30 20:58 ` Juha Aaltonen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F6089B0E-C497-44B1-B184-715BF1E8BE44@adacore.com \
--to=gingold@adacore.com \
--cc=clifford@clifford.at \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).