]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
(mi_cmd_execute): Check for current_command_token.
authorNick Roberts <nickrob@snap.net.nz>
Thu, 14 Sep 2006 02:24:45 +0000 (02:24 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Thu, 14 Sep 2006 02:24:45 +0000 (02:24 +0000)
(mi_interpreter_exec_bp_cmd): New function (from Apple).

gdb/mi/mi-main.c

index d3210ff8e5ad3292dc8701a476d6241d26210076..8d290550c38cc1c98cce748bc6886def1a16731e 100644 (file)
@@ -1320,7 +1320,7 @@ mi_cmd_execute (struct mi_parse *parse)
 
       if (target_executing)
        {
-         if (!previous_command_token)
+         if (!previous_command_token && current_command_token)
            previous_command_token = xstrdup (current_command_token);
          if (strcmp (parse->command, "exec-interrupt"))
            {
@@ -1388,7 +1388,6 @@ mi_execute_cli_command (const char *cmd, int args_p, const char *args)
     }
 }
 
-
 enum mi_cmd_result
 mi_execute_async_cli_command (char *mi, char *args, int from_tty)
 {
@@ -1663,6 +1662,14 @@ _initialize_mi_main (void)
 
 int mi_dont_register_continuation = 0;
 
+void
+mi_interpreter_exec_bp_cmd (char *command, char **argv, int argc)
+{
+  mi_dont_register_continuation = 1;
+  mi_cmd_interpreter_exec (command, argv, argc);
+  mi_dont_register_continuation = 0;
+}
+
 /* mi_setup_continuation_arg - sets up a continuation structure
    with the timer info and the command token, for use with
    an asyncronous mi command.  Will only cleanup the exec_cleanup