diff options
Diffstat (limited to 'gdb/compile')
-rw-r--r-- | gdb/compile/compile-c-symbols.c | 15 | ||||
-rw-r--r-- | gdb/compile/compile-cplus-symbols.c | 10 | ||||
-rw-r--r-- | gdb/compile/compile-object-load.c | 5 | ||||
-rw-r--r-- | gdb/compile/compile-object-run.c | 5 |
4 files changed, 14 insertions, 21 deletions
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index 10d9ada..7e76db3 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -344,7 +344,7 @@ gcc_convert_symbol (void *datum, /* We can't allow exceptions to escape out of this callback. Safest is to simply emit a gcc error. */ - TRY + try { struct block_symbol sym; @@ -367,11 +367,10 @@ gcc_convert_symbol (void *datum, } } - CATCH (e, RETURN_MASK_ALL) + catch (const gdb_exception_RETURN_MASK_ALL &e) { context->plugin ().error (e.what ()); } - END_CATCH if (compile_debug && !found) fprintf_unfiltered (gdb_stdlog, @@ -393,7 +392,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context, /* We can't allow exceptions to escape out of this callback. Safest is to simply emit a gcc error. */ - TRY + try { struct symbol *sym; @@ -430,11 +429,10 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context, } } - CATCH (e, RETURN_MASK_ERROR) + catch (const gdb_exception_RETURN_MASK_ERROR &e) { context->plugin ().error (e.what ()); } - END_CATCH if (compile_debug && !found) fprintf_unfiltered (gdb_stdlog, @@ -548,7 +546,7 @@ generate_c_for_for_one_variable (compile_instance *compiler, struct symbol *sym) { - TRY + try { if (is_dynamic_type (SYMBOL_TYPE (sym))) { @@ -600,11 +598,10 @@ generate_c_for_for_one_variable (compile_instance *compiler, } } - CATCH (e, RETURN_MASK_ERROR) + catch (const gdb_exception_RETURN_MASK_ERROR &e) { compiler->insert_symbol_error (sym, e.what ()); } - END_CATCH } /* See compile-c.h. */ diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c index 4914c7c..1bb3a6f 100644 --- a/gdb/compile/compile-cplus-symbols.c +++ b/gdb/compile/compile-cplus-symbols.c @@ -343,7 +343,7 @@ gcc_cplus_convert_symbol (void *datum, bool found = false; compile_cplus_instance *instance = (compile_cplus_instance *) datum; - TRY + try { /* Symbol searching is a three part process unfortunately. */ @@ -388,13 +388,12 @@ gcc_cplus_convert_symbol (void *datum, } } } - CATCH (e, RETURN_MASK_ALL) + catch (const gdb_exception_RETURN_MASK_ALL &e) { /* We can't allow exceptions to escape out of this callback. Safest is to simply emit a gcc error. */ instance->plugin ().error (e.what ()); } - END_CATCH if (compile_debug && !found) fprintf_unfiltered (gdb_stdlog, @@ -431,7 +430,7 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, /* We can't allow exceptions to escape out of this callback. Safest is to simply emit a gcc error. */ - TRY + try { struct symbol *sym = lookup_symbol (identifier, nullptr, VAR_DOMAIN, nullptr).symbol; @@ -467,11 +466,10 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, } } - CATCH (e, RETURN_MASK_ERROR) + catch (const gdb_exception_RETURN_MASK_ERROR &e) { instance->plugin ().error (e.what ()); } - END_CATCH if (compile_debug && !found) fprintf_unfiltered (gdb_stdlog, diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c index db8238d..29542e7 100644 --- a/gdb/compile/compile-object-load.c +++ b/gdb/compile/compile-object-load.c @@ -50,16 +50,15 @@ munmap_list::~munmap_list () { for (auto &item : items) { - TRY + try { gdbarch_infcall_munmap (target_gdbarch (), item.addr, item.size); } - CATCH (ex, RETURN_MASK_ERROR) + catch (const gdb_exception_RETURN_MASK_ERROR &ex) { /* There's not much the user can do, so just ignore this. */ } - END_CATCH } } diff --git a/gdb/compile/compile-object-run.c b/gdb/compile/compile-object-run.c index 82b8393..1c4dd20 100644 --- a/gdb/compile/compile-object-run.c +++ b/gdb/compile/compile-object-run.c @@ -137,7 +137,7 @@ compile_object_run (struct compile_module *module) xfree (module); module = NULL; - TRY + try { struct type *func_type = SYMBOL_TYPE (func_sym); htab_t copied_types; @@ -173,7 +173,7 @@ compile_object_run (struct compile_module *module) call_function_by_hand_dummy (func_val, NULL, args, do_module_cleanup, data); } - CATCH (ex, RETURN_MASK_ERROR) + catch (const gdb_exception_RETURN_MASK_ERROR &ex) { /* In the case of DTOR_FOUND or in the case of EXECUTED nothing needs to be done. */ @@ -185,7 +185,6 @@ compile_object_run (struct compile_module *module) do_module_cleanup (data, 0); throw_exception (ex); } - END_CATCH dtor_found = find_dummy_frame_dtor (do_module_cleanup, data); gdb_assert (!dtor_found && executed); |