From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31358 invoked by alias); 20 Apr 2006 13:43:48 -0000 Received: (qmail 31348 invoked by uid 22791); 20 Apr 2006 13:43:48 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 20 Apr 2006 13:43:46 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FWZRf-0003J9-6n; Thu, 20 Apr 2006 09:43:43 -0400 Date: Thu, 20 Apr 2006 13:43:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: [RFA] Reverse debugging, part 1/3: target interface Message-ID: <20060420134343.GC11710@nevyn.them.org> Mail-Followup-To: Michael Snyder , Eli Zaretskii , gdb-patches@sources.redhat.com References: <442DAA70.5070203@redhat.com> <444426C7.6020604@redhat.com> <20060418125836.GB10130@nevyn.them.org> <20060418152443.GA13825@nevyn.them.org> <44456356.8090706@redhat.com> <444680C3.1010007@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <444680C3.1010007@redhat.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00270.txt.bz2 On Wed, Apr 19, 2006 at 11:26:11AM -0700, Michael Snyder wrote: > +@item bc > +@cindex @samp{bc} packet > +Continue execution in reverse (if capable). > +@xref{Reverse Execution, ,Running programs backward}. > + > +Reply: > +@xref{Stop Reply Packets}, for the reply specifications. > + > +@item bs > +@cindex @samp{bs} packet > +Single step in reverse (if capable). > +@xref{Reverse Execution, ,Running programs backward}. > + > +Reply: > +@xref{Stop Reply Packets}, for the reply specifications. > + You designed the target interface so that it could return EXEC_ERROR, "I don't support reverse execution". But here you've got only bc and bs; you've got no way to probe the remote target for reverse execution support. I realize you've got at least one already shipping stub for this; can we still fix it, or should we assume that there will be at least one target where the only way to find out is to try? This seems to be one of the stray FIXMEs in this code which really ought to be fixed before we merge it: + /* FIXME: check target for capability. */ I'm guessing you haven't tried this with a remote target that didn't support it. It looks like it would fail messily. Are there other hard cases that should be discussed in the remote protocol documentation, or handled by the protocol? The first one that comes to mind is "what do we do with threads" - is it ever going to be relevant to do this in a multi-threaded system, and if so, are we going to reverse all threads at once? Oh, and refering to Stop Reply Packets is not complete for the reply; that doesn't cover error codes. For instance, you have one error code designated to mean "no more history". That should be in the documentation, please. I've only skimmed the patch; are there others? -- Daniel Jacobowitz CodeSourcery