From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24545 invoked by alias); 19 Dec 2008 19:11:37 -0000 Received: (qmail 24533 invoked by uid 22791); 19 Dec 2008 19:11:35 -0000 X-SWARE-Spam-Status: No, hits=-2.5 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; Fri, 19 Dec 2008 19:10:54 +0000 Received: from mailhost5.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 88B2351001; Fri, 19 Dec 2008 11:10:49 -0800 (PST) Received: from [10.20.92.151] (promb-2s-dhcp151.eng.vmware.com [10.20.92.151]) by mailhost5.vmware.com (Postfix) with ESMTP id 7F03CDC05E; Fri, 19 Dec 2008 11:10:49 -0800 (PST) Message-ID: <494BF080.9060009@vmware.com> Date: Fri, 19 Dec 2008 19:11:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Tomas Holmberg CC: Vladimir Prus , "gdb-patches@sources.redhat.com" Subject: Re: reverse for GDB/MI References: <49463870.6080302@virtutech.com> <494A0A9C.6020809@virtutech.com> <494B5A82.4020004@virtutech.com> In-Reply-To: <494B5A82.4020004@virtutech.com> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2008-12/txt/msg00351.txt.bz2 Tomas Holmberg wrote: > Vladimir Prus wrote: >> Tomas Holmberg wrote: >> >>>> I am not quite sure about adding new set of commands for that. Can we use >>>> --reverse option, thereby not introducing new commands? >>> Adding a reverse option to the existing commands is possible. But I do >>> not think it is a good idea. It is not always obvious what should >>> happen when running a standard command in reverse. >> Why? -exec-step always steps forward. -exec-step --reverse always steps >> backward. Seems like a fairly simple model to me. > > There are other reverse commands than the -exec-reverse-step that are more > complicated. If you consider all reverse commands to be simple variants > of the forward commands, then you are correct that there should just > be a --reverse option. But I consider them to not be simple variants. They're not simple variants. Some of them have to deal with issues like prologues vs. epilogues, stepping thru a return back to the callee, etc. It's mostly handled in infrun and infcmd, by checking the "exec-direction" flag. > You can also look at the documentation to see if the reverse commands are > just variants of the forward variants. I do not think we can replace the > documentation for reverse-step, reverse-step-instruction, reverse-continue, > reverse-finish, reverse-next, and reverse-next-instruction and just say it > is the reverse variant for the corresponding forward commands. Please look > at the other reverse commands and see if you can say "reverse-finish" is > just the reverse variant of finish. Yeah -- it's not. ;-) It's an analogue, that's all.