From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2252 invoked by alias); 17 Dec 2009 14:40:26 -0000 Received: (qmail 2240 invoked by uid 22791); 17 Dec 2009 14:40:25 -0000 X-SWARE-Spam-Status: No, hits=-2.1 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; Thu, 17 Dec 2009 14:40:19 +0000 Received: from oden.vtab.com (oden.vtab.com [127.0.0.1]) by oden.vtab.com (Postfix) with ESMTP id 1107E26EF76; Thu, 17 Dec 2009 15:40:17 +0100 (CET) Received: from polhem (unknown [62.20.90.206]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by oden.vtab.com (Postfix) with ESMTP id E14D526EF6E; Thu, 17 Dec 2009 15:40:16 +0100 (CET) From: "Jakob Engblom" To: "'Vladimir Prus'" , "'Michael Snyder'" Cc: References: <00ce01ca265a$ccb66ca0$662345e0$@com> <4B27E565.5060305@vmware.com> <200912161054.35323.vladimir@codesourcery.com> <200912161056.58856.vladimir@codesourcery.com> In-Reply-To: <200912161056.58856.vladimir@codesourcery.com> Subject: RE: GDB MI Reverse Commands added [1 of 3] Date: Thu, 17 Dec 2009 14:40:00 -0000 Message-ID: <008f01ca7f26$d9e97140$8dbc53c0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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-12/txt/msg00229.txt.bz2 > > > +/* continue in reverse direction: > > > + XXX: code duplicated from reverse.c */ > > > + > > > +static void > > > +exec_direction_default (void *notused) > > > +{ > > > + /* Return execution direction to default state. */ > > > + execution_direction =3D EXEC_FORWARD; > > > +} > > > > It should be straight-forward to make the function in reverse.c globally > > visible, and remove this copy-paste. I just updated my cvs tree, and it seems that the main reverse function has= changed its name. As far as I can tell (I did not do all of this code my= self, rather I have to blame some colleagues), the current reversing functi= on that we want to call is: static void exec_reverse_once (char *cmd, char *args, int from_tty) { ... } From=20 void mi_cmd_exec_continue (char *command, char **argv, int argc) { if (argc > 0 && strcmp (argv[0], "--reverse") =3D=3D 0) exec_reverse_continue (argv + 1, argc - 1); else exec_continue (argv, argc); } Where exec_reverse_continue() should be replaced with exec_reverse_once(). Can someone familiar with the main reverse code illuminate me on how to cal= l into the reverse code in teh right way? It seems that the reverse.c code= has already changed from the code that was (bad style) copied into mi-main= .c... which is exactly what we want to avoid in the first place.=20 Or is the logical thing to do from MI to just call static void reverse_continue (char *args, int from_tty) { exec_reverse_once ("continue", args, from_tty); } As the implementation of reverse continue? This does looks like the we sub= mitted has rotted since the patch was submitted...=20 /jakob