From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17908 invoked by alias); 19 Dec 2008 08:26:17 -0000 Received: (qmail 17900 invoked by uid 22791); 19 Dec 2008 08:26:16 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from oden.vtab.com (HELO oden.vtab.com) (62.20.90.195) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Dec 2008 08:25:41 +0000 Received: from oden.vtab.com (oden.vtab.com [127.0.0.1]) by oden.vtab.com (Postfix) with ESMTP id B078026F670; Fri, 19 Dec 2008 09:25:38 +0100 (CET) Received: from jessica.hq.vtech (jessica.hq.vtech [10.0.0.70]) by oden.vtab.com (Postfix) with ESMTP id 9C52026EF30; Fri, 19 Dec 2008 09:25:38 +0100 (CET) Message-ID: <494B5A82.4020004@virtutech.com> Date: Fri, 19 Dec 2008 08:26:00 -0000 From: Tomas Holmberg User-Agent: Thunderbird 2.0.0.18 (X11/20081119) MIME-Version: 1.0 To: Vladimir Prus CC: gdb-patches@sources.redhat.com Subject: Re: reverse for GDB/MI References: <49463870.6080302@virtutech.com> <494A0A9C.6020809@virtutech.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00340.txt.bz2 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. 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. /tomas