From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2370 invoked by alias); 14 Jul 2009 00:53:39 -0000 Received: (qmail 2357 invoked by uid 22791); 14 Jul 2009 00:53:38 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Jul 2009 00:53:31 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id CB7DF34002; Mon, 13 Jul 2009 17:53:27 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost2.vmware.com (Postfix) with ESMTP id B183F8EACC; Mon, 13 Jul 2009 17:53:27 -0700 (PDT) Message-ID: <4A5BD5F3.1090103@vmware.com> Date: Tue, 14 Jul 2009 00:53:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Nick Roberts CC: "gdb@sources.redhat.com" Subject: Re: Reverse debugging References: <19035.54231.157231.624882@totara.tehura.co.nz> In-Reply-To: <19035.54231.157231.624882@totara.tehura.co.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00090.txt.bz2 Nick Roberts wrote: > On i386, with current GDB, if I do: > > (gdb) reverse-next > > I get: > > Target child does not support this command. > > However if I do: > > (gdb) target record > > first, and proceed, then "reverse-next" does indeed work as I would expect. That's because target exec does not support reverse, but target record does. Reverse is also potentially supported under target remote, depending on what remote target you're connected to. > In the "Reverse Execution" node of the GDB manual it talks about > "a target environment that supports reverse execution" but doesn't clarify > what those targets are. The node "Process Record and Replay" comes next > in the manual but these two seem to be inimately related. Process record (target record) is one of a small number of targets that currently support reverse debugging. The others, so far, are all remote targets (eg. SID from Red Hat, and Simics from Virtutech). > Is it possible to reverse debug without doing "target record" first? Yes -- but not under target exec (normal native debugging). > If not > then I think "Reverse Execution" should be a sub-node of "Process Record and > Replay". In any case it would be helpful to mention "target record" in the > "Reverse Execution" node if most platforms don't support reverse execution > outside record and replay. No, reverse execution is not tied to process record -- it just isn't available under target exec. > Is there a GDB command that shows if process recording is started/stopped? > "target record" doesn't appear to influence the output of 'info target". Good question. We've been discussing the same question under the thread "Testing of reverse debug commands", and I think we're leaning toward the conclusion "we need such a command".