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-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.
|| 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)
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;
/* 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;
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. */
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;
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,
{
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)
{
/* 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);
#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 {
/* 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;
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);
{
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
/* 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;
NORETURN void
deprecated_throw_reason (enum return_reason reason)
{
- struct exception exception;
+ struct gdb_exception exception;
memset (&exception, 0, sizeof exception);
exception.reason = reason;
}
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. */
}
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)
{
}
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)
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)
{
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
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);
char **gdberrmsg,
return_mask mask)
{
- volatile struct exception exception;
+ volatile struct gdb_exception exception;
volatile int val = 0;
TRY_CATCH (exception, mask)
{
return_mask mask)
{
volatile int val = 0;
- volatile struct exception exception;
+ volatile struct gdb_exception exception;
TRY_CATCH (exception, mask)
{
val = func (func_args);
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);
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;
};
/* 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). */
/* 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);
*INDENT-OFF*
- volatile struct exception e;
+ volatile struct gdb_exception e;
TRY_CATCH (e, RETURN_MASK_ERROR)
{
}
/* 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).
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;
/* 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
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)
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);
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
/* 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);
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);
/* 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);
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" };
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);
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);
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;
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"
}
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);
}
else
{
- struct exception e
+ struct gdb_exception e
= { RETURN_ERROR, TLS_GENERIC_ERROR,
"TLS not supported or disabled on this target" };
throw_exception (e);
return 1;
}
-static struct exception
+static struct gdb_exception
tui_exec (void *data, const char *command_str)
{
internal_error (__FILE__, __LINE__, _("tui_exec called"));
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)
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)
{
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)
{
int
gdb_value_fetch_lazy (struct value *val)
{
- volatile struct exception except;
+ volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{