From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30506 invoked by alias); 6 Feb 2009 10:08:01 -0000 Received: (qmail 30495 invoked by uid 22791); 6 Feb 2009 10:08:00 -0000 X-SWARE-Spam-Status: No, hits=-1.8 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, 06 Feb 2009 10:07:49 +0000 Received: from oden.vtab.com (oden.vtab.com [127.0.0.1]) by oden.vtab.com (Postfix) with ESMTP id 595BC26F65B; Fri, 6 Feb 2009 11:07:44 +0100 (CET) Received: from polhem (c83-253-21-188.bredband.comhem.se [83.253.21.188]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by oden.vtab.com (Postfix) with ESMTP id AA8C326F658; Fri, 6 Feb 2009 11:07:33 +0100 (CET) From: "Jakob Engblom" To: "'Vladimir Prus'" , "Tomas Holmberg" Cc: References: <49463870.6080302@virtutech.com> <000a01c960f1$2c88d6c0$859a8440$@com> <200902051239.27523.vladimir@codesourcery.com> In-Reply-To: <200902051239.27523.vladimir@codesourcery.com> Subject: RE: reverse for GDB/MI Date: Fri, 06 Feb 2009 10:08:00 -0000 Message-ID: <021001c98842$c0dd56c0$42980440$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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: 2009-02/txt/msg00153.txt.bz2 > 1. Use --reverse option It looks like we are back to the --reverse discussion that we had before Christmas. Most people seem to think that having specialized commands for reverse execution makes more sense than having a special flag to certain commands.=20 For example, Michael Snyder wrote on 2008-12-18: http://sourceware.org/ml/gdb-patches/2008-12/msg00351.html :=20 ---- > 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-continu= e, > 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. ---- And Tomas Holmberg: http://sourceware.org/ml/gdb-patches/2008-12/msg00319.h= tml : ---- I am not quite sure about adding new set of commands for that. Can we u= se --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. I consider the reverse commands as a new set commands and not a variant of the old. ---- Also, changing to variants would require rewriting code that we already hav= e in place and hvae tested (at least to some extent), and doing that always stri= kes me as inviting problems and extra work.=20=20 About the proliferation of commands, that seems to be in the nature of thin= gs for reverse. The commands discussed here: > continue > reverse-continue > timed-continue > reverse-timed-continue That is how we actually do things in Simics, and it turns out to be pretty useful. In our CLI, we have: For basic control: * continue [n] * reverse [n] * run-seconds (value) * reverse-to (value) * skip-to (point in time) * stepi [n] * reverse-stepi [n] And with debug info loaded: * reverse-next-instruction=20=20 * reverse-step-line=20=20=20=20=20=20=20 * reverse-next-line=20=20=20=20=20=20=20=20=20 * uncall-function > 3. Include documentation Documentation for the reverse commands was submitted back in December too, = as far as I can tell (http://sourceware.org/ml/gdb-patches/2008-12/msg00312.ht= ml). Did that miss being included into the source code?=20=20 > 2. Arrange for --exec-step, and similar, to ignore 'set exec-direction', > since all new MI commands should strive to be stateless. This, of course, > will mean that one cannot get existing frontend to do reverse step by > typing a command into CLI console, but it is not obvious if existing > frontend will work without modification anyway. That makes sense to me too, the exec-direction concept is a bit strange. Best regards, /jakob _______________________________________________________ Jakob Engblom, PhD, Technical Marketing Manager Virtutech=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Direct: +46= 8 690 07 47=A0=A0=A0 Drottningholmsv=E4gen 22=A0=A0=A0=A0=A0 Mobile: +46 709 242 646=A0=A0 11243 Stockholm=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Web:=A0=A0=A0 www.virtu= tech.com=A0 Sweden ________________________________________________________ =A0=20