* mi/mi-main.c (captured_mi_execute_command): Check the return
value of -interpreter-exec.
This commit is contained in:
parent
79c214e04d
commit
eec017952a
2 changed files with 30 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-05-05 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
|
* mi/mi-main.c (captured_mi_execute_command): Check the return
|
||||||
|
value of -interpreter-exec.
|
||||||
|
|
||||||
2006-05-03 Vladimir Prus <ghost@cs.msu.su>
|
2006-05-03 Vladimir Prus <ghost@cs.msu.su>
|
||||||
|
|
||||||
* varobj.c (c_value_of_variable): Ignore top-level references.
|
* varobj.c (c_value_of_variable): Ignore top-level references.
|
||||||
|
|
|
@ -1107,7 +1107,7 @@ captured_mi_execute_command (struct ui_out *uiout, void *data)
|
||||||
/* Call the "console" interpreter. */
|
/* Call the "console" interpreter. */
|
||||||
argv[0] = "console";
|
argv[0] = "console";
|
||||||
argv[1] = context->command;
|
argv[1] = context->command;
|
||||||
mi_cmd_interpreter_exec ("-interpreter-exec", argv, 2);
|
args->rc = mi_cmd_interpreter_exec ("-interpreter-exec", argv, 2);
|
||||||
|
|
||||||
/* If we changed interpreters, DON'T print out anything. */
|
/* If we changed interpreters, DON'T print out anything. */
|
||||||
if (current_interp_named_p (INTERP_MI)
|
if (current_interp_named_p (INTERP_MI)
|
||||||
|
@ -1115,15 +1115,29 @@ captured_mi_execute_command (struct ui_out *uiout, void *data)
|
||||||
|| current_interp_named_p (INTERP_MI2)
|
|| current_interp_named_p (INTERP_MI2)
|
||||||
|| current_interp_named_p (INTERP_MI3))
|
|| current_interp_named_p (INTERP_MI3))
|
||||||
{
|
{
|
||||||
/* print the result */
|
if (args->rc == MI_CMD_DONE)
|
||||||
/* FIXME: Check for errors here. */
|
{
|
||||||
fputs_unfiltered (context->token, raw_stdout);
|
fputs_unfiltered (context->token, raw_stdout);
|
||||||
fputs_unfiltered ("^done", raw_stdout);
|
fputs_unfiltered ("^done", raw_stdout);
|
||||||
mi_out_put (uiout, raw_stdout);
|
mi_out_put (uiout, raw_stdout);
|
||||||
mi_out_rewind (uiout);
|
mi_out_rewind (uiout);
|
||||||
fputs_unfiltered ("\n", raw_stdout);
|
fputs_unfiltered ("\n", raw_stdout);
|
||||||
args->action = EXECUTE_COMMAND_DISPLAY_PROMPT;
|
args->action = EXECUTE_COMMAND_DISPLAY_PROMPT;
|
||||||
args->rc = MI_CMD_DONE;
|
}
|
||||||
|
else if (args->rc == MI_CMD_ERROR)
|
||||||
|
{
|
||||||
|
if (mi_error_message)
|
||||||
|
{
|
||||||
|
fputs_unfiltered (context->token, raw_stdout);
|
||||||
|
fputs_unfiltered ("^error,msg=\"", raw_stdout);
|
||||||
|
fputstr_unfiltered (mi_error_message, '"', raw_stdout);
|
||||||
|
xfree (mi_error_message);
|
||||||
|
fputs_unfiltered ("\"\n", raw_stdout);
|
||||||
|
}
|
||||||
|
mi_out_rewind (uiout);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
mi_out_rewind (uiout);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue