+2014-07-14 Pedro Alves <palves@redhat.com>
+
+ * exceptions.c (print_any_exception): Delete.
+ (catch_exceptions_with_msg): Use exception_print instead of
+ print_any_exception.
+ (catch_errors): Use exception_fprintf instead of
+ print_any_exception.
+ (catch_command_errors, catch_command_errors_const): Use
+ exception_print instead of print_any_exception.
+
2014-07-14 Pedro Alves <palves@redhat.com>
* infcall.c (run_inferior_call): Set 'sync_execution' while
}
}
-static void
-print_any_exception (struct ui_file *file, const char *prefix,
- struct gdb_exception e)
-{
- if (e.reason < 0 && e.message != NULL)
- {
- target_terminal_ours ();
- wrap_here (""); /* Force out any buffered output. */
- gdb_flush (gdb_stdout);
- annotate_error_begin ();
-
- /* Print the prefix. */
- if (prefix != NULL && prefix[0] != '\0')
- fputs_filtered (prefix, file);
- print_exception (file, e);
- }
-}
-
/* A stack of exception messages.
This is needed to handle nested calls to throw_it: we don't want to
xfree space for a message before it's used.
throw_exception (exception);
}
- print_any_exception (gdb_stderr, NULL, exception);
+ exception_print (gdb_stderr, exception);
gdb_assert (val >= 0);
gdb_assert (exception.reason <= 0);
if (exception.reason < 0)
throw_exception (exception);
}
- print_any_exception (gdb_stderr, errstring, exception);
+ exception_fprintf (gdb_stderr, exception, "%s", errstring);
if (exception.reason != 0)
return 0;
return val;
{
command (arg, from_tty);
}
- print_any_exception (gdb_stderr, NULL, e);
+ exception_print (gdb_stderr, e);
if (e.reason < 0)
return 0;
return 1;
{
command (arg, from_tty);
}
- print_any_exception (gdb_stderr, NULL, e);
+ exception_print (gdb_stderr, e);
if (e.reason < 0)
return 0;
return 1;