Re: GDB MI Reverse Commands added [1 of 3]

Vladimir Prus
2009-12-16T07:54:46Z

On Tuesday 15 December 2009 22:37:09 Michael Snyder wrote:

> Vladimir, as far as I can tell, this seems to be the most recent
> version of part 1 of this patch, awaiting approval now that the
> copyright paperwork is completed.
>
> 2009-08-31 Tomas Holmberg >th@virtutech.com>
> * mi/mi-main.c: Added the --reverse flag to the following MI
> commands: exec-continue, exec-finish, exec-next, exec-step,
> exec-next-instruction, exec-step-instruction. This is to
> support reverse execution over the MI interface to gdb.

Michael,

thanks. This patch is OK, with the following fixes:

> Index: mi-main.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
> retrieving revision 1.156
> diff -u -p -r1.156 mi-main.c
> --- mi-main.c 2 Jul 2009 17:25:59 -0000 1.156
> +++ mi-main.c 27 Aug 2009 01:45:23 -0000
> @@ -88,8 +88,8 @@ static void mi_cmd_execute (struct mi_pa
>
> static void mi_execute_cli_command (const char *cmd, int args_p,
> const char *args);
> -static void mi_execute_async_cli_command (char *cli_command,
> - char **argv, int argc);
> +static void mi_execute_async_cli_command (char *cli_command,
> + char **argv, int argc);

This is spurious formatting change that must be undone. There's a lot of
similar changes in the patch — that must be similarly undone.

> +/* 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 = EXEC_FORWARD;
> +}

It should be straight-forward to make the function in reverse.c globally
visible, and remove this copy-paste.

Thanks,
Volodya