This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Eliminate unused errstring parameter
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 14 Jan 2005 18:26:27 -0500
- Subject: [commit] Eliminate unused errstring parameter
The errstring parameter to catch_exceptions and
catch_exceptions_with_msg is always NULL. This eliminates it.
committed,
Andrew
2005-01-14 Andrew Cagney <cagney@gnu.org>
* exceptions.h (catch_exceptions): Delete errstring parameter.
(catch_exceptions_with_msg): Ditto.
* exceptions.c (catch_exceptions_with_msg): Update.
(catch_exceptions): Update.
* symfile-mem.c (add_vsyscall_page): Update.
* frame.c (get_current_frame): Update.
* wrapper.c (gdb_value_struct_elt): Update.
* exceptions.c (catch_exceptions): Update.
* thread.c (gdb_list_thread_ids, gdb_thread_select): Update.
* breakpoint.c (gdb_breakpoint_query, gdb_breakpoint): Update.
* remote-fileio.c (remote_fileio_request): Update.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.193
diff -p -u -r1.193 breakpoint.c
--- breakpoint.c 14 Jan 2005 22:59:33 -0000 1.193
+++ breakpoint.c 14 Jan 2005 23:25:21 -0000
@@ -3604,7 +3604,7 @@ gdb_breakpoint_query (struct ui_out *uio
/* For the moment we don't trust print_one_breakpoint() to not throw
an error. */
return catch_exceptions_with_msg (uiout, do_captured_breakpoint_query, &args,
- NULL, error_message, RETURN_MASK_ALL);
+ error_message, RETURN_MASK_ALL);
}
/* Return non-zero if B is user settable (breakpoints, watchpoints,
@@ -5437,7 +5437,7 @@ gdb_breakpoint (char *address, char *con
args.thread = thread;
args.ignore_count = ignore_count;
return catch_exceptions_with_msg (uiout, do_captured_breakpoint, &args,
- NULL, error_message, RETURN_MASK_ALL);
+ error_message, RETURN_MASK_ALL);
}
Index: exceptions.c
===================================================================
RCS file: /cvs/src/src/gdb/exceptions.c,v
retrieving revision 1.8
diff -p -u -r1.8 exceptions.c
--- exceptions.c 14 Jan 2005 22:59:33 -0000 1.8
+++ exceptions.c 14 Jan 2005 23:25:50 -0000
@@ -467,11 +467,9 @@ int
catch_exceptions (struct ui_out *uiout,
catch_exceptions_ftype *func,
void *func_args,
- char *errstring,
return_mask mask)
{
- return catch_exceptions_with_msg (uiout, func, func_args, errstring,
- NULL, mask);
+ return catch_exceptions_with_msg (uiout, func, func_args, NULL, mask);
}
struct exception
@@ -493,13 +491,12 @@ int
catch_exceptions_with_msg (struct ui_out *uiout,
catch_exceptions_ftype *func,
void *func_args,
- char *errstring,
char **gdberrmsg,
return_mask mask)
{
volatile struct exception exception;
volatile int val = 0;
- SIGJMP_BUF *catch = catcher_init (uiout, errstring, &exception, mask, 1);
+ SIGJMP_BUF *catch = catcher_init (uiout, NULL, &exception, mask, 1);
for (SIGSETJMP ((*catch)); catcher_state_machine (CATCH_ITER);)
val = (*func) (uiout, func_args);
gdb_assert (val >= 0);
Index: exceptions.h
===================================================================
RCS file: /cvs/src/src/gdb/exceptions.h,v
retrieving revision 1.8
diff -p -u -r1.8 exceptions.h
--- exceptions.h 14 Jan 2005 22:59:33 -0000 1.8
+++ exceptions.h 14 Jan 2005 23:25:50 -0000
@@ -122,12 +122,12 @@ struct ui_out;
typedef int (catch_exceptions_ftype) (struct ui_out *ui_out, void *args);
extern int catch_exceptions (struct ui_out *uiout,
catch_exceptions_ftype *func, void *func_args,
- char *errstring, return_mask mask);
+ return_mask mask);
typedef void (catch_exception_ftype) (struct ui_out *ui_out, void *args);
extern int catch_exceptions_with_msg (struct ui_out *uiout,
catch_exceptions_ftype *func,
void *func_args,
- char *errstring, char **gdberrmsg,
+ char **gdberrmsg,
return_mask mask);
/* This function, in addition, suppresses the printing of the captured
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.198
diff -p -u -r1.198 frame.c
--- frame.c 12 Jan 2005 18:31:31 -0000 1.198
+++ frame.c 14 Jan 2005 23:25:53 -0000
@@ -803,7 +803,7 @@ get_current_frame (void)
struct frame_info *sentinel_frame =
create_sentinel_frame (current_regcache);
if (catch_exceptions (uiout, unwind_to_current_frame, sentinel_frame,
- NULL, RETURN_MASK_ERROR) != 0)
+ RETURN_MASK_ERROR) != 0)
{
/* Oops! Fake a current frame? Is this useful? It has a PC
of zero, for instance. */
Index: remote-fileio.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-fileio.c,v
retrieving revision 1.8
diff -p -u -r1.8 remote-fileio.c
--- remote-fileio.c 13 Jan 2005 00:12:49 -0000 1.8
+++ remote-fileio.c 14 Jan 2005 23:25:53 -0000
@@ -1329,7 +1329,7 @@ remote_fileio_request (char *buf)
remote_fio_no_longjmp = 0;
ex = catch_exceptions (uiout, do_remote_fileio_request, (void *)buf,
- NULL, RETURN_MASK_ALL);
+ RETURN_MASK_ALL);
switch (ex)
{
case RETURN_ERROR:
Index: symfile-mem.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile-mem.c,v
retrieving revision 1.5
diff -p -u -r1.5 symfile-mem.c
--- symfile-mem.c 12 Jan 2005 18:31:33 -0000 1.5
+++ symfile-mem.c 14 Jan 2005 23:25:53 -0000
@@ -204,7 +204,7 @@ add_vsyscall_page (struct target_ops *ta
typed "run" at the TTY. */
args.from_tty = 0;
catch_exceptions (uiout, symbol_file_add_from_memory_wrapper,
- &args, NULL, RETURN_MASK_ALL);
+ &args, RETURN_MASK_ALL);
}
}
Index: thread.c
===================================================================
RCS file: /cvs/src/src/gdb/thread.c,v
retrieving revision 1.41
diff -p -u -r1.41 thread.c
--- thread.c 13 Jan 2005 22:08:26 -0000 1.41
+++ thread.c 14 Jan 2005 23:25:53 -0000
@@ -285,7 +285,7 @@ enum gdb_rc
gdb_list_thread_ids (struct ui_out *uiout, char **error_message)
{
return catch_exceptions_with_msg (uiout, do_captured_list_thread_ids, NULL,
- NULL, error_message, RETURN_MASK_ALL);
+ error_message, RETURN_MASK_ALL);
}
/* Load infrun state for the thread PID. */
@@ -670,7 +670,7 @@ enum gdb_rc
gdb_thread_select (struct ui_out *uiout, char *tidstr, char **error_message)
{
return catch_exceptions_with_msg (uiout, do_captured_thread_select, tidstr,
- NULL, error_message, RETURN_MASK_ALL);
+ error_message, RETURN_MASK_ALL);
}
/* Commands with a prefix of `thread'. */
Index: wrapper.c
===================================================================
RCS file: /cvs/src/src/gdb/wrapper.c,v
retrieving revision 1.15
diff -p -u -r1.15 wrapper.c
--- wrapper.c 12 Jan 2005 18:31:34 -0000 1.15
+++ wrapper.c 14 Jan 2005 23:25:53 -0000
@@ -320,7 +320,7 @@ gdb_value_struct_elt (struct ui_out *uio
cargs.err = err;
cargs.result_ptr = result;
return catch_exceptions (uiout, do_captured_value_struct_elt, &cargs,
- NULL, RETURN_MASK_ALL);
+ RETURN_MASK_ALL);
}
static int