From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6096 invoked by alias); 13 Jan 2010 20:32:14 -0000 Received: (qmail 6088 invoked by uid 22791); 13 Jan 2010 20:32:13 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_40,MIME_QP_LONG_LINE X-Spam-Check-By: sourceware.org Received: from vtab.com (HELO oden.vtab.com) (62.20.90.195) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jan 2010 20:32:02 +0000 Received: from oden.vtab.com (oden.vtab.com [127.0.0.1]) by oden.vtab.com (Postfix) with ESMTP id 6546226EEA4; Wed, 13 Jan 2010 21:31:59 +0100 (CET) Received: from polhem (95.209.1.155.bredband.tre.se [95.209.1.155]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by oden.vtab.com (Postfix) with ESMTP id E567E26EE4A; Wed, 13 Jan 2010 21:31:56 +0100 (CET) From: "Jakob Engblom" To: "'Vladimir Prus'" , References: <00ce01ca265a$ccb66ca0$662345e0$@com> <4A95E670.9040402@vmware.com> In-Reply-To: Subject: RE: GDB MI Reverse Commands added [1 of 3] Date: Wed, 13 Jan 2010 20:32:00 -0000 Message-ID: <002901ca948f$771a7fe0$654f7fa0$@com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_002A_01CA9497.D8DEE7E0" 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: 2010-01/txt/msg00359.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_002A_01CA9497.D8DEE7E0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-length: 749 Here is an updated patch for the MI reverse commands, against the latest gd= b 7 from cvs.=20 It removes the buggy whitespace changes, and also removes the small duplica= tion of code with reverse.c (it was really only the setting of the default = direction of execution that was duplicated).=20 In my build, this version passes all the mi-reverse.exp tests.=20 Best regards, /jakob _______________________________________________________ Jakob Engblom, PhD, Technical Marketing Manager Virtutech Direct: +46 8 690 07 47=20=20=20 Drottningholmsv=C3=A4gen 22 Mobile: +46 709 242 646=20=20 11243 Stockholm Web: www.virtutech.com=20 Sweden ________________________________________________________ =20=20 ------=_NextPart_000_002A_01CA9497.D8DEE7E0 Content-Type: application/octet-stream; name="gdb-mi-reverse-gdb7.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gdb-mi-reverse-gdb7.diff" Content-length: 6666 Index: gdb/mi/mi-main.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/mi/mi-main.c,v=0A= retrieving revision 1.163=0A= diff -c -p -r1.163 mi-main.c=0A= *** gdb/mi/mi-main.c 12 Jan 2010 23:05:52 -0000 1.163=0A= --- gdb/mi/mi-main.c 13 Jan 2010 20:16:03 -0000=0A= *************** void=0A= *** 121,155 ****=0A= mi_cmd_exec_next (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! mi_execute_async_cli_command ("next", argv, argc);=0A= }=0A= =20=20=0A= void=0A= mi_cmd_exec_next_instruction (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! mi_execute_async_cli_command ("nexti", argv, argc);=0A= }=0A= =20=20=0A= void=0A= mi_cmd_exec_step (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! mi_execute_async_cli_command ("step", argv, argc);=0A= }=0A= =20=20=0A= void=0A= mi_cmd_exec_step_instruction (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! mi_execute_async_cli_command ("stepi", argv, argc);=0A= }=0A= =20=20=0A= void=0A= mi_cmd_exec_finish (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! mi_execute_async_cli_command ("finish", argv, argc);=0A= }=0A= =20=20=0A= void=0A= --- 121,170 ----=0A= mi_cmd_exec_next (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! if (argc > 0 && strcmp(argv[0], "--reverse") =3D=3D 0)=0A= ! mi_execute_async_cli_command ("reverse-next", argv + 1, argc - 1);=0A= ! else=0A= ! mi_execute_async_cli_command ("next", argv, argc);=0A= }=0A= =20=20=0A= void=0A= mi_cmd_exec_next_instruction (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! if (argc > 0 && strcmp(argv[0], "--reverse") =3D=3D 0)=0A= ! mi_execute_async_cli_command ("reverse-nexti", argv + 1, argc - 1);= =0A= ! else=0A= ! mi_execute_async_cli_command ("nexti", argv, argc);=0A= }=0A= =20=20=0A= void=0A= mi_cmd_exec_step (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! if (argc > 0 && strcmp(argv[0], "--reverse") =3D=3D 0)=0A= ! mi_execute_async_cli_command ("reverse-step", argv + 1, argc - 1);=0A= ! else=0A= ! mi_execute_async_cli_command ("step", argv, argc);=0A= }=0A= =20=20=0A= void=0A= mi_cmd_exec_step_instruction (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! if (argc > 0 && strcmp(argv[0], "--reverse") =3D=3D 0)=0A= ! mi_execute_async_cli_command ("reverse-stepi", argv + 1, argc - 1);= =0A= ! else=0A= ! mi_execute_async_cli_command ("stepi", argv, argc);=0A= }=0A= =20=20=0A= void=0A= mi_cmd_exec_finish (char *command, char **argv, int argc)=0A= {=0A= /* FIXME: Should call a libgdb function, not a cli wrapper. */=0A= ! if (argc > 0 && strcmp(argv[0], "--reverse") =3D=3D 0)=0A= ! mi_execute_async_cli_command ("reverse-finish", argv + 1, argc - 1);= =0A= ! else=0A= ! mi_execute_async_cli_command ("finish", argv, argc);=0A= }=0A= =20=20=0A= void=0A= *************** proceed_thread_callback (struct thread_i=0A= *** 195,202 ****=0A= return 0;=0A= }=0A= =20=20=0A= ! void=0A= ! mi_cmd_exec_continue (char *command, char **argv, int argc)=0A= {=0A= if (argc =3D=3D 0)=0A= continue_1 (0);=0A= --- 210,217 ----=0A= return 0;=0A= }=0A= =20=20=0A= ! static void=0A= ! exec_continue (char **argv, int argc)=0A= {=0A= if (argc =3D=3D 0)=0A= continue_1 (0);=0A= *************** mi_cmd_exec_continue (char *command, cha=0A= *** 217,223 ****=0A= do_cleanups (old_chain);=20=20=20=20=20=20=20=20=20=20=20=20=0A= }=0A= else=0A= ! error ("Usage: -exec-continue [--all|--thread-group id]");=0A= }=0A= =20=20=0A= static int=0A= --- 232,271 ----=0A= do_cleanups (old_chain);=20=20=20=20=20=20=20=20=20=20=20=20=0A= }=0A= else=0A= ! error ("Usage: -exec-continue [--reverse] [--all|--thread-group id]")= ;=0A= ! }=0A= !=20=0A= ! /* Function found in gdb/reverse.c */=0A= ! void exec_direction_default(void *);=20=0A= !=20=0A= ! static void=0A= ! exec_reverse_continue (char **argv, int argc)=0A= ! {=0A= ! enum exec_direction_kind dir =3D execution_direction;=0A= ! struct cleanup *old_chain;=0A= !=20=0A= ! if (dir =3D=3D EXEC_ERROR)=0A= ! error (_("Target %s does not support this command."), target_shortnam= e);=0A= !=20=0A= ! if (dir =3D=3D EXEC_REVERSE)=0A= ! error (_("Already in reverse mode."));=0A= !=20=0A= ! if (!target_can_execute_reverse)=0A= ! error (_("Target %s does not support this command."), target_shortnam= e);=0A= !=20=0A= ! old_chain =3D make_cleanup (exec_direction_default, NULL);=0A= ! execution_direction =3D EXEC_REVERSE;=0A= ! exec_continue (argv, argc);=0A= ! do_cleanups (old_chain);=20=20=0A= ! }=0A= !=20=0A= ! void=0A= ! mi_cmd_exec_continue (char *command, char **argv, int argc)=0A= ! {=0A= ! if (argc > 0 && strcmp(argv[0], "--reverse") =3D=3D 0)=0A= ! exec_reverse_continue (argv + 1, argc - 1);=0A= ! else=0A= ! exec_continue (argv, argc);=0A= }=0A= =20=20=0A= static int=0A= Index: gdb/reverse.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/reverse.c,v=0A= retrieving revision 1.8=0A= diff -c -p -r1.8 reverse.c=0A= *** gdb/reverse.c 1 Jan 2010 07:31:41 -0000 1.8=0A= --- gdb/reverse.c 13 Jan 2010 20:16:04 -0000=0A= ***************=0A= *** 29,35 ****=0A= /* User interface:=0A= reverse-step, reverse-next etc. */=0A= =20=20=0A= ! static void=0A= exec_direction_default (void *notused)=0A= {=0A= /* Return execution direction to default state. */=0A= --- 29,35 ----=0A= /* User interface:=0A= reverse-step, reverse-next etc. */=0A= =20=20=0A= ! void=0A= exec_direction_default (void *notused)=0A= {=0A= /* Return execution direction to default state. */=0A= ------=_NextPart_000_002A_01CA9497.D8DEE7E0--