From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30749 invoked by alias); 20 May 2005 19:27:21 -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 30717 invoked from network); 20 May 2005 19:27:17 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org with SMTP; 20 May 2005 19:27:17 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id j4KJRGgg026059 for ; Fri, 20 May 2005 12:27:16 -0700 (PDT) Received: from relay4.apple.com (relay4.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.3.17) with ESMTP id ; Fri, 20 May 2005 12:27:16 -0700 Received: from [17.219.198.166] ([17.219.198.166]) by relay4.apple.com (8.12.11/8.12.11) with ESMTP id j4KJRDIW024620; Fri, 20 May 2005 12:27:14 -0700 (PDT) Message-ID: <428E3A11.2050406@apple.com> Date: Fri, 20 May 2005 19:27:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3) Gecko/20040910 MIME-Version: 1.0 To: Vladimir Prus CC: gdb@sources.redhat.com Subject: Re: [discuss] Support for reverse-execution References: <00c601c55747$860a3e80$aaa56b80@msnyder8600> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-05/txt/msg00230.txt.bz2 Vladimir Prus wrote: > >Would not it be better to have a single "reverse" command which puts the >debugger in "reverse" mode -- making step/stepi/next/nexti go backward. > > In general, modes are bad for UI; people, even smart software engineers, are not good at remembering modes. Think of how many fenderbenders are caused by drivers stepping on the gas and going in the opposite direction of what they expected. Coming back to GDB, think of when you are using "up" and "down", then ask to print a variable and get a complaint there is no such variable, because you forgot which frame is current. So I think the basic commands should be "reverse-foo" or "back-foo" or whatever. That said, it would be pretty easy to layer a mode on top of those for experimentation purposes, let everybody try it out for awhile, and see what they tend to favor. For instance, I can see a usage where a user will want to go back and forth over a single complicated line multiple times, looking at different variables in each step/rstep pair. Stan