aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog19
-rw-r--r--gdb/breakpoint.c6
-rw-r--r--gdb/cli/cli-interp.c12
-rw-r--r--gdb/cli/cli-script.c2
-rw-r--r--gdb/dwarf2loc.c4
-rw-r--r--gdb/exceptions.c32
-rw-r--r--gdb/exceptions.h28
-rw-r--r--gdb/interps.c4
-rw-r--r--gdb/interps.h7
-rw-r--r--gdb/linux-thread-db.c8
-rw-r--r--gdb/mi/mi-interp.c6
-rw-r--r--gdb/mi/mi-main.c2
-rw-r--r--gdb/remote.c8
-rw-r--r--gdb/tui/tui-interp.c2
-rw-r--r--gdb/varobj.c2
-rw-r--r--gdb/wrapper.c18
16 files changed, 90 insertions, 70 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 34cbd8c..fa36e4c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,22 @@
+2005-04-26 Andrew Cagney <cagney@gnu.org>
+
+ Rename 'struct exception' to 'struct gdb_exception'.
+ * wrapper.c: Update.
+ * varobj.c: Update.
+ * tui/tui-interp.c: Update.
+ * remote.c: Update.
+ * mi/mi-main.c: Update.
+ * mi/mi-interp.c: Update.
+ * linux-thread-db.c: Update.
+ * interps.h: Update.
+ * interps.c: Update.
+ * exceptions.h: Update.
+ * exceptions.c: Update.
+ * dwarf2loc.c: Update.
+ * cli/cli-interp.c: Update.
+ * cli/cli-script.c: Update.
+ * breakpoint.c: Update.
+
2005-04-25 Mark Mitchell <mark@codesourcery.com>
* event-loop.c (gdb_select): Program defensively.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index f200362..6393c1f 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1088,8 +1088,8 @@ in which its expression is valid.\n"),
|| bpt->owner->type == bp_catch_vfork
|| bpt->owner->type == bp_catch_exec)
{
- struct exception e = catch_exception (uiout, insert_catchpoint,
- bpt->owner, RETURN_MASK_ERROR);
+ struct gdb_exception e = catch_exception (uiout, insert_catchpoint,
+ bpt->owner, RETURN_MASK_ERROR);
exception_fprintf (gdb_stderr, e, "warning: inserting catchpoint %d: ",
bpt->owner->number);
if (e.reason < 0)
@@ -5105,7 +5105,7 @@ do_captured_parse_breakpoint (struct ui_out *ui, void *data)
static int
break_command_1 (char *arg, int flag, int from_tty, struct breakpoint *pending_bp)
{
- struct exception e;
+ struct gdb_exception e;
int tempflag, hardwareflag;
struct symtabs_and_lines sals;
struct expression **cond = 0;
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 8893cb1..55d21bd 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -34,8 +34,8 @@ struct ui_out *cli_uiout;
/* These are the ui_out and the interpreter for the console interpreter. */
/* Longjmp-safe wrapper for "execute_command". */
-static struct exception safe_execute_command (struct ui_out *uiout,
- char *command, int from_tty);
+static struct gdb_exception safe_execute_command (struct ui_out *uiout,
+ char *command, int from_tty);
struct captured_execute_command_args
{
char *command;
@@ -92,11 +92,11 @@ cli_interpreter_display_prompt_p (void *data)
return 1;
}
-static struct exception
+static struct gdb_exception
cli_interpreter_exec (void *data, const char *command_str)
{
struct ui_file *old_stream;
- struct exception result;
+ struct gdb_exception result;
/* FIXME: cagney/2003-02-01: Need to const char *propogate
safe_execute_command. */
@@ -122,10 +122,10 @@ do_captured_execute_command (struct ui_out *uiout, void *data)
execute_command (args->command, args->from_tty);
}
-static struct exception
+static struct gdb_exception
safe_execute_command (struct ui_out *uiout, char *command, int from_tty)
{
- struct exception e;
+ struct gdb_exception e;
struct captured_execute_command_args args;
args.command = command;
args.from_tty = from_tty;
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 6d3122b..3d69601 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1274,7 +1274,7 @@ script_from_file (FILE *stream, char *file)
error_pre_print = "";
{
- struct exception e;
+ struct gdb_exception e;
struct wrapped_read_command_file_args args;
args.stream = stream;
e = catch_exception (uiout, wrapped_read_command_file, &args,
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 347b30d..00b2196 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -193,7 +193,7 @@ dwarf_expr_tls_address (void *baton, CORE_ADDR offset)
{
ptid_t ptid = inferior_ptid;
struct objfile *objfile = debaton->objfile;
- volatile struct exception ex;
+ volatile struct gdb_exception ex;
TRY_CATCH (ex, RETURN_MASK_ALL)
{
@@ -205,7 +205,7 @@ dwarf_expr_tls_address (void *baton, CORE_ADDR offset)
/* If it's 0, throw the appropriate exception. */
if (lm_addr == 0)
{
- struct exception e
+ struct gdb_exception e
= { RETURN_ERROR, TLS_LOAD_MODULE_NOT_FOUND_ERROR, 0 };
throw_exception (e);
diff --git a/gdb/exceptions.c b/gdb/exceptions.c
index 98e6f25..37b8a9e 100644
--- a/gdb/exceptions.c
+++ b/gdb/exceptions.c
@@ -32,7 +32,7 @@
#include "gdb_string.h"
#include "serial.h"
-const struct exception exception_none = { 0, NO_ERROR, NULL };
+const struct gdb_exception exception_none = { 0, NO_ERROR, NULL };
/* Possible catcher states. */
enum catcher_state {
@@ -58,7 +58,7 @@ struct catcher
/* Jump buffer pointing back at the exception handler. */
EXCEPTIONS_SIGJMP_BUF buf;
/* Status buffer belonging to the exception handler. */
- volatile struct exception *exception;
+ volatile struct gdb_exception *exception;
/* Saved/current state. */
int mask;
struct ui_out *saved_uiout;
@@ -72,7 +72,7 @@ static struct catcher *current_catcher;
EXCEPTIONS_SIGJMP_BUF *
exceptions_state_mc_init (struct ui_out *func_uiout,
- volatile struct exception *exception,
+ volatile struct gdb_exception *exception,
return_mask mask)
{
struct catcher *new_catcher = XZALLOC (struct catcher);
@@ -174,7 +174,7 @@ exceptions_state_mc (enum catcher_action action)
{
case CATCH_ITER:
{
- struct exception exception = *current_catcher->exception;
+ struct gdb_exception exception = *current_catcher->exception;
if (current_catcher->mask & RETURN_MASK (exception.reason))
{
/* Exit normally if this catcher can handle this
@@ -212,7 +212,7 @@ exceptions_state_mc_action_iter_1 (void)
/* Return EXCEPTION to the nearest containing catch_errors(). */
NORETURN void
-throw_exception (struct exception exception)
+throw_exception (struct gdb_exception exception)
{
quit_flag = 0;
immediate_quit = 0;
@@ -241,7 +241,7 @@ static char *last_message;
NORETURN void
deprecated_throw_reason (enum return_reason reason)
{
- struct exception exception;
+ struct gdb_exception exception;
memset (&exception, 0, sizeof exception);
exception.reason = reason;
@@ -289,7 +289,7 @@ print_flush (void)
}
static void
-print_exception (struct ui_file *file, struct exception e)
+print_exception (struct ui_file *file, struct gdb_exception e)
{
/* KLUGE: cagney/2005-01-13: Write the string out one line at a time
as that way the MI's behavior is preserved. */
@@ -324,7 +324,7 @@ print_exception (struct ui_file *file, struct exception e)
}
void
-exception_print (struct ui_file *file, struct exception e)
+exception_print (struct ui_file *file, struct gdb_exception e)
{
if (e.reason < 0 && e.message != NULL)
{
@@ -334,7 +334,7 @@ exception_print (struct ui_file *file, struct exception e)
}
void
-exception_fprintf (struct ui_file *file, struct exception e,
+exception_fprintf (struct ui_file *file, struct gdb_exception e,
const char *prefix, ...)
{
if (e.reason < 0 && e.message != NULL)
@@ -354,7 +354,7 @@ exception_fprintf (struct ui_file *file, struct exception e,
void
print_any_exception (struct ui_file *file, const char *prefix,
- struct exception e)
+ struct gdb_exception e)
{
if (e.reason < 0 && e.message != NULL)
{
@@ -377,7 +377,7 @@ NORETURN static void
throw_it (enum return_reason reason, enum errors error, const char *fmt,
va_list ap)
{
- struct exception e;
+ struct gdb_exception e;
char *new_message;
/* Save the message. Create the new message before deleting the
@@ -457,13 +457,13 @@ catch_exceptions (struct ui_out *uiout,
return catch_exceptions_with_msg (uiout, func, func_args, NULL, mask);
}
-struct exception
+struct gdb_exception
catch_exception (struct ui_out *uiout,
catch_exception_ftype *func,
void *func_args,
return_mask mask)
{
- volatile struct exception exception;
+ volatile struct gdb_exception exception;
TRY_CATCH (exception, mask)
{
(*func) (uiout, func_args);
@@ -478,7 +478,7 @@ catch_exceptions_with_msg (struct ui_out *uiout,
char **gdberrmsg,
return_mask mask)
{
- volatile struct exception exception;
+ volatile struct gdb_exception exception;
volatile int val = 0;
TRY_CATCH (exception, mask)
{
@@ -509,7 +509,7 @@ catch_errors (catch_errors_ftype *func, void *func_args, char *errstring,
return_mask mask)
{
volatile int val = 0;
- volatile struct exception exception;
+ volatile struct gdb_exception exception;
TRY_CATCH (exception, mask)
{
val = func (func_args);
@@ -524,7 +524,7 @@ int
catch_command_errors (catch_command_errors_ftype * command,
char *arg, int from_tty, return_mask mask)
{
- volatile struct exception e;
+ volatile struct gdb_exception e;
TRY_CATCH (e, mask)
{
command (arg, from_tty);
diff --git a/gdb/exceptions.h b/gdb/exceptions.h
index ea4f3a2..10b2ac5 100644
--- a/gdb/exceptions.h
+++ b/gdb/exceptions.h
@@ -68,15 +68,15 @@ enum errors {
TLS_NOT_ALLOCATED_YET_ERROR,
/* Something else went wrong while attempting to find thread local
- storage. The ``struct exception'' message field provides more
- detail. */
+ storage. The ``struct gdb_exception'' message field provides
+ more detail. */
TLS_GENERIC_ERROR,
/* Add more errors here. */
NR_ERRORS
};
-struct exception
+struct gdb_exception
{
enum return_reason reason;
enum errors error;
@@ -84,7 +84,7 @@ struct exception
};
/* A pre-defined non-exception. */
-extern const struct exception exception_none;
+extern const struct gdb_exception exception_none;
/* Wrap set/long jmp so that it's more portable (internal to
exceptions). */
@@ -102,7 +102,7 @@ extern const struct exception exception_none;
/* Functions to drive the exceptions state m/c (internal to
exceptions). */
EXCEPTIONS_SIGJMP_BUF *exceptions_state_mc_init (struct ui_out *func_uiout,
- volatile struct exception *
+ volatile struct gdb_exception *
exception,
return_mask mask);
int exceptions_state_mc_action_iter (void);
@@ -119,7 +119,7 @@ int exceptions_state_mc_action_iter_1 (void);
*INDENT-OFF*
- volatile struct exception e;
+ volatile struct gdb_exception e;
TRY_CATCH (e, RETURN_MASK_ERROR)
{
}
@@ -144,12 +144,12 @@ int exceptions_state_mc_action_iter_1 (void);
/* If E is an exception, print it's error message on the specified
stream. for _fprintf, prefix the message with PREFIX... */
-extern void exception_print (struct ui_file *file, struct exception e);
-extern void exception_fprintf (struct ui_file *file, struct exception e,
+extern void exception_print (struct ui_file *file, struct gdb_exception e);
+extern void exception_fprintf (struct ui_file *file, struct gdb_exception e,
const char *prefix,
...) ATTR_FORMAT (printf, 3, 4);
-/* Throw an exception (as described by "struct exception"). Will
+/* Throw an exception (as described by "struct gdb_exception"). Will
execute a LONG JUMP to the inner most containing exception handler
established using catch_exceptions() (or similar).
@@ -160,7 +160,7 @@ extern void exception_fprintf (struct ui_file *file, struct exception e,
be a good thing or a dangerous thing.'' -- the Existential
Wombat. */
-extern NORETURN void throw_exception (struct exception exception) ATTR_NORETURN;
+extern NORETURN void throw_exception (struct gdb_exception exception) ATTR_NORETURN;
extern NORETURN void throw_verror (enum errors, const char *fmt,
va_list ap) ATTR_NORETURN;
extern NORETURN void throw_vfatal (const char *fmt, va_list ap) ATTR_NORETURN;
@@ -212,10 +212,10 @@ extern int catch_exceptions_with_msg (struct ui_out *uiout,
/* This function, in addition, suppresses the printing of the captured
error message. It's up to the client to print it. */
-extern struct exception catch_exception (struct ui_out *uiout,
- catch_exception_ftype *func,
- void *func_args,
- return_mask mask);
+extern struct gdb_exception catch_exception (struct ui_out *uiout,
+ catch_exception_ftype *func,
+ void *func_args,
+ return_mask mask);
/* If CATCH_ERRORS_FTYPE throws an error, catch_errors() returns zero
otherwize the result from CATCH_ERRORS_FTYPE is returned. It is
diff --git a/gdb/interps.c b/gdb/interps.c
index 97befa7..29cfe20 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -305,7 +305,7 @@ interp_exec_p (struct interp *interp)
return interp->procs->exec_proc != NULL;
}
-struct exception
+struct gdb_exception
interp_exec (struct interp *interp, const char *command_str)
{
if (interp->procs->exec_proc != NULL)
@@ -398,7 +398,7 @@ interpreter_exec_cmd (char *args, int from_tty)
for (i = 1; i < nrules; i++)
{
- struct exception e = interp_exec (interp_to_use, prules[i]);
+ struct gdb_exception e = interp_exec (interp_to_use, prules[i]);
if (e.reason < 0)
{
interp_set (old_interp);
diff --git a/gdb/interps.h b/gdb/interps.h
index 9ef68a6..858c1e4 100644
--- a/gdb/interps.h
+++ b/gdb/interps.h
@@ -33,15 +33,16 @@ extern int interp_resume (struct interp *interp);
extern int interp_suspend (struct interp *interp);
extern int interp_prompt_p (struct interp *interp);
extern int interp_exec_p (struct interp *interp);
-extern struct exception interp_exec (struct interp *interp,
- const char *command);
+extern struct gdb_exception interp_exec (struct interp *interp,
+ const char *command);
extern int interp_quiet_p (struct interp *interp);
typedef void *(interp_init_ftype) (void);
typedef int (interp_resume_ftype) (void *data);
typedef int (interp_suspend_ftype) (void *data);
typedef int (interp_prompt_p_ftype) (void *data);
-typedef struct exception (interp_exec_ftype) (void *data, const char *command);
+typedef struct gdb_exception (interp_exec_ftype) (void *data,
+ const char *command);
typedef void (interp_command_loop_ftype) (void *data);
struct interp_procs
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 396b2a4..30f9c94 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1247,7 +1247,7 @@ thread_db_get_thread_local_address (ptid_t ptid,
/* glibc doesn't provide the needed interface. */
if (!td_thr_tls_get_addr_p)
{
- struct exception e
+ struct gdb_exception e
= { RETURN_ERROR, TLS_NO_LIBRARY_SUPPORT_ERROR, 0 };
throw_exception (e);
@@ -1272,7 +1272,7 @@ thread_db_get_thread_local_address (ptid_t ptid,
address, we *could* try to build a non-lvalue value from
the initialization image. */
- struct exception e
+ struct gdb_exception e
= { RETURN_ERROR, TLS_NOT_ALLOCATED_YET_ERROR, 0 };
throw_exception (e);
@@ -1282,7 +1282,7 @@ thread_db_get_thread_local_address (ptid_t ptid,
/* Something else went wrong. */
if (err != TD_OK)
{
- struct exception e
+ struct gdb_exception e
= { RETURN_ERROR, TLS_GENERIC_ERROR, thread_db_err_str (err) };
throw_exception (e);
@@ -1296,7 +1296,7 @@ thread_db_get_thread_local_address (ptid_t ptid,
return target_beneath->to_get_thread_local_address (ptid, lm, offset);
else
{
- struct exception e
+ struct gdb_exception e
= { RETURN_ERROR, TLS_GENERIC_ERROR,
"TLS not supported on this target" };
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 7166f94..c46640d 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -145,10 +145,10 @@ mi_interpreter_suspend (void *data)
return 1;
}
-static struct exception
+static struct gdb_exception
mi_interpreter_exec (void *data, const char *command)
{
- static struct exception ok;
+ static struct gdb_exception ok;
char *tmp = alloca (strlen (command) + 1);
strcpy (tmp, command);
mi_execute_command_wrapper (tmp);
@@ -238,7 +238,7 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc)
and then set it back to 0 when we are done. */
sync_execution = 1;
{
- struct exception e = interp_exec (interp_to_use, argv[i]);
+ struct gdb_exception e = interp_exec (interp_to_use, argv[i]);
if (e.reason < 0)
{
mi_error_message = xstrdup (e.message);
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 27080df..036c19b 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1156,7 +1156,7 @@ mi_execute_command (char *cmd, int from_tty)
if (command != NULL)
{
- struct exception result;
+ struct gdb_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;
diff --git a/gdb/remote.c b/gdb/remote.c
index 33199bf..7ad9ec2 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2179,7 +2179,7 @@ static void
remote_open_1 (char *name, int from_tty, struct target_ops *target,
int extended_p, int async_p)
{
- struct exception ex;
+ struct gdb_exception ex;
struct remote_state *rs = get_remote_state ();
if (name == 0)
error (_("To open a remote debug connection, you need to specify what\n"
@@ -5358,14 +5358,14 @@ remote_get_thread_local_address (ptid_t ptid, CORE_ADDR lm, CORE_ADDR offset)
}
else if (result == PACKET_UNKNOWN)
{
- struct exception e
+ struct gdb_exception e
= { RETURN_ERROR, TLS_GENERIC_ERROR,
"Remote target doesn't support qGetTLSAddr packet" };
throw_exception (e);
}
else
{
- struct exception e
+ struct gdb_exception e
= { RETURN_ERROR, TLS_GENERIC_ERROR,
"Remote target failed to process qGetTLSAddr request" };
throw_exception (e);
@@ -5374,7 +5374,7 @@ remote_get_thread_local_address (ptid_t ptid, CORE_ADDR lm, CORE_ADDR offset)
}
else
{
- struct exception e
+ struct gdb_exception e
= { RETURN_ERROR, TLS_GENERIC_ERROR,
"TLS not supported or disabled on this target" };
throw_exception (e);
diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c
index d004b09..17dda51 100644
--- a/gdb/tui/tui-interp.c
+++ b/gdb/tui/tui-interp.c
@@ -106,7 +106,7 @@ tui_display_prompt_p (void *data)
return 1;
}
-static struct exception
+static struct gdb_exception
tui_exec (void *data, const char *command_str)
{
internal_error (__FILE__, __LINE__, _("tui_exec called"));
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 23c2a51..31d8fd2 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1452,7 +1452,7 @@ variable_default_display (struct varobj *var)
static int
my_value_equal (struct value *val1, struct value *volatile val2, int *error2)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
/* As a special case, if both are null, we say they're equal. */
if (val1 == NULL && val2 == NULL)
diff --git a/gdb/wrapper.c b/gdb/wrapper.c
index 39f8eaa..f111935 100644
--- a/gdb/wrapper.c
+++ b/gdb/wrapper.c
@@ -27,7 +27,7 @@ int
gdb_parse_exp_1 (char **stringptr, struct block *block, int comma,
struct expression **expression)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
@@ -42,7 +42,7 @@ gdb_parse_exp_1 (char **stringptr, struct block *block, int comma,
int
gdb_evaluate_expression (struct expression *exp, struct value **value)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
@@ -57,7 +57,7 @@ gdb_evaluate_expression (struct expression *exp, struct value **value)
int
gdb_value_fetch_lazy (struct value *val)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
@@ -72,7 +72,7 @@ gdb_value_fetch_lazy (struct value *val)
int
gdb_value_equal (struct value *val1, struct value *val2, int *result)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
@@ -88,7 +88,7 @@ int
gdb_value_assign (struct value *val1, struct value *val2,
struct value **result)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
@@ -104,7 +104,7 @@ int
gdb_value_subscript (struct value *val1, struct value *val2,
struct value **result)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
@@ -119,7 +119,7 @@ gdb_value_subscript (struct value *val1, struct value *val2,
int
gdb_value_ind (struct value *val, struct value **result)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
@@ -134,7 +134,7 @@ gdb_value_ind (struct value *val, struct value **result)
int
gdb_parse_and_eval_type (char *p, int length, struct type **type)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
@@ -151,7 +151,7 @@ gdb_value_struct_elt (struct ui_out *uiout, struct value **result,
struct value **argp, struct value **args, char *name,
int *static_memfuncp, char *err)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ALL)
{