[PATCH] Add 'reverse' capability query to remote protocol (qSupported).
Pedro Alves
pedro@codesourcery.com
Tue Sep 1 15:44:00 GMT 2009
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
More information about the Gdb-patches
mailing list