From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90502 invoked by alias); 10 Apr 2019 14:54:59 -0000 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 Received: (qmail 90489 invoked by uid 89); 10 Apr 2019 14:54:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-type:plain, HContent-type:utf-8, H*r:4.82, HCC:D*edu X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Apr 2019 14:54:57 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEEco-0008GJ-Mf; Wed, 10 Apr 2019 10:54:54 -0400 Received: from [176.228.60.248] (port=3507 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hEEcn-0004vt-NM; Wed, 10 Apr 2019 10:54:54 -0400 Date: Wed, 10 Apr 2019 14:54:00 -0000 Message-Id: <831s297vwi.fsf@gnu.org> From: Eli Zaretskii To: Pedro Alves CC: eggert@cs.ucla.edu, gdb-patches@sourceware.org In-reply-to: <51cb91ba-6bcd-3de9-43d4-c766e2737c88@redhat.com> (message from Pedro Alves on Wed, 10 Apr 2019 12:51:36 +0100) Subject: Re: reverse execution part of the manual is written backwards References: <5fbd40b5-7887-1000-3457-75190a5d96c0@cs.ucla.edu> <51cb91ba-6bcd-3de9-43d4-c766e2737c88@redhat.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00188.txt.bz2 > From: Pedro Alves > Date: Wed, 10 Apr 2019 12:51:36 +0100 > > > +Before using reverse execution, you should first use the @code{record} > > +command, so that instructions executed by the program are saved for > > +reverse execution later.  @xref{Process Record and Replay}. > > +@value{GDBN} provides the following commands to examine the process > > +record and execute the program in reverse. > > This is not correct. "record" is one way to support reverse execution, > but there are others. For example, "record" is an alias for "record full". > "record btrace" also supports reverse debugging. And then there are > remote targets that suppose reverse debugging natively, like system emulators, > and you won't type "record" with those at all. Mozilla's RR is another > example. > > https://www.gnu.org/software/gdb/news/reversible.html Pedro, First, thanks for responding, I posted a similar question to gdb@, and only got one uncertain response. What you wrote is much more definitive. Next, please try to put yourself in the shoes of a GDB user who is debugging a native target, let's say on GNU/Linux. How would such a user know what to do to start using the reverse debugging feature? The above URL basically says that reverse debugging is available natively only on GNU/Linux running on x86 CPUs, and then only if one activates "target record". This is essentially what Paul was saying, so he wasn't very far off the mark. The remote targets are an important addition to what Paul said. In any case, I think the Reverse Execution section should say something about the conditions for using this mode, regardless of whether it precedes or follows the chapter about recording and replaying. It probably should simply say what the above URL says at its beginning, and then describe the commands to activate the correct target, or point to a clear description of those commands elsewhere in the manual. Because right now we have a description of record and replay, and we have a description of reverse-execution commands, but no "glue" to connect them, and there's no reasonable way for a reader to guess what to do to bridge over that chasm. Do you agree?