From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22265 invoked by alias); 12 May 2005 23:08:46 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 22187 invoked from network); 12 May 2005 23:08:42 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 12 May 2005 23:08:42 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j4CN8gpc009025 for ; Thu, 12 May 2005 19:08:42 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j4CN8aO03828 for ; Thu, 12 May 2005 19:08:37 -0400 Received: from msnyder8600 (vpn26-4.sfbay.redhat.com [172.16.26.4]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with SMTP id j4CN8Ya8002615; Thu, 12 May 2005 19:08:35 -0400 Message-ID: <00c601c55747$860a3e80$aaa56b80@msnyder8600> From: "Michael Snyder" To: Subject: [discuss] Support for reverse-execution Date: Thu, 12 May 2005 23:08:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-SW-Source: 2005-05/txt/msg00145.txt.bz2 I'd like to start adding some commands to gdb to support targets that can perform reverse execution (eg. stepping backwards). This concept has been around for a number of years now, and I have access to a target (the Simics simulator from Virtutech) that does it quite handily. I propose we add something like the following commands (names open to discussion): reverse-continue -- start executing backwards until something interesting happens (most likely hitting a breakpoint). reverse-stepi -- "un-execute" the previous instruction. reverse-step -- "un-execute" the previous source line. reverse-finish or "un-call" -- proceed backward until the current function is about to be called by its caller. reverse-until... etc. Along with these commands, we would need at least two new remote-protocol messages: "rc" for reverse-continue, and "rs" for reverse-stepi. I think all of the above user commands could be implemented on these primatives. Obviously if the remote target doesn't understand these primatives, the user command would error. Finally, we'd need a new entry for the target vector -- something like "to_resume_backwards". If the target vector doesn't export this method, the user command would error. At least one target (the Simics simulator) would support these commands immediately, and once they exist, their presence may encourage other targets to implement reverse execution. We know that the technology exists, it just needs a user interface to be useful. Comments? Michael Snyder Red Hat