summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c1043fc)
* mi/mi-main.c (mi_execute_command): Use catch_exception,
eliminate call to error_last_message.
(captured_mi_execute_command): Change return type to void.
+2005-01-13 Andrew Cagney <cagney@gnu.org>
+
+ * mi/mi-main.c (mi_execute_command): Use catch_exception,
+ eliminate call to error_last_message.
+ (captured_mi_execute_command): Change return type to void.
+
2005-01-12 Andrew Cagney <cagney@gnu.org>
* exceptions.c (exception_none): New variable.
2005-01-12 Andrew Cagney <cagney@gnu.org>
* exceptions.c (exception_none): New variable.
to perfrom after the given command has executed (display/supress
prompt, display error). */
to perfrom after the given command has executed (display/supress
prompt, display error). */
captured_mi_execute_command (struct ui_out *uiout, void *data)
{
struct captured_mi_execute_command_args *args =
captured_mi_execute_command (struct ui_out *uiout, void *data)
{
struct captured_mi_execute_command_args *args =
{
mi_out_rewind (uiout);
args->action = EXECUTE_COMMAND_DISPLAY_ERROR;
{
mi_out_rewind (uiout);
args->action = EXECUTE_COMMAND_DISPLAY_ERROR;
}
else
mi_out_rewind (uiout);
}
else
mi_out_rewind (uiout);
/* Don't print the prompt. We are executing the target in
synchronous mode. */
args->action = EXECUTE_COMMAND_SUPRESS_PROMPT;
/* Don't print the prompt. We are executing the target in
synchronous mode. */
args->action = EXECUTE_COMMAND_SUPRESS_PROMPT;
struct mi_parse *command;
struct captured_mi_execute_command_args args;
struct ui_out *saved_uiout = uiout;
struct mi_parse *command;
struct captured_mi_execute_command_args args;
struct ui_out *saved_uiout = uiout;
/* This is to handle EOF (^D). We just quit gdb. */
/* FIXME: we should call some API function here. */
/* This is to handle EOF (^D). We just quit gdb. */
/* FIXME: we should call some API function here. */
+ struct exception result;
/* FIXME: cagney/1999-11-04: Can this use of catch_exceptions either
be pushed even further down or even eliminated? */
args.command = command;
/* FIXME: cagney/1999-11-04: Can this use of catch_exceptions either
be pushed even further down or even eliminated? */
args.command = command;
- result = catch_exceptions (uiout, captured_mi_execute_command, &args, "",
- RETURN_MASK_ALL);
+ result = catch_exception (uiout, captured_mi_execute_command, &args,
+ RETURN_MASK_ALL);
if (args.action == EXECUTE_COMMAND_SUPRESS_PROMPT)
{
if (args.action == EXECUTE_COMMAND_SUPRESS_PROMPT)
{
mi_parse_free (command);
return;
}
mi_parse_free (command);
return;
}
- if (args.action == EXECUTE_COMMAND_DISPLAY_ERROR || result < 0)
+ if (args.action == EXECUTE_COMMAND_DISPLAY_ERROR
+ || result.reason < 0)
- char *msg = error_last_message ();
+ char *msg = result.message;
struct cleanup *cleanup = make_cleanup (xfree, msg);
/* The command execution failed and error() was called
somewhere */
struct cleanup *cleanup = make_cleanup (xfree, msg);
/* The command execution failed and error() was called
somewhere */