From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5613 invoked by alias); 1 Sep 2009 15:44:26 -0000 Received: (qmail 5594 invoked by uid 22791); 1 Sep 2009 15:44:25 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_23,SARE_SUB_OBFU_Q1,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Sep 2009 15:44:17 +0000 Received: (qmail 20414 invoked from network); 1 Sep 2009 15:44:16 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Sep 2009 15:44:16 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [PATCH] Add 'reverse' capability query to remote protocol (qSupported). Date: Tue, 01 Sep 2009 15:44:00 -0000 User-Agent: KMail/1.9.10 Cc: Michael Snyder , Jakob Engblom , Greg Law References: <4A9C2AD3.5070904@vmware.com> In-Reply-To: <4A9C2AD3.5070904@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909011644.14035.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00019.txt.bz2 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