This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add 'reverse' capability query to remote protocol (qSupported).
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Michael Snyder <msnyder at vmware dot com>, Jakob Engblom <jakob at virtutech dot com>, Greg Law <glaw at undo-software dot com>
- Date: Tue, 1 Sep 2009 16:44:13 +0100
- Subject: Re: [PATCH] Add 'reverse' capability query to remote protocol (qSupported).
- References: <4A9C2AD3.5070904@vmware.com>
On Monday 31 August 2009 20:56:03, Michael Snyder wrote:
> Following discussion, this patch adds feature capability handling
> (enable, disable, and automatic "qSupported" query) for the reverse
> execution packets "bs" (backward step) and "bc" (backward continue
> in the gdb remote protocol.
>
> Cc:ing Jakob and Greg, whose remote targets may be affected.
> What you guys will want to do is have your remote targets
> recognize the "qSupported" query from gdb, and respond with:
>
> ReverseContinue+;ReverseStep+
>
> This will tell gdb that your targets support those two commands.
>
> Otherwise, they default to "disabled", and a user would need
> to enable them with these commands (which might be added to a
> .gdbinit file):
>
> set remote reverse-continue on
> set remote reverse-step on
>
> Pedro, does this look like what you expected?
Yeah, something like that. Thanks! Hui already mentioned
target_can_execute_reverse (thanks!). Initialy I was actually
thinking of the target reporting a single "CanReverse" feature, not a
feature for each packet. I mean, the core of gdb only
knows about target_can_execute_reverse() your idea works for me too,
if it makes sense to you.
While you're at it, how about making remote_resume skip calling
remote_vcont_resume if GDB is requesting a reverse resume?
(I was hoping that someday we'd add reverse support to
vCont packets, so gdb could make use of
say: "vCont?" -> "vCont;c;s;C;S;rs;rc". Something like vCont
will be necessary if gdb is to control (non-transparently) simultaneous
multiple sort-of-independently reversible devices like Jakob
seems to indicate his target can.)
Your patch also needs docs and NEWS entries, BTW.
--
Pedro Alves