+2019-04-25 Tom Tromey <tromey@adacore.com>
+
+ * xml-support.c (gdb_xml_parser::gdb_xml_parser): Update.
+ * python/py-value.c (valpy_getitem, valpy_nonzero): Update.
+ * python/py-inferior.c (infpy_write_memory, infpy_search_memory):
+ Update.
+ * python/py-breakpoint.c (bppy_set_condition, bppy_set_commands):
+ Update.
+ * mi/mi-interp.c (mi_interp::exec): Update.
+ * linespec.c (parse_linespec): Update.
+ * infcall.c (run_inferior_call): Update.
+ * guile/scm-value.c (gdbscm_value_to_lazy_string): Update.
+ * guile/scm-symbol.c (gdbscm_lookup_symbol)
+ (gdbscm_lookup_global_symbol): Update.
+ * guile/scm-param.c (gdbscm_parameter_value): Update.
+ * guile/scm-frame.c (gdbscm_frame_read_register)
+ (gdbscm_frame_read_var): Update.
+ * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
+ * exec.c (try_open_exec_file): Update.
+ * event-top.c (gdb_rl_callback_read_char_wrapper_noexcept)
+ (gdb_rl_callback_handler): Update.
+ * common/common-exceptions.h (exception_none): Don't declare.
+ * common/common-exceptions.c (exception_none): Don't define.
+ (struct catcher) <exception>: Update.
+ * cli/cli-interp.c (safe_execute_command): Update.
+ * breakpoint.c (insert_bp_location, location_to_sals): Update.
+
2019-04-25 Ali Tamur <tamur@google.com>
* dwarf2read.c (skip_one_die): Add DW_FORM_strx.
int *hw_breakpoint_error,
int *hw_bp_error_explained_already)
{
- gdb_exception bp_excpt = exception_none;
+ gdb_exception bp_excpt;
if (!should_be_inserted (bl) || (bl->inserted && !bl->needs_update))
return 0;
location_to_sals (struct breakpoint *b, struct event_location *location,
struct program_space *search_pspace, int *found)
{
- struct gdb_exception exception = exception_none;
+ struct gdb_exception exception;
gdb_assert (b->ops != NULL);
safe_execute_command (struct ui_out *command_uiout, const char *command,
int from_tty)
{
- struct gdb_exception e = exception_none;
+ struct gdb_exception e;
/* Save and override the global ``struct ui_out'' builder. */
scoped_restore saved_uiout = make_scoped_restore (¤t_uiout,
#include "common-exceptions.h"
#include <forward_list>
-const struct gdb_exception exception_none;
-
/* Possible catcher states. */
enum catcher_state {
/* Initial state, a new catcher has just been created. */
/* Jump buffer pointing back at the exception handler. */
jmp_buf buf;
/* Status buffer belonging to the exception handler. */
- struct gdb_exception exception = exception_none;
+ struct gdb_exception exception;
};
/* Where to go for throw_exception(). */
extern void throw_quit (const char *fmt, ...)
ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
-/* A pre-defined non-exception. */
-extern const struct gdb_exception exception_none;
-
#endif /* COMMON_COMMON_EXCEPTIONS_H */
static struct gdb_exception
gdb_rl_callback_read_char_wrapper_noexcept () noexcept
{
- struct gdb_exception gdb_expt = exception_none;
+ struct gdb_exception gdb_expt;
/* C++ exceptions can't normally be thrown across readline (unless
it is built with -fexceptions, but it won't by default on many
static void
gdb_rl_callback_handler (char *rl) noexcept
{
- struct gdb_exception gdb_rl_expt = exception_none;
+ struct gdb_exception gdb_rl_expt;
struct ui *ui = current_ui;
try
try_open_exec_file (const char *exec_file_host, struct inferior *inf,
symfile_add_flags add_flags)
{
- struct gdb_exception prev_err = exception_none;
+ struct gdb_exception prev_err;
/* exec_file_attach and symbol_file_add_main may throw an error if the file
cannot be opened either locally or remotely.
{
breakpoint_smob *bp_smob
= bpscm_get_breakpoint_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
const char *location, *copy;
/* We only support registering breakpoints created with make-breakpoint. */
gdbscm_parse_function_args (FUNC_NAME, SCM_ARG2, NULL, "s",
register_scm, ®ister_str);
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
try
{
}
else if (scm_is_string (symbol_scm))
{
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
if (! SCM_UNBNDP (block_scm))
{
struct cmd_list_element *alias, *prefix, *cmd;
char *newarg;
int found = -1;
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
gdb::unique_xmalloc_ptr<char> name
= gdbscm_scm_to_host_string (self, NULL, &except_scm);
}
}
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
try
{
symbol = lookup_symbol (name, block, (domain_enum) domain,
int domain_arg_pos = -1;
int domain = VAR_DOMAIN;
struct symbol *symbol = NULL;
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
gdbscm_parse_function_args (FUNC_NAME, SCM_ARG1, keywords, "s#i",
name_scm, &name, rest,
char *encoding = NULL;
int length = -1;
SCM result = SCM_BOOL_F; /* -Wall */
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
/* The sequencing here, as everywhere else, is important.
We can't have existing cleanups when a Scheme exception is thrown. */
run_inferior_call (struct call_thread_fsm *sm,
struct thread_info *call_thread, CORE_ADDR real_pc)
{
- struct gdb_exception caught_error = exception_none;
+ struct gdb_exception caught_error;
int saved_in_infcall = call_thread->control.in_infcall;
ptid_t call_thread_ptid = call_thread->ptid;
enum prompt_state saved_prompt_state = current_ui->prompt_state;
symbol_name_match_type match_type)
{
linespec_token token;
- struct gdb_exception file_exception = exception_none;
+ struct gdb_exception file_exception;
/* A special case to start. It has become quite popular for
IDEs to work around bugs in the previous parser by quoting
mi_interp::exec (const char *command)
{
mi_execute_command_wrapper (command);
- return exception_none;
+ return gdb_exception ();
}
void
gdb::unique_xmalloc_ptr<char> exp_holder;
const char *exp = NULL;
gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
BPPY_SET_REQUIRE_VALID (self_bp);
bppy_set_commands (PyObject *self, PyObject *newvalue, void *closure)
{
gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
BPPY_SET_REQUIRE_VALID (self_bp);
static PyObject *
infpy_write_memory (PyObject *self, PyObject *args, PyObject *kw)
{
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
Py_ssize_t buf_len;
const gdb_byte *buffer;
CORE_ADDR addr, length;
static PyObject *
infpy_search_memory (PyObject *self, PyObject *args, PyObject *kw)
{
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
CORE_ADDR start_addr, length;
static const char *keywords[] = { "address", "length", "pattern", NULL };
PyObject *start_addr_obj, *length_obj;
static PyObject *
valpy_getitem (PyObject *self, PyObject *key)
{
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
value_object *self_value = (value_object *) self;
gdb::unique_xmalloc_ptr<char> field;
struct type *base_class_type = NULL, *field_type = NULL;
static int
valpy_nonzero (PyObject *self)
{
- struct gdb_exception except = exception_none;
+ struct gdb_exception except;
value_object *self_value = (value_object *) self;
struct type *type;
int nonzero = 0; /* Appease GCC warning. */
void *user_data)
: m_name (name),
m_user_data (user_data),
- m_error (exception_none),
m_last_line (0),
m_dtd_name (NULL),
m_is_xinclude (false)