aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog16
-rw-r--r--gdb/exceptions.c14
-rw-r--r--gdb/exceptions.h4
-rw-r--r--gdb/utils.c28
-rw-r--r--gdb/utils.h6
5 files changed, 35 insertions, 33 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 02f5e92..befc09e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,19 @@
+2014-07-24 Gary Benson <gbenson@redhat.com>
+
+ * exceptions.h (throw_vfatal): Renamed to...
+ (throw_vquit): New declaration.
+ (throw_quit): Likewise.
+ * exceptions.c (throw_vfatal): Renamed to...
+ (throw_vquit): New function.
+ (throw_quit): Likewise.
+ (throw_error): Call throw_verror rather than throw_it.
+ * utils.h (vfatal): Removed.
+ (fatal): Likewise.
+ * utils.c (vfatal): Removed.
+ (fatal): Likewise.
+ (internal_verror): Replaced call to fatal with call to throw_quit.
+ (quit): Replaced calls to fatal with calls to throw_quit.
+
2014-07-23 Ajit Agarwal <ajitkum@xilinx.com>
* microblaze-tdep.c (microblaze_fetch_instruction): Use of
diff --git a/gdb/exceptions.c b/gdb/exceptions.c
index def1f41..ddaf250 100644
--- a/gdb/exceptions.c
+++ b/gdb/exceptions.c
@@ -390,7 +390,7 @@ throw_verror (enum errors error, const char *fmt, va_list ap)
}
void
-throw_vfatal (const char *fmt, va_list ap)
+throw_vquit (const char *fmt, va_list ap)
{
throw_it (RETURN_QUIT, GDB_NO_ERROR, fmt, ap);
}
@@ -401,7 +401,17 @@ throw_error (enum errors error, const char *fmt, ...)
va_list args;
va_start (args, fmt);
- throw_it (RETURN_ERROR, error, fmt, args);
+ throw_verror (error, fmt, args);
+ va_end (args);
+}
+
+void
+throw_quit (const char *fmt, ...)
+{
+ va_list args;
+
+ va_start (args, fmt);
+ throw_vquit (fmt, args);
va_end (args);
}
diff --git a/gdb/exceptions.h b/gdb/exceptions.h
index e5e1a49..be74ad5 100644
--- a/gdb/exceptions.h
+++ b/gdb/exceptions.h
@@ -191,10 +191,12 @@ extern void throw_exception (struct gdb_exception exception)
ATTRIBUTE_NORETURN;
extern void throw_verror (enum errors, const char *fmt, va_list ap)
ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (2, 0);
-extern void throw_vfatal (const char *fmt, va_list ap)
+extern void throw_vquit (const char *fmt, va_list ap)
ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 0);
extern void throw_error (enum errors error, const char *fmt, ...)
ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (2, 3);
+extern void throw_quit (const char *fmt, ...)
+ ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
/* Call FUNC(UIOUT, FUNC_ARGS) but wrapped within an exception
handler. If an exception (enum return_reason) is thrown using
diff --git a/gdb/utils.c b/gdb/utils.c
index a9e8196..8af8827 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -569,26 +569,6 @@ error (const char *string, ...)
va_end (args);
}
-/* Print an error message and quit.
- The first argument STRING is the error message, used as a fprintf string,
- and the remaining args are passed as arguments to it. */
-
-void
-vfatal (const char *string, va_list args)
-{
- throw_vfatal (string, args);
-}
-
-void
-fatal (const char *string, ...)
-{
- va_list args;
-
- va_start (args, string);
- throw_vfatal (string, args);
- va_end (args);
-}
-
void
error_stream (struct ui_file *stream)
{
@@ -833,7 +813,7 @@ void
internal_verror (const char *file, int line, const char *fmt, va_list ap)
{
internal_vproblem (&internal_error_problem, file, line, fmt, ap);
- fatal (_("Command aborted."));
+ throw_quit (_("Command aborted."));
}
void
@@ -1090,15 +1070,15 @@ quit (void)
#ifdef __MSDOS__
/* No steenking SIGINT will ever be coming our way when the
program is resumed. Don't lie. */
- fatal ("Quit");
+ throw_quit ("Quit");
#else
if (job_control
/* If there is no terminal switching for this target, then we can't
possibly get screwed by the lack of job control. */
|| !target_supports_terminal_ours ())
- fatal ("Quit");
+ throw_quit ("Quit");
else
- fatal ("Quit (expect signal SIGINT when the program is resumed)");
+ throw_quit ("Quit (expect signal SIGINT when the program is resumed)");
#endif
}
diff --git a/gdb/utils.h b/gdb/utils.h
index a91f551..cc79562 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -291,12 +291,6 @@ extern void error (const char *fmt, ...)
extern void error_stream (struct ui_file *) ATTRIBUTE_NORETURN;
-extern void vfatal (const char *fmt, va_list ap)
- ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 0);
-
-extern void fatal (const char *fmt, ...)
- ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
-
extern void internal_verror (const char *file, int line, const char *,
va_list ap)
ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (3, 0);