This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
gc deprecated_error_hook
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 9 Jan 2009 17:33:38 +0000
- Subject: gc deprecated_error_hook
Nothing in gdb or insight use deprecated_error_hook.
This gets rid of the need for the exit call that Nathan just added
recently, which in turn was needed I guess due to the fact that
deprecated_error_hook wasn't tagged as noreturn:
http://sourceware.org/ml/gdb-patches/2004-08/msg00012.html
Confirmed that an arm-elf gdb builds ok, and checked in.
--
Pedro Alves
2009-01-09 Pedro Alves <pedro@codesourcery.com>
* defs.h (deprecated_error_hook): Delete declaration.
* interps.c (clear_interpreter_hooks): Adjust.
* remote-sim.c (gdb_os_error): Don't try to call
deprecated_error_hook. No need to call exit anymore.
* top.c (deprecated_error_hook): Delete.
---
gdb/defs.h | 2 --
gdb/interps.c | 1 -
gdb/remote-sim.c | 16 +++++-----------
gdb/top.c | 5 -----
4 files changed, 5 insertions(+), 19 deletions(-)
Index: src/gdb/defs.h
===================================================================
--- src.orig/gdb/defs.h 2009-01-09 01:26:40.000000000 +0000
+++ src/gdb/defs.h 2009-01-09 01:27:26.000000000 +0000
@@ -1109,8 +1109,6 @@ extern void (*deprecated_call_command_ho
extern void (*deprecated_set_hook) (struct cmd_list_element * c);
-extern void (*deprecated_error_hook) (void);
-
extern void (*deprecated_error_begin_hook) (void);
extern int (*deprecated_ui_load_progress_hook) (const char *section,
Index: src/gdb/interps.c
===================================================================
--- src.orig/gdb/interps.c 2009-01-09 01:26:59.000000000 +0000
+++ src/gdb/interps.c 2009-01-09 01:27:38.000000000 +0000
@@ -346,7 +346,6 @@ clear_interpreter_hooks (void)
deprecated_context_hook = 0;
deprecated_target_wait_hook = 0;
deprecated_call_command_hook = 0;
- deprecated_error_hook = 0;
deprecated_error_begin_hook = 0;
deprecated_command_loop_hook = 0;
}
Index: src/gdb/remote-sim.c
===================================================================
--- src.orig/gdb/remote-sim.c 2009-01-09 01:26:45.000000000 +0000
+++ src/gdb/remote-sim.c 2009-01-09 01:44:53.000000000 +0000
@@ -262,18 +262,12 @@ gdb_os_evprintf_filtered (host_callback
/* GDB version of error callback. */
static void
-gdb_os_error (host_callback * p, const char *format,...)
+gdb_os_error (host_callback * p, const char *format, ...)
{
- if (deprecated_error_hook)
- (*deprecated_error_hook) ();
- else
- {
- va_list args;
- va_start (args, format);
- verror (format, args);
- va_end (args);
- }
- exit (1);
+ va_list args;
+ va_start (args, format);
+ verror (format, args);
+ va_end (args);
}
int
Index: src/gdb/top.c
===================================================================
--- src.orig/gdb/top.c 2009-01-09 01:31:05.000000000 +0000
+++ src/gdb/top.c 2009-01-09 01:31:37.000000000 +0000
@@ -283,11 +283,6 @@ void (*deprecated_set_hook) (struct cmd_
void (*deprecated_context_hook) (int id);
-/* Takes control from error (). Typically used to prevent longjmps out of the
- middle of the GUI. Usually used in conjunction with a catch routine. */
-
-void (*deprecated_error_hook) (void);
-
/* Handler for SIGHUP. */
#ifdef SIGHUP