From patchwork Sun Apr 7 19:57:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32189 Received: (qmail 107677 invoked by alias); 7 Apr 2019 19:57:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 107563 invoked by uid 89); 7 Apr 2019 19:57:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.0 required=5.0 tests=AWL, BAYES_00, FILL_THIS_FORM_LOAN, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=thr, recorded, caught, capable X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.46.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 07 Apr 2019 19:57:21 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 02AB0400C8E6D for ; Sun, 7 Apr 2019 14:57:20 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id DDuphYCXp90onDDuphl5f7; Sun, 07 Apr 2019 14:57:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XOdjHsH82hvv46XGmKyqDmX4W15sVTwXKsW8LBrW2YQ=; b=m1PbNRj3S9J0GFPxBVM9DAn23d 0a5wcRbNrGgrHWV/V3k91q6r3oY+pNGbvyhg8HFQpv4W9BhLKy9/daR08fOs4ri85zm1ZPN5QRYNc Jx26bYHDvbvNlfZucZ0vKcEub; Received: from 174-29-37-56.hlrn.qwest.net ([174.29.37.56]:51312 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hDDup-003h9z-8f; Sun, 07 Apr 2019 14:57:19 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v3 4/7] Rename gdb exception types Date: Sun, 7 Apr 2019 13:57:12 -0600 Message-Id: <20190407195715.24669-5-tom@tromey.com> In-Reply-To: <20190407195715.24669-1-tom@tromey.com> References: <20190407195715.24669-1-tom@tromey.com> This renames the gdb exception types. The old types were only needed due to the macros in common-exception.h that are now gone. The intermediate layer of gdb_exception_RETURN_MASK_ALL did not seem needed, so this patch removes it entirely. gdb/ChangeLog 2019-04-07 Tom Tromey * common/common-exceptions.h (gdb_exception_RETURN_MASK_ALL): Remove. (gdb_exception_error): Rename from gdb_exception_RETURN_MASK_ERROR. (gdb_exception_quit): Rename from gdb_exception_RETURN_MASK_QUIT. (gdb_quit_bad_alloc): Update. * aarch64-tdep.c: Update. * ada-lang.c: Update. * ada-typeprint.c: Update. * ada-valprint.c: Update. * amd64-tdep.c: Update. * arch-utils.c: Update. * break-catch-throw.c: Update. * breakpoint.c: Update. * btrace.c: Update. * c-varobj.c: Update. * cli/cli-cmds.c: Update. * cli/cli-interp.c: Update. * cli/cli-script.c: Update. * common/common-exceptions.c: Update. * common/new-op.c: Update. * common/selftest.c: Update. * compile/compile-c-symbols.c: Update. * compile/compile-cplus-symbols.c: Update. * compile/compile-object-load.c: Update. * compile/compile-object-run.c: Update. * completer.c: Update. * corelow.c: Update. * cp-abi.c: Update. * cp-support.c: Update. * cp-valprint.c: Update. * darwin-nat.c: Update. * disasm-selftests.c: Update. * dtrace-probe.c: Update. * dwarf-index-cache.c: Update. * dwarf-index-write.c: Update. * dwarf2-frame-tailcall.c: Update. * dwarf2-frame.c: Update. * dwarf2loc.c: Update. * dwarf2read.c: Update. * eval.c: Update. * event-loop.c: Update. * event-top.c: Update. * exec.c: Update. * f-valprint.c: Update. * fbsd-tdep.c: Update. * frame-unwind.c: Update. * frame.c: Update. * gdbtypes.c: Update. * gnu-v3-abi.c: Update. * guile/guile-internal.h: Update. * guile/scm-block.c: Update. * guile/scm-breakpoint.c: Update. * guile/scm-cmd.c: Update. * guile/scm-disasm.c: Update. * guile/scm-frame.c: Update. * guile/scm-lazy-string.c: Update. * guile/scm-math.c: Update. * guile/scm-param.c: Update. * guile/scm-ports.c: Update. * guile/scm-pretty-print.c: Update. * guile/scm-symbol.c: Update. * guile/scm-symtab.c: Update. * guile/scm-type.c: Update. * guile/scm-value.c: Update. * i386-linux-tdep.c: Update. * i386-tdep.c: Update. * inf-loop.c: Update. * infcall.c: Update. * infcmd.c: Update. * infrun.c: Update. * jit.c: Update. * language.c: Update. * linespec.c: Update. * linux-fork.c: Update. * linux-nat.c: Update. * linux-tdep.c: Update. * linux-thread-db.c: Update. * main.c: Update. * mi/mi-cmd-break.c: Update. * mi/mi-cmd-stack.c: Update. * mi/mi-interp.c: Update. * mi/mi-main.c: Update. * objc-lang.c: Update. * p-valprint.c: Update. * parse.c: Update. * ppc-linux-tdep.c: Update. * printcmd.c: Update. * python/py-arch.c: Update. * python/py-breakpoint.c: Update. * python/py-cmd.c: Update. * python/py-finishbreakpoint.c: Update. * python/py-frame.c: Update. * python/py-framefilter.c: Update. * python/py-gdb-readline.c: Update. * python/py-inferior.c: Update. * python/py-infthread.c: Update. * python/py-lazy-string.c: Update. * python/py-linetable.c: Update. * python/py-objfile.c: Update. * python/py-param.c: Update. * python/py-prettyprint.c: Update. * python/py-progspace.c: Update. * python/py-record-btrace.c: Update. * python/py-record.c: Update. * python/py-symbol.c: Update. * python/py-type.c: Update. * python/py-unwind.c: Update. * python/py-utils.c: Update. * python/py-value.c: Update. * python/python.c: Update. * record-btrace.c: Update. * record-full.c: Update. * remote-fileio.c: Update. * remote.c: Update. * riscv-tdep.c: Update. * rs6000-aix-tdep.c: Update. * rs6000-tdep.c: Update. * rust-exp.y: Update. * rust-lang.c: Update. * s390-tdep.c: Update. * selftest-arch.c: Update. * solib-dsbt.c: Update. * solib-frv.c: Update. * solib-spu.c: Update. * solib-svr4.c: Update. * solib.c: Update. * sparc64-linux-tdep.c: Update. * stack.c: Update. * symfile-mem.c: Update. * symmisc.c: Update. * target.c: Update. * thread.c: Update. * top.c: Update. * tracefile-tfile.c: Update. * tui/tui.c: Update. * typeprint.c: Update. * unittests/cli-utils-selftests.c: Update. * unittests/parse-connection-spec-selftests.c: Update. * valops.c: Update. * valprint.c: Update. * value.c: Update. * varobj.c: Update. * windows-nat.c: Update. * x86-linux-nat.c: Update. * xml-support.c: Update. gdb/gdbserver/ChangeLog 2019-04-07 Tom Tromey * gdbreplay.c: Update. * linux-low.c: Update. * server.c: Update. --- gdb/ChangeLog | 149 ++++++++++++++++++ gdb/aarch64-tdep.c | 4 +- gdb/ada-lang.c | 14 +- gdb/ada-typeprint.c | 2 +- gdb/ada-valprint.c | 2 +- gdb/amd64-tdep.c | 6 +- gdb/arch-utils.c | 2 +- gdb/break-catch-throw.c | 6 +- gdb/breakpoint.c | 28 ++-- gdb/btrace.c | 14 +- gdb/c-varobj.c | 8 +- gdb/cli/cli-cmds.c | 2 +- gdb/cli/cli-interp.c | 2 +- gdb/cli/cli-script.c | 4 +- gdb/common/common-exceptions.c | 4 +- gdb/common/common-exceptions.h | 22 +-- gdb/common/new-op.c | 2 +- gdb/common/selftest.c | 2 +- gdb/compile/compile-c-symbols.c | 6 +- gdb/compile/compile-cplus-symbols.c | 4 +- gdb/compile/compile-object-load.c | 2 +- gdb/compile/compile-object-run.c | 2 +- gdb/completer.c | 8 +- gdb/corelow.c | 4 +- gdb/cp-abi.c | 4 +- gdb/cp-support.c | 6 +- gdb/cp-valprint.c | 4 +- gdb/darwin-nat.c | 4 +- gdb/disasm-selftests.c | 2 +- gdb/dtrace-probe.c | 2 +- gdb/dwarf-index-cache.c | 4 +- gdb/dwarf-index-write.c | 2 +- gdb/dwarf2-frame-tailcall.c | 2 +- gdb/dwarf2-frame.c | 6 +- gdb/dwarf2loc.c | 6 +- gdb/dwarf2read.c | 2 +- gdb/eval.c | 10 +- gdb/event-loop.c | 2 +- gdb/event-top.c | 6 +- gdb/exec.c | 4 +- gdb/f-valprint.c | 2 +- gdb/fbsd-tdep.c | 6 +- gdb/frame-unwind.c | 2 +- gdb/frame.c | 12 +- gdb/gdbserver/ChangeLog | 6 + gdb/gdbserver/gdbreplay.c | 2 +- gdb/gdbserver/linux-low.c | 4 +- gdb/gdbserver/server.c | 12 +- gdb/gdbtypes.c | 2 +- gdb/gnu-v3-abi.c | 2 +- gdb/guile/guile-internal.h | 2 +- gdb/guile/scm-block.c | 2 +- gdb/guile/scm-breakpoint.c | 16 +- gdb/guile/scm-cmd.c | 2 +- gdb/guile/scm-disasm.c | 2 +- gdb/guile/scm-frame.c | 38 ++--- gdb/guile/scm-lazy-string.c | 2 +- gdb/guile/scm-math.c | 2 +- gdb/guile/scm-param.c | 4 +- gdb/guile/scm-ports.c | 2 +- gdb/guile/scm-pretty-print.c | 2 +- gdb/guile/scm-symbol.c | 10 +- gdb/guile/scm-symtab.c | 2 +- gdb/guile/scm-type.c | 24 +-- gdb/guile/scm-value.c | 30 ++-- gdb/i386-linux-tdep.c | 2 +- gdb/i386-tdep.c | 6 +- gdb/inf-loop.c | 2 +- gdb/infcall.c | 2 +- gdb/infcmd.c | 4 +- gdb/infrun.c | 14 +- gdb/jit.c | 2 +- gdb/language.c | 2 +- gdb/linespec.c | 12 +- gdb/linux-fork.c | 2 +- gdb/linux-nat.c | 8 +- gdb/linux-tdep.c | 2 +- gdb/linux-thread-db.c | 6 +- gdb/main.c | 6 +- gdb/mi/mi-cmd-break.c | 2 +- gdb/mi/mi-cmd-stack.c | 2 +- gdb/mi/mi-interp.c | 2 +- gdb/mi/mi-main.c | 4 +- gdb/objc-lang.c | 2 +- gdb/p-valprint.c | 2 +- gdb/parse.c | 4 +- gdb/ppc-linux-tdep.c | 2 +- gdb/printcmd.c | 8 +- gdb/python/py-arch.c | 2 +- gdb/python/py-breakpoint.c | 16 +- gdb/python/py-cmd.c | 2 +- gdb/python/py-finishbreakpoint.c | 12 +- gdb/python/py-frame.c | 36 ++--- gdb/python/py-framefilter.c | 4 +- gdb/python/py-gdb-readline.c | 2 +- gdb/python/py-inferior.c | 10 +- gdb/python/py-infthread.c | 2 +- gdb/python/py-lazy-string.c | 2 +- gdb/python/py-linetable.c | 2 +- gdb/python/py-objfile.c | 4 +- gdb/python/py-param.c | 2 +- gdb/python/py-prettyprint.c | 4 +- gdb/python/py-progspace.c | 4 +- gdb/python/py-record-btrace.c | 8 +- gdb/python/py-record.c | 4 +- gdb/python/py-symbol.c | 10 +- gdb/python/py-type.c | 36 ++--- gdb/python/py-unwind.c | 8 +- gdb/python/py-utils.c | 2 +- gdb/python/py-value.c | 62 ++++---- gdb/python/python.c | 14 +- gdb/record-btrace.c | 18 +-- gdb/record-full.c | 8 +- gdb/remote-fileio.c | 2 +- gdb/remote.c | 10 +- gdb/riscv-tdep.c | 4 +- gdb/rs6000-aix-tdep.c | 2 +- gdb/rs6000-tdep.c | 4 +- gdb/rust-exp.y | 2 +- gdb/rust-lang.c | 2 +- gdb/s390-tdep.c | 2 +- gdb/selftest-arch.c | 2 +- gdb/solib-dsbt.c | 2 +- gdb/solib-frv.c | 2 +- gdb/solib-spu.c | 2 +- gdb/solib-svr4.c | 12 +- gdb/solib.c | 8 +- gdb/sparc64-linux-tdep.c | 2 +- gdb/stack.c | 22 +-- gdb/symfile-mem.c | 2 +- gdb/symmisc.c | 2 +- gdb/target.c | 2 +- gdb/thread.c | 2 +- gdb/top.c | 8 +- gdb/tracefile-tfile.c | 2 +- gdb/tui/tui.c | 2 +- gdb/typeprint.c | 2 +- gdb/unittests/cli-utils-selftests.c | 4 +- .../parse-connection-spec-selftests.c | 2 +- gdb/valops.c | 4 +- gdb/valprint.c | 2 +- gdb/value.c | 4 +- gdb/varobj.c | 12 +- gdb/windows-nat.c | 2 +- gdb/x86-linux-nat.c | 2 +- gdb/xml-support.c | 4 +- 146 files changed, 606 insertions(+), 459 deletions(-) diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index bd04a672479..ebd84e9dc2b 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -878,7 +878,7 @@ aarch64_make_prologue_cache (struct frame_info *this_frame, void **this_cache) { aarch64_make_prologue_cache_1 (this_frame, cache); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); @@ -1012,7 +1012,7 @@ aarch64_make_stub_cache (struct frame_info *this_frame, void **this_cache) cache->prev_pc = get_frame_pc (this_frame); cache->available_p = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 4b51ef1939a..c141adbef3e 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -6728,7 +6728,7 @@ ada_tag_value_at_base_address (struct value *obj) offset_to_top = value_as_long (value_ind (value_ptradd (val, -2))); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { return obj; } @@ -6875,7 +6875,7 @@ ada_tag_name (struct value *tag) if (tsd != NULL) name = ada_tag_name_from_tsd (tsd); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { } @@ -9056,7 +9056,7 @@ ada_to_fixed_type_1 (struct type *type, const gdb_byte *valaddr, { xvz_found = get_int_var_value (xvz_name, size); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { /* We found the variable, but somehow failed to read its value. Rethrow the same error, but with a little @@ -12347,7 +12347,7 @@ ada_exception_message (void) { e_msg = ada_exception_message_1 (); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { e_msg.reset (nullptr); } @@ -12371,7 +12371,7 @@ ada_exception_name_addr (enum ada_exception_catchpoint_kind ex, result = ada_exception_name_addr_1 (ex, b); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { warning (_("failed to get exception name: %s"), e.what ()); return 0; @@ -12462,7 +12462,7 @@ create_excep_cond_exprs (struct ada_catchpoint *c, block_for_pc (bl->address), 0); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { warning (_("failed to reevaluate internal exception condition " "for catchpoint %d: %s"), @@ -12533,7 +12533,7 @@ should_stop_exception (const struct bp_location *bl) stop = value_true (evaluate_expression (ada_loc->excep_cond_expr.get ())); value_free_to_mark (mark); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_fprintf (gdb_stderr, ex, _("Error in testing exception condition:\n")); diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c index 8b71524cd12..89a69e9bd44 100644 --- a/gdb/ada-typeprint.c +++ b/gdb/ada-typeprint.c @@ -168,7 +168,7 @@ print_range (struct type *type, struct ui_file *stream, lo = ada_discrete_type_low_bound (type); hi = ada_discrete_type_high_bound (type); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { /* This can happen when the range is dynamic. Sometimes, resolving dynamic property values requires us to have diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 5349e93dd02..5d7823d7204 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -1209,7 +1209,7 @@ ada_val_print (struct type *type, stream, recurse, val, options, current_language); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { fprintf_filtered (stream, _(""), except.what ()); diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index dca3c4fbb44..5b8a94002d5 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -2585,7 +2585,7 @@ amd64_frame_cache (struct frame_info *this_frame, void **this_cache) { amd64_frame_cache_1 (this_frame, cache); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); @@ -2712,7 +2712,7 @@ amd64_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) cache->base_p = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); @@ -2892,7 +2892,7 @@ amd64_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) cache->base_p = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 7623aacc8d1..43f5834b383 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -973,7 +973,7 @@ gdbarch_skip_prologue_noexcept (gdbarch *gdbarch, CORE_ADDR pc) noexcept { new_pc = gdbarch_skip_prologue (gdbarch, pc); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) {} return new_pc; diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c index f9f468478d8..3b9cdd6c257 100644 --- a/gdb/break-catch-throw.c +++ b/gdb/break-catch-throw.c @@ -166,7 +166,7 @@ check_status_exception_catchpoint (struct bpstats *bs) if (!canon.empty ()) std::swap (type_name, canon); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { exception_print (gdb_stderr, e); } @@ -194,7 +194,7 @@ re_set_exception_catchpoint (struct breakpoint *self) = new_probe_location (exception_functions[kind].probe); sals = parse_probes (location.get (), filter_pspace, NULL); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { /* Using the probe interface failed. Let's fallback to the normal catchpoint mode. */ @@ -209,7 +209,7 @@ re_set_exception_catchpoint (struct breakpoint *self) sals = self->ops->decode_location (self, location.get (), filter_pspace); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { /* NOT_FOUND_ERROR just means the breakpoint will be pending, so let it through. */ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 8dfbb113a32..5bfa5b2b7b3 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -2102,7 +2102,7 @@ parse_cond_to_aexpr (CORE_ADDR scope, struct expression *cond) aexpr = gen_eval_for_expr (scope, cond); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { /* If we got here, it means the condition could not be parsed to a valid bytecode expression and thus can't be evaluated on the target's side. @@ -2277,7 +2277,7 @@ parse_cmd_to_aexpr (CORE_ADDR scope, char *cmd) format_start, format_end - format_start, argvec.size (), argvec.data ()); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { /* If we got here, it means the command could not be parsed to a valid bytecode expression and thus can't be evaluated on the target's side. @@ -2545,7 +2545,7 @@ insert_bp_location (struct bp_location *bl, if (val) bp_excpt = gdb_exception {RETURN_ERROR, GENERIC_ERROR}; } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { bp_excpt = e; } @@ -2584,7 +2584,7 @@ insert_bp_location (struct bp_location *bl, bp_excpt = gdb_exception {RETURN_ERROR, GENERIC_ERROR}; } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { bp_excpt = e; } @@ -2608,7 +2608,7 @@ insert_bp_location (struct bp_location *bl, if (val) bp_excpt = gdb_exception {RETURN_ERROR, GENERIC_ERROR}; } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { bp_excpt = e; } @@ -5016,7 +5016,7 @@ bpstat_check_watchpoint (bpstat bs) { e = watchpoint_check (bs); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_fprintf (gdb_stderr, ex, "Error evaluating expression " @@ -5253,7 +5253,7 @@ bpstat_check_breakpoint_conditions (bpstat bs, thread_info *thread) { condition_result = breakpoint_cond_eval (cond); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_fprintf (gdb_stderr, ex, "Error in testing breakpoint condition:\n"); @@ -9243,7 +9243,7 @@ create_breakpoint (struct gdbarch *gdbarch, { ops->create_sals_from_location (location, &canonical, type_wanted); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { /* If caller is interested in rc value from parse, set value. */ @@ -12056,7 +12056,7 @@ update_global_location_list_nothrow (enum ugll_insert_mode insert_mode) { update_global_location_list (insert_mode); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { } } @@ -13526,7 +13526,7 @@ update_breakpoint_locations (struct breakpoint *b, block_for_pc (sal.pc), 0); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { warning (_("failed to reevaluate condition " "for breakpoint %d: %s"), @@ -13603,7 +13603,7 @@ location_to_sals (struct breakpoint *b, struct event_location *location, { sals = b->ops->decode_location (b, location, search_pspace); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { int not_found_and_ok = 0; @@ -13813,7 +13813,7 @@ breakpoint_re_set (void) { breakpoint_re_set_one (b); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_fprintf (gdb_stderr, ex, "Error in re-setting breakpoint %d: ", @@ -14293,7 +14293,7 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition, bpt->enable_state = bp_enabled; update_watchpoint (w, 1 /* reparse */); } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { bpt->enable_state = orig_enable_state; exception_fprintf (gdb_stderr, e, _("Cannot enable watchpoint %d: "), @@ -15031,7 +15031,7 @@ save_breakpoints (const char *filename, int from_tty, { print_command_lines (current_uiout, tp->commands.get (), 2); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { current_uiout->redirect (NULL); throw_exception (ex); diff --git a/gdb/btrace.c b/gdb/btrace.c index 3bfd1c84e1b..4b2f0797206 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -687,7 +687,7 @@ ftrace_classify_insn (struct gdbarch *gdbarch, CORE_ADDR pc) else if (gdbarch_insn_is_jump (gdbarch, pc)) iclass = BTRACE_INSN_JUMP; } - catch (const gdb_exception_RETURN_MASK_ERROR &error) + catch (const gdb_exception_error &error) { } @@ -1106,7 +1106,7 @@ btrace_compute_ftrace_bts (struct thread_info *tp, { size = gdb_insn_length (gdbarch, pc); } - catch (const gdb_exception_RETURN_MASK_ERROR &error) + catch (const gdb_exception_error &error) { } @@ -1374,7 +1374,7 @@ btrace_pt_readmem_callback (gdb_byte *buffer, size_t size, if (errcode != 0) result = -pte_nomap; } - catch (const gdb_exception_RETURN_MASK_ERROR &error) + catch (const gdb_exception_error &error) { result = -pte_nomap; } @@ -1476,7 +1476,7 @@ btrace_compute_ftrace_pt (struct thread_info *tp, ftrace_add_pt (btinfo, decoder, &level, gaps); } - catch (const gdb_exception_RETURN_MASK_ALL &error) + catch (const gdb_exception &error) { /* Indicate a gap in the trace if we quit trace processing. */ if (error.reason == RETURN_QUIT && !btinfo->functions.empty ()) @@ -1556,7 +1556,7 @@ btrace_compute_ftrace (struct thread_info *tp, struct btrace_data *btrace, { btrace_compute_ftrace_1 (tp, btrace, cpu, gaps); } - catch (const gdb_exception_RETURN_MASK_ALL &error) + catch (const gdb_exception &error) { btrace_finalize_ftrace (tp, gaps); @@ -1627,7 +1627,7 @@ btrace_enable (struct thread_info *tp, const struct btrace_config *conf) && can_access_registers_thread (tp)) btrace_add_pc (tp); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { btrace_disable (tp); @@ -3060,7 +3060,7 @@ btrace_maint_update_pt_packets (struct btrace_thread_info *btinfo) { btrace_maint_decode_pt (&btinfo->maint, decoder); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { pt_pkt_free_decoder (decoder); diff --git a/gdb/c-varobj.c b/gdb/c-varobj.c index 36290dda2e2..21db8cdde98 100644 --- a/gdb/c-varobj.c +++ b/gdb/c-varobj.c @@ -97,7 +97,7 @@ adjust_value_for_child_access (struct value **value, *value = value_ind (*value); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { *value = NULL; } @@ -259,7 +259,7 @@ value_struct_element_index (struct value *value, int type_index) else result = value_primitive_field (value, 0, type_index, type); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { return NULL; } @@ -318,7 +318,7 @@ c_describe_child (const struct varobj *parent, int index, { *cvalue = value_subscript (value, real_index); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { } } @@ -395,7 +395,7 @@ c_describe_child (const struct varobj *parent, int index, *cvalue = value_ind (value); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { *cvalue = NULL; } diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 1dc82b3a875..8480ba355ce 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -267,7 +267,7 @@ complete_command (const char *arg, int from_tty) tracker = &tracker_handle_completions; } } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { return; } diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c index c8cc1b4657c..c150f40feed 100644 --- a/gdb/cli/cli-interp.c +++ b/gdb/cli/cli-interp.c @@ -367,7 +367,7 @@ safe_execute_command (struct ui_out *command_uiout, const char *command, { execute_command (command, from_tty); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { e = exception; } diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index 49645537fe3..d124d3a6c28 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -1054,7 +1054,7 @@ process_next_line (const char *p, struct command_line **command, { validator ((*command)->line); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { free_command_lines (command); throw_exception (ex); @@ -1543,7 +1543,7 @@ script_from_file (FILE *stream, const char *file) { read_command_file (stream); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { /* Re-throw the error, but with the file name information prepended. */ diff --git a/gdb/common/common-exceptions.c b/gdb/common/common-exceptions.c index b2d8e257932..d00a805dd1f 100644 --- a/gdb/common/common-exceptions.c +++ b/gdb/common/common-exceptions.c @@ -195,12 +195,12 @@ throw_exception_cxx (struct gdb_exception exception) { if (exception.reason == RETURN_QUIT) { - gdb_exception_RETURN_MASK_QUIT ex (exception); + gdb_exception_quit ex (exception); throw ex; } else if (exception.reason == RETURN_ERROR) { - gdb_exception_RETURN_MASK_ERROR ex (exception); + gdb_exception_error ex (exception); throw ex; } else diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h index 54e7404f046..55ce02dd61b 100644 --- a/gdb/common/common-exceptions.h +++ b/gdb/common/common-exceptions.h @@ -253,26 +253,18 @@ extern void exception_rethrow (void) ATTRIBUTE_NORETURN; around gdb_exception that add nothing but type info. Which is used is selected depending on the MASK argument passed to CATCH. */ -struct gdb_exception_RETURN_MASK_ALL : public gdb_exception +struct gdb_exception_error : public gdb_exception { - explicit gdb_exception_RETURN_MASK_ALL (const gdb_exception &ex) noexcept + explicit gdb_exception_error (const gdb_exception &ex) noexcept : gdb_exception (ex) { } }; -struct gdb_exception_RETURN_MASK_ERROR : public gdb_exception_RETURN_MASK_ALL +struct gdb_exception_quit : public gdb_exception { - explicit gdb_exception_RETURN_MASK_ERROR (const gdb_exception &ex) noexcept - : gdb_exception_RETURN_MASK_ALL (ex) - { - } -}; - -struct gdb_exception_RETURN_MASK_QUIT : public gdb_exception_RETURN_MASK_ALL -{ - explicit gdb_exception_RETURN_MASK_QUIT (const gdb_exception &ex) noexcept - : gdb_exception_RETURN_MASK_ALL (ex) + explicit gdb_exception_quit (const gdb_exception &ex) noexcept + : gdb_exception (ex) { } }; @@ -284,11 +276,11 @@ struct gdb_exception_RETURN_MASK_QUIT : public gdb_exception_RETURN_MASK_ALL spread around the codebase. */ struct gdb_quit_bad_alloc - : public gdb_exception_RETURN_MASK_QUIT, + : public gdb_exception_quit, public std::bad_alloc { explicit gdb_quit_bad_alloc (const gdb_exception &ex) noexcept - : gdb_exception_RETURN_MASK_QUIT (ex), + : gdb_exception_quit (ex), std::bad_alloc () { } diff --git a/gdb/common/new-op.c b/gdb/common/new-op.c index c358b802fa4..b230f111ae7 100644 --- a/gdb/common/new-op.c +++ b/gdb/common/new-op.c @@ -64,7 +64,7 @@ operator new (std::size_t sz) { malloc_failure (sz); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { throw gdb_quit_bad_alloc (ex); } diff --git a/gdb/common/selftest.c b/gdb/common/selftest.c index 3f3ff744a31..f5a7b3c344b 100644 --- a/gdb/common/selftest.c +++ b/gdb/common/selftest.c @@ -87,7 +87,7 @@ run_tests (const char *filter) ++ran; (*test) (); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { ++failed; debug_printf ("Self test failed: %s\n", ex.what ()); diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index 7e76db33d76..9545caac1e3 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -367,7 +367,7 @@ gcc_convert_symbol (void *datum, } } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { context->plugin ().error (e.what ()); } @@ -429,7 +429,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context, } } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { context->plugin ().error (e.what ()); } @@ -598,7 +598,7 @@ generate_c_for_for_one_variable (compile_instance *compiler, } } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { compiler->insert_symbol_error (sym, e.what ()); } diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c index 1bb3a6ffbfd..98133afd7cd 100644 --- a/gdb/compile/compile-cplus-symbols.c +++ b/gdb/compile/compile-cplus-symbols.c @@ -388,7 +388,7 @@ gcc_cplus_convert_symbol (void *datum, } } } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { /* We can't allow exceptions to escape out of this callback. Safest is to simply emit a gcc error. */ @@ -466,7 +466,7 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, } } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { instance->plugin ().error (e.what ()); } diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c index 29542e744ee..4e702051950 100644 --- a/gdb/compile/compile-object-load.c +++ b/gdb/compile/compile-object-load.c @@ -54,7 +54,7 @@ munmap_list::~munmap_list () { gdbarch_infcall_munmap (target_gdbarch (), item.addr, item.size); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { /* There's not much the user can do, so just ignore this. */ diff --git a/gdb/compile/compile-object-run.c b/gdb/compile/compile-object-run.c index 1c4dd2014f0..5bad049fc51 100644 --- a/gdb/compile/compile-object-run.c +++ b/gdb/compile/compile-object-run.c @@ -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 (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { /* In the case of DTOR_FOUND or in the case of EXECUTED nothing needs to be done. */ diff --git a/gdb/completer.c b/gdb/completer.c index 6d87174253c..d4099c7c52d 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -1025,7 +1025,7 @@ complete_expression (completion_tracker &tracker, { type = parse_expression_for_completion (text, &fieldname, &code); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { return; } @@ -1448,7 +1448,7 @@ complete_line_internal (completion_tracker &tracker, { complete_line_internal_1 (tracker, text, line_buffer, point, reason); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (except.error != MAX_COMPLETIONS_REACHED_ERROR) throw_exception (except); @@ -1861,7 +1861,7 @@ gdb_completion_word_break_characters () { return gdb_completion_word_break_characters_throw (); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { /* Set this to that gdb_rl_attempted_completion_function knows to abort early. */ @@ -2208,7 +2208,7 @@ gdb_rl_attempted_completion_function (const char *text, int start, int end) { return gdb_rl_attempted_completion_function_throw (text, start, end); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { } diff --git a/gdb/corelow.c b/gdb/corelow.c index a0fab140a14..22fe7de020c 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -466,7 +466,7 @@ core_target_open (const char *arg, int from_tty) target_update_thread_list (); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { exception_print (gdb_stderr, except); } @@ -520,7 +520,7 @@ core_target_open (const char *arg, int from_tty) { thread_command (NULL, from_tty); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { exception_print (gdb_stderr, except); } diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c index f82da4b1636..8e54538752e 100644 --- a/gdb/cp-abi.c +++ b/gdb/cp-abi.c @@ -79,7 +79,7 @@ baseclass_offset (struct type *type, int index, const gdb_byte *valaddr, embedded_offset, address, val); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); @@ -115,7 +115,7 @@ value_rtti_type (struct value *v, int *full, { ret = (*current_cp_abi.rtti_type) (v, full, top, using_enc); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { return NULL; } diff --git a/gdb/cp-support.c b/gdb/cp-support.c index 07265ef88db..d02a01df930 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -155,7 +155,7 @@ inspect_type (struct demangle_parse_info *info, { sym = lookup_symbol (name, 0, VAR_DOMAIN, 0).symbol; } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { return 0; } @@ -228,7 +228,7 @@ inspect_type (struct demangle_parse_info *info, } /* If type_print threw an exception, there is little point in continuing, so just bow out gracefully. */ - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { return 0; } @@ -427,7 +427,7 @@ replace_typedefs (struct demangle_parse_info *info, sym = lookup_symbol (local_name.get (), 0, VAR_DOMAIN, 0).symbol; } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { } diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index f45bacc1f18..e883179dfad 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -325,7 +325,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, v = value_static_field (type, i); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { fprintf_filtered (stream, _(""), @@ -512,7 +512,7 @@ cp_print_value (struct type *type, struct type *real_type, { boffset = baseclass_offset (type, i, valaddr, offset, address, val); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == NOT_AVAILABLE_ERROR) skip = -1; diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index caa4fd18827..02604338b56 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -1688,7 +1688,7 @@ darwin_attach_pid (struct inferior *inf) darwin_setup_exceptions (inf); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exit_inferior (inf); inferior_ptid = null_ptid; @@ -1952,7 +1952,7 @@ The error was: %s"), { copy_shell_to_cache (shell, new_name); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { warning (_("This version of macOS has System Integrity Protection.\n\ Because `startup-with-shell' is enabled, gdb tried to work around SIP by\n\ diff --git a/gdb/disasm-selftests.c b/gdb/disasm-selftests.c index aa4d499206a..e0d84d981ee 100644 --- a/gdb/disasm-selftests.c +++ b/gdb/disasm-selftests.c @@ -196,7 +196,7 @@ memory_error_test (struct gdbarch *gdbarch) { di.print_insn (0); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == MEMORY_ERROR) saw_memory_error = true; diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c index 92fda24a3f7..a51f35800ab 100644 --- a/gdb/dtrace-probe.c +++ b/gdb/dtrace-probe.c @@ -489,7 +489,7 @@ dtrace_process_dof_probe (struct objfile *objfile, expr = parse_expression_with_language (type_str.c_str (), language_c); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { } diff --git a/gdb/dwarf-index-cache.c b/gdb/dwarf-index-cache.c index e03bbfc9f6f..9513891a45f 100644 --- a/gdb/dwarf-index-cache.c +++ b/gdb/dwarf-index-cache.c @@ -129,7 +129,7 @@ index_cache::store (struct dwarf2_per_objfile *dwarf2_per_objfile) write_psymtabs_to_index (dwarf2_per_objfile, m_dir.c_str (), build_id_str.c_str (), dw_index_kind::GDB_INDEX); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (debug_index_cache) printf_unfiltered ("index cache: couldn't store index cache for objfile " @@ -188,7 +188,7 @@ index_cache::lookup_gdb_index (const bfd_build_id *build_id, ((const gdb_byte *) mmap_resource->mapping.get (), mmap_resource->mapping.size ()); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (debug_index_cache) printf_unfiltered ("index cache: couldn't read %s: %s\n", diff --git a/gdb/dwarf-index-write.c b/gdb/dwarf-index-write.c index 531256f2d58..3f96ffdafb6 100644 --- a/gdb/dwarf-index-write.c +++ b/gdb/dwarf-index-write.c @@ -1681,7 +1681,7 @@ save_gdb_index_command (const char *arg, int from_tty) write_psymtabs_to_index (dwarf2_per_objfile, arg, basename, index_kind); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { exception_fprintf (gdb_stderr, except, _("Error while writing index for `%s': "), diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2-frame-tailcall.c index 178a65c3be4..07db655ec56 100644 --- a/gdb/dwarf2-frame-tailcall.c +++ b/gdb/dwarf2-frame-tailcall.c @@ -399,7 +399,7 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame, } } } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (entry_values_debug) exception_print (gdb_stdout, except); diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 2274d67201a..a24235ab84f 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -1068,7 +1068,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache) internal_error (__FILE__, __LINE__, _("Unknown CFA rule.")); } } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == NOT_AVAILABLE_ERROR) { @@ -2253,7 +2253,7 @@ dwarf2_build_frame_info (struct objfile *objfile) EH_CIE_OR_FDE_TYPE_ID); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { warning (_("skipping .eh_frame info of %s: %s"), objfile_name (objfile), e.what ()); @@ -2293,7 +2293,7 @@ dwarf2_build_frame_info (struct objfile *objfile) &cie_table, &fde_table, EH_CIE_OR_FDE_TYPE_ID); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { warning (_("skipping .debug_frame info of %s: %s"), objfile_name (objfile), e.what ()); diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index d712c29a7c2..12951f546f8 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -1199,7 +1199,7 @@ call_site_find_chain (struct gdbarch *gdbarch, CORE_ADDR caller_pc, { retval = call_site_find_chain_1 (gdbarch, caller_pc, callee_pc); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { if (e.error == NO_ENTRY_VALUE_ERROR) { @@ -2167,7 +2167,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, { ctx.eval (data, size); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == NOT_AVAILABLE_ERROR) { @@ -2384,7 +2384,7 @@ dwarf2_locexpr_baton_eval (const struct dwarf2_locexpr_baton *dlbaton, { ctx.eval (dlbaton->data, dlbaton->size); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == NOT_AVAILABLE_ERROR) { diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 6453e4a2827..b718192cb12 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -6344,7 +6344,7 @@ dwarf2_build_psymtabs (struct objfile *objfile) /* (maybe) store an index in the cache. */ global_index_cache.store (dwarf2_per_objfile); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { exception_print (gdb_stderr, except); } diff --git a/gdb/eval.c b/gdb/eval.c index fa65fb1ed76..fa03369b394 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -205,7 +205,7 @@ fetch_subexp_value (struct expression *exp, int *pc, struct value **valp, { result = evaluate_subexp (NULL_TYPE, exp, pc, EVAL_NORMAL); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { /* Ignore memory errors if we want watchpoints pointing at inaccessible memory to still be created; otherwise, throw the @@ -242,7 +242,7 @@ fetch_subexp_value (struct expression *exp, int *pc, struct value **valp, value_fetch_lazy (result); *valp = result; } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { } } @@ -719,7 +719,7 @@ evaluate_var_value (enum noside noside, const block *blk, symbol *var) ret = value_of_variable (var, blk); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (noside != EVAL_AVOID_SIDE_EFFECTS) throw_exception (except); @@ -959,7 +959,7 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos, value = value_x_unop (arg2, op, noside); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (except.error == NOT_FOUND_ERROR) break; @@ -2048,7 +2048,7 @@ evaluate_subexp_standard (struct type *expect_type, value = value_x_unop (arg1, op, noside); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (except.error == NOT_FOUND_ERROR) break; diff --git a/gdb/event-loop.c b/gdb/event-loop.c index 0219578bb12..ec776f59e8c 100644 --- a/gdb/event-loop.c +++ b/gdb/event-loop.c @@ -370,7 +370,7 @@ start_event_loop (void) { result = gdb_do_one_event (); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); diff --git a/gdb/event-top.c b/gdb/event-top.c index 2d6dda37735..cd54eb5a2c5 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -212,7 +212,7 @@ gdb_rl_callback_handler (char *rl) noexcept { ui->input_handler (gdb::unique_xmalloc_ptr (rl)); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { gdb_rl_expt = ex; } @@ -1086,7 +1086,7 @@ async_disconnect (gdb_client_data arg) quit_cover (); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { fputs_filtered ("Could not kill the program being debugged", gdb_stderr); @@ -1097,7 +1097,7 @@ async_disconnect (gdb_client_data arg) { pop_all_targets (); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { } diff --git a/gdb/exec.c b/gdb/exec.c index 6a9f9194d00..b0eb9ff02a3 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -167,7 +167,7 @@ try_open_exec_file (const char *exec_file_host, struct inferior *inf, exec_file_attach will clear state. */ exec_file_attach (exec_file_host, add_flags & SYMFILE_VERBOSE); } - catch (const gdb_exception_RETURN_MASK_ERROR &err) + catch (const gdb_exception_error &err) { if (err.message != NULL) warning ("%s", err.what ()); @@ -181,7 +181,7 @@ try_open_exec_file (const char *exec_file_host, struct inferior *inf, { symbol_file_add_main (exec_file_host, add_flags); } - catch (const gdb_exception_RETURN_MASK_ERROR &err) + catch (const gdb_exception_error &err) { if (!exception_print_same (prev_err, err)) warning ("%s", err.what ()); diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 8d9dd16f755..37b0ed5176d 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -413,7 +413,7 @@ info_common_command_for_block (const struct block *block, const char *comname, value_print (val, gdb_stdout, &opts); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { printf_filtered ("", except.what ()); diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c index 4c5dacab9ce..4efa0f7ae11 100644 --- a/gdb/fbsd-tdep.c +++ b/gdb/fbsd-tdep.c @@ -750,7 +750,7 @@ fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size) { update_thread_list (); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { exception_print (gdb_stderr, e); } @@ -1999,7 +1999,7 @@ fbsd_fetch_rtld_offsets (struct gdbarch *gdbarch, struct fbsd_pspace_data *data) data->rtld_offsets_valid = true; return; } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { data->off_linkmap = -1; } @@ -2016,7 +2016,7 @@ fbsd_fetch_rtld_offsets (struct gdbarch *gdbarch, struct fbsd_pspace_data *data) data->rtld_offsets_valid = true; return; } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { data->off_linkmap = -1; } diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index 18e157950a0..8510086001a 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -105,7 +105,7 @@ frame_unwind_try_unwinder (struct frame_info *this_frame, void **this_cache, { res = unwinder->sniffer (unwinder, this_frame, this_cache); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { /* Catch all exceptions, caused by either interrupt or error. Reset *THIS_CACHE. */ diff --git a/gdb/frame.c b/gdb/frame.c index 1fe465a7375..1a76bdf3b1f 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -899,7 +899,7 @@ frame_unwind_pc (struct frame_info *this_frame) pc = gdbarch_unwind_pc (prev_gdbarch, this_frame); pc_p = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == NOT_AVAILABLE_ERROR) { @@ -1913,7 +1913,7 @@ get_prev_frame_if_no_cycle (struct frame_info *this_frame) prev_frame = NULL; } } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { prev_frame->next = NULL; this_frame->prev = NULL; @@ -2094,7 +2094,7 @@ get_prev_frame_always (struct frame_info *this_frame) { prev_frame = get_prev_frame_always_1 (this_frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == MEMORY_ERROR) { @@ -2380,7 +2380,7 @@ get_frame_pc_if_available (struct frame_info *frame, CORE_ADDR *pc) { *pc = frame_unwind_pc (frame->next); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == NOT_AVAILABLE_ERROR) return 0; @@ -2462,7 +2462,7 @@ get_frame_address_in_block_if_available (struct frame_info *this_frame, { *pc = get_frame_address_in_block (this_frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == NOT_AVAILABLE_ERROR) return 0; @@ -2747,7 +2747,7 @@ get_frame_language (struct frame_info *frame) pc = get_frame_address_in_block (frame); pc_p = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c index bf566ab7942..ca0a9d31646 100644 --- a/gdb/gdbserver/gdbreplay.c +++ b/gdb/gdbserver/gdbreplay.c @@ -532,7 +532,7 @@ main (int argc, char *argv[]) { captured_main (argc, argv); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { if (exception.reason == RETURN_ERROR) { diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 6ca79d5f527..4b1a211ab7a 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -1540,7 +1540,7 @@ linux_detach_one_lwp (struct lwp_info *lwp) if (the_low_target.prepare_to_resume != NULL) the_low_target.prepare_to_resume (lwp); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (!check_ptrace_stopped_lwp_gone (lwp)) throw_exception (ex); @@ -4511,7 +4511,7 @@ linux_resume_one_lwp (struct lwp_info *lwp, { linux_resume_one_lwp_throw (lwp, step, signal, info); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (!check_ptrace_stopped_lwp_gone (lwp)) throw_exception (ex); diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 99ce21e2cc7..f2c8f15169e 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -472,7 +472,7 @@ handle_btrace_general_set (char *own_buf) write_ok (own_buf); } - catch (const gdb_exception_RETURN_MASK_ERROR &exception) + catch (const gdb_exception_error &exception) { sprintf (own_buf, "E.%s", exception.what ()); } @@ -1881,7 +1881,7 @@ handle_qxfer_btrace (const char *annex, if (result != 0) memcpy (cs.own_buf, cache.buffer, cache.used_size); } - catch (const gdb_exception_RETURN_MASK_ERROR &exception) + catch (const gdb_exception_error &exception) { sprintf (cs.own_buf, "E.%s", exception.what ()); result = -1; @@ -1952,7 +1952,7 @@ handle_qxfer_btrace_conf (const char *annex, if (result != 0) memcpy (cs.own_buf, cache.buffer, cache.used_size); } - catch (const gdb_exception_RETURN_MASK_ERROR &exception) + catch (const gdb_exception_error &exception) { sprintf (cs.own_buf, "E.%s", exception.what ()); result = -1; @@ -3553,7 +3553,7 @@ detach_or_kill_for_exit_cleanup () { detach_or_kill_for_exit (); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { fflush (stdout); fprintf (stderr, "Detach or kill failed: %s\n", @@ -3927,7 +3927,7 @@ captured_main (int argc, char *argv[]) } } } - catch (const gdb_exception_RETURN_MASK_ERROR &exception) + catch (const gdb_exception_error &exception) { fflush (stdout); fprintf (stderr, "gdbserver: %s\n", exception.what ()); @@ -3954,7 +3954,7 @@ main (int argc, char *argv[]) { captured_main (argc, argv); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { if (exception.reason == RETURN_ERROR) { diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 373b30a423d..919feaca73b 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -2575,7 +2575,7 @@ safe_parse_type (struct gdbarch *gdbarch, char *p, int length) { type = parse_and_eval_type (p, length); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { type = builtin_type (gdbarch)->builtin_void; } diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 01bb82bf664..6407c9beb82 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -910,7 +910,7 @@ print_one_vtable (struct gdbarch *gdbarch, struct value *value, { addr = value_as_address (vfn); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { printf_filtered (_(""), ex.what ()); got_error = 1; diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h index 0a24325ac34..a3e02abe41b 100644 --- a/gdb/guile/guile-internal.h +++ b/gdb/guile/guile-internal.h @@ -681,7 +681,7 @@ gdbscm_wrap (Function &&func, Args &&... args) { result = func (std::forward (args)...); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } diff --git a/gdb/guile/scm-block.c b/gdb/guile/scm-block.c index 6f91f88d65b..2114ca1f199 100644 --- a/gdb/guile/scm-block.c +++ b/gdb/guile/scm-block.c @@ -687,7 +687,7 @@ gdbscm_lookup_block (SCM pc_scm) if (cust != NULL && COMPUNIT_OBJFILE (cust) != NULL) block = block_for_pc (pc); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c index 356abca9124..3ba2dab18f6 100644 --- a/gdb/guile/scm-breakpoint.c +++ b/gdb/guile/scm-breakpoint.c @@ -465,7 +465,7 @@ gdbscm_register_breakpoint_x (SCM self) gdb_assert_not_reached ("invalid breakpoint type"); } } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -493,7 +493,7 @@ gdbscm_delete_breakpoint_x (SCM self) { delete_breakpoint (bp_smob->bp); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -593,7 +593,7 @@ gdbscm_set_breakpoint_enabled_x (SCM self, SCM newvalue) else disable_breakpoint (bp_smob->bp); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -627,7 +627,7 @@ gdbscm_set_breakpoint_silent_x (SCM self, SCM newvalue) { breakpoint_set_silent (bp_smob->bp, gdbscm_is_true (newvalue)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -667,7 +667,7 @@ gdbscm_set_breakpoint_ignore_count_x (SCM self, SCM newvalue) { set_ignore_count (bp_smob->number, (int) value, 0); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -787,7 +787,7 @@ gdbscm_set_breakpoint_task_x (SCM self, SCM newvalue) { valid_id = valid_task_id (id); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -807,7 +807,7 @@ gdbscm_set_breakpoint_task_x (SCM self, SCM newvalue) { breakpoint_set_task (bp_smob->bp, id); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -972,7 +972,7 @@ gdbscm_breakpoint_commands (SCM self) { print_command_lines (current_uiout, breakpoint_commands (bp), 0); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { current_uiout->redirect (NULL); gdbscm_throw_gdb_exception (except); diff --git a/gdb/guile/scm-cmd.c b/gdb/guile/scm-cmd.c index a89650b2627..38db7f5c71f 100644 --- a/gdb/guile/scm-cmd.c +++ b/gdb/guile/scm-cmd.c @@ -776,7 +776,7 @@ gdbscm_register_command_x (SCM self) c_smob->doc, cmd_list); } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } diff --git a/gdb/guile/scm-disasm.c b/gdb/guile/scm-disasm.c index 584de378f53..d673a1eb90a 100644 --- a/gdb/guile/scm-disasm.c +++ b/gdb/guile/scm-disasm.c @@ -257,7 +257,7 @@ gdbscm_arch_disassemble (SCM self, SCM start_scm, SCM rest) else insn_len = gdb_print_insn (gdbarch, pc, &buf, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c index 9360bb90cc5..ca271dbab5c 100644 --- a/gdb/guile/scm-frame.c +++ b/gdb/guile/scm-frame.c @@ -248,7 +248,7 @@ frscm_scm_from_frame (struct frame_info *frame, struct inferior *inferior) } gdbarch = get_frame_arch (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { return gdbscm_scm_from_gdb_exception (except); } @@ -400,7 +400,7 @@ gdbscm_frame_valid_p (SCM self) { frame = frscm_frame_smob_to_frame (f_smob); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -429,7 +429,7 @@ gdbscm_frame_name (SCM self) if (frame != NULL) name = find_frame_funname (frame, &lang, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -466,7 +466,7 @@ gdbscm_frame_type (SCM self) if (frame != NULL) type = get_frame_type (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -495,7 +495,7 @@ gdbscm_frame_arch (SCM self) { frame = frscm_frame_smob_to_frame (f_smob); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -525,7 +525,7 @@ gdbscm_frame_unwind_stop_reason (SCM self) { frame = frscm_frame_smob_to_frame (f_smob); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -559,7 +559,7 @@ gdbscm_frame_pc (SCM self) if (frame != NULL) pc = get_frame_pc (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -591,7 +591,7 @@ gdbscm_frame_block (SCM self) if (frame != NULL) block = get_frame_block (frame, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -641,7 +641,7 @@ gdbscm_frame_function (SCM self) if (frame != NULL) sym = find_pc_function (get_frame_address_in_block (frame)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -677,7 +677,7 @@ gdbscm_frame_older (SCM self) if (frame != NULL) prev = get_prev_frame (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -713,7 +713,7 @@ gdbscm_frame_newer (SCM self) if (frame != NULL) next = get_next_frame (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -748,7 +748,7 @@ gdbscm_frame_sal (SCM self) if (frame != NULL) sal = find_frame_sal (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -793,7 +793,7 @@ gdbscm_frame_read_register (SCM self, SCM register_scm) value = value_of_register (regnum, frame); } } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -842,7 +842,7 @@ gdbscm_frame_read_var (SCM self, SCM symbol_scm, SCM rest) { frame = frscm_frame_smob_to_frame (f_smob); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -894,7 +894,7 @@ gdbscm_frame_read_var (SCM self, SCM symbol_scm, SCM rest) var = lookup_sym.symbol; block = lookup_sym.block; } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -917,7 +917,7 @@ gdbscm_frame_read_var (SCM self, SCM symbol_scm, SCM rest) { value = read_var_value (var, block, frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -942,7 +942,7 @@ gdbscm_frame_select (SCM self) if (frame != NULL) select_frame (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -968,7 +968,7 @@ gdbscm_newest_frame (void) { frame = get_current_frame (); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -988,7 +988,7 @@ gdbscm_selected_frame (void) { frame = get_selected_frame (_("No frame is currently selected")); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } diff --git a/gdb/guile/scm-lazy-string.c b/gdb/guile/scm-lazy-string.c index 5dd386a8ab2..4d69b234bb2 100644 --- a/gdb/guile/scm-lazy-string.c +++ b/gdb/guile/scm-lazy-string.c @@ -336,7 +336,7 @@ lsscm_safe_lazy_string_to_value (SCM string, int arg_pos, break; } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { *except_scmp = gdbscm_scm_from_gdb_exception (except); return NULL; diff --git a/gdb/guile/scm-math.c b/gdb/guile/scm-math.c index 3be9fb63158..dc7245ba7b4 100644 --- a/gdb/guile/scm-math.c +++ b/gdb/guile/scm-math.c @@ -824,7 +824,7 @@ vlscm_convert_typed_value_from_scheme (const char *func_name, value = NULL; } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { except_scm = gdbscm_scm_from_gdb_exception (except); } diff --git a/gdb/guile/scm-param.c b/gdb/guile/scm-param.c index ee297122298..a55deabf56c 100644 --- a/gdb/guile/scm-param.c +++ b/gdb/guile/scm-param.c @@ -1018,7 +1018,7 @@ gdbscm_register_parameter_x (SCM self) set_list, show_list, &p_smob->set_command, &p_smob->show_command); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -1067,7 +1067,7 @@ gdbscm_parameter_value (SCM self) { found = lookup_cmd_composition (newarg, &alias, &prefix, &cmd); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } diff --git a/gdb/guile/scm-ports.c b/gdb/guile/scm-ports.c index 20557f8233a..57d3b18f962 100644 --- a/gdb/guile/scm-ports.c +++ b/gdb/guile/scm-ports.c @@ -279,7 +279,7 @@ ioscm_write (SCM port, const void *data, size_t size) else fputsn_filtered ((const char *) data, size, gdb_stdout); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } diff --git a/gdb/guile/scm-pretty-print.c b/gdb/guile/scm-pretty-print.c index 6706f826852..656c4bbc52e 100644 --- a/gdb/guile/scm-pretty-print.c +++ b/gdb/guile/scm-pretty-print.c @@ -558,7 +558,7 @@ ppscm_pretty_print_one_value (SCM printer, struct value **out_value, (_("invalid result from pretty-printer to-string"), result); } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { } diff --git a/gdb/guile/scm-symbol.c b/gdb/guile/scm-symbol.c index 65eb1014758..c135ff5ac37 100644 --- a/gdb/guile/scm-symbol.c +++ b/gdb/guile/scm-symbol.c @@ -490,7 +490,7 @@ gdbscm_symbol_needs_frame_p (SCM self) { result = symbol_read_needs_frame (symbol); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -556,7 +556,7 @@ gdbscm_symbol_value (SCM self, SCM rest) can happen with nested functions). */ value = read_var_value (symbol, NULL, frame_info); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -607,7 +607,7 @@ gdbscm_lookup_symbol (SCM name_scm, SCM rest) selected_frame = get_selected_frame (_("no frame selected")); block = get_frame_block (selected_frame, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { xfree (name); GDBSCM_HANDLE_GDB_EXCEPTION (ex); @@ -620,7 +620,7 @@ gdbscm_lookup_symbol (SCM name_scm, SCM rest) symbol = lookup_symbol (name, block, (domain_enum) domain, &is_a_field_of_this).symbol; } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -656,7 +656,7 @@ gdbscm_lookup_global_symbol (SCM name_scm, SCM rest) { symbol = lookup_global_symbol (name, NULL, (domain_enum) domain).symbol; } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c index 8879c321423..60ed7072556 100644 --- a/gdb/guile/scm-symtab.c +++ b/gdb/guile/scm-symtab.c @@ -597,7 +597,7 @@ gdbscm_find_pc_line (SCM pc_scm) sal = find_pc_line (pc, 0); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index ee0bfa7e1a3..8f47ef68cc1 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -112,7 +112,7 @@ tyscm_type_name (struct type *type) LA_PRINT_TYPE (type, "", &stb, -1, 0, &type_print_raw_options); return std::move (stb.string ()); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { SCM excp = gdbscm_scm_from_gdb_exception (except); gdbscm_throw (excp); @@ -238,7 +238,7 @@ tyscm_equal_p_type_smob (SCM type1_scm, SCM type2_scm) { result = types_deeply_equal (type1, type2); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -631,7 +631,7 @@ gdbscm_type_sizeof (SCM self) { check_typedef (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { } @@ -654,7 +654,7 @@ gdbscm_type_strip_typedefs (SCM self) { type = check_typedef (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -675,7 +675,7 @@ tyscm_get_composite (struct type *type) { type = check_typedef (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -731,7 +731,7 @@ tyscm_array_1 (SCM self, SCM n1_scm, SCM n2_scm, int is_vector, if (is_vector) make_vector_type (array); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -785,7 +785,7 @@ gdbscm_type_pointer (SCM self) { type = lookup_pointer_type (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -846,7 +846,7 @@ gdbscm_type_reference (SCM self) { type = lookup_lvalue_reference_type (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -883,7 +883,7 @@ gdbscm_type_const (SCM self) { type = make_cv_type (1, 0, type, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -905,7 +905,7 @@ gdbscm_type_volatile (SCM self) { type = make_cv_type (0, 1, type, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -927,7 +927,7 @@ gdbscm_type_unqualified (SCM self) { type = make_cv_type (0, 0, type, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -1231,7 +1231,7 @@ tyscm_lookup_typename (const char *type_name, const struct block *block) type = lookup_typename (current_language, get_current_arch (), type_name, block, 0); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { return NULL; } diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c index 7f119a202ed..5bbc3e8b8df 100644 --- a/gdb/guile/scm-value.c +++ b/gdb/guile/scm-value.c @@ -163,7 +163,7 @@ vlscm_print_value_smob (SCM self, SCM port, scm_print_state *pstate) common_val_print (v_smob->value, &stb, 0, &opts, current_language); scm_puts (stb.c_str (), port); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -190,7 +190,7 @@ vlscm_equal_p_value_smob (SCM v1, SCM v2) { result = value_equal (v1_smob->value, v2_smob->value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -394,7 +394,7 @@ gdbscm_value_address (SCM self) { address = vlscm_scm_from_value (value_addr (value)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { } @@ -529,7 +529,7 @@ gdbscm_value_dynamic_type (SCM self) type = NULL; } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -684,7 +684,7 @@ gdbscm_value_call (SCM self, SCM args) { ftype = check_typedef (value_type (function)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -752,7 +752,7 @@ gdbscm_value_to_bytevector (SCM self) length = TYPE_LENGTH (type); contents = value_contents (value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -793,7 +793,7 @@ gdbscm_value_to_bool (SCM self) { type = check_typedef (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -808,7 +808,7 @@ gdbscm_value_to_bool (SCM self) else l = value_as_long (value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -834,7 +834,7 @@ gdbscm_value_to_integer (SCM self) { type = check_typedef (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -849,7 +849,7 @@ gdbscm_value_to_integer (SCM self) else l = value_as_long (value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -879,7 +879,7 @@ gdbscm_value_to_real (SCM self) { type = check_typedef (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -905,7 +905,7 @@ gdbscm_value_to_real (SCM self) check = value_from_longest (type, (LONGEST) d); } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } @@ -998,7 +998,7 @@ gdbscm_value_to_string (SCM self, SCM rest) LA_GET_STRING (value, &buffer, &length, &char_type, &la_encoding); buffer_contents = buffer.release (); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { xfree (encoding); GDBSCM_HANDLE_GDB_EXCEPTION (except); @@ -1119,7 +1119,7 @@ gdbscm_value_to_lazy_string (SCM self, SCM rest) result = lsscm_make_lazy_string (addr, length, encoding, type); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -1181,7 +1181,7 @@ gdbscm_value_print (SCM self) { common_val_print (value, &stb, 0, &opts, current_language); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDBSCM_HANDLE_GDB_EXCEPTION (except); } diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 01bfb2c4c20..74f429b49af 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -414,7 +414,7 @@ i386_linux_handle_segmentation_fault (struct gdbarch *gdbarch, access = parse_and_eval_long ("$_siginfo._sifields._sigfault.si_addr"); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { return; } diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 27f2edf97b5..7249005ee9e 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -2086,7 +2086,7 @@ i386_frame_cache (struct frame_info *this_frame, void **this_cache) { i386_frame_cache_1 (this_frame, cache); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); @@ -2265,7 +2265,7 @@ i386_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) cache->base_p = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); @@ -2460,7 +2460,7 @@ i386_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache) cache->base_p = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c index 0aca863490a..85bd69cac2b 100644 --- a/gdb/inf-loop.c +++ b/gdb/inf-loop.c @@ -71,7 +71,7 @@ inferior_event_handler (enum inferior_event_type event_type, { bpstat_do_actions (); } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { /* If the user was running a foreground execution command, then propagate the error so that the prompt diff --git a/gdb/infcall.c b/gdb/infcall.c index 0e5b6aa1327..c102b301e00 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -605,7 +605,7 @@ run_inferior_call (struct call_thread_fsm *sm, target supports asynchronous execution. */ wait_sync_command_done (); } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { caught_error = e; } diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 2b24fae86df..116c5f00796 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -451,7 +451,7 @@ post_create_inferior (struct target_ops *target, int from_tty) { thr->suspend.stop_pc = regcache_read_pc (get_current_regcache ()); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); @@ -1652,7 +1652,7 @@ print_return_value (struct ui_out *uiout, struct return_value_info *rv) delete the breakpoint. */ print_return_value_1 (uiout, rv); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stdout, ex); } diff --git a/gdb/infrun.c b/gdb/infrun.c index 9bda7fca81d..deb7bd6abd6 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1780,7 +1780,7 @@ displaced_step_prepare (thread_info *thread) { prepared = displaced_step_prepare_throw (thread); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { struct displaced_step_inferior_state *displaced_state; @@ -2615,7 +2615,7 @@ resume (gdb_signal sig) { resume_1 (sig); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { /* If resuming is being aborted for any reason, delete any single-step breakpoint resume_1 may have created, to avoid @@ -7299,7 +7299,7 @@ insert_exception_resume_breakpoint (struct thread_info *tp, inferior_thread ()->control.exception_resume_breakpoint = bp; } } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { /* We want to ignore errors here. */ } @@ -7398,7 +7398,7 @@ check_exception_resume (struct execution_control_state *ecs, } } } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { } } @@ -7531,7 +7531,7 @@ keep_going_pass_signal (struct execution_control_state *ecs) { insert_breakpoints (); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { exception_print (gdb_stderr, e); stop_waiting (ecs); @@ -8063,7 +8063,7 @@ normal_stop (void) { execute_cmd_pre_hook (stop_command); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_fprintf (gdb_stderr, ex, "Error while running hook_stop:\n"); @@ -8768,7 +8768,7 @@ restore_infcall_control_state (struct infcall_control_state *inf_status) { restore_selected_frame (inf_status->selected_frame_id); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { exception_fprintf (gdb_stderr, ex, "Unable to restore previously selected frame:\n"); diff --git a/gdb/jit.c b/gdb/jit.c index 1b78a93653c..62942fc7ab0 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -855,7 +855,7 @@ jit_reader_try_read_symtab (struct jit_code_entry *code_entry, code_entry->symfile_size)) status = 0; } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { status = 0; } diff --git a/gdb/language.c b/gdb/language.c index 0dc4cb30119..435243e9eed 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -179,7 +179,7 @@ set_language_command (const char *ignore, frame = get_selected_frame (NULL); flang = get_frame_language (frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { flang = language_unknown; } diff --git a/gdb/linespec.c b/gdb/linespec.c index 04eb9385715..0ed9d7cf977 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -2388,7 +2388,7 @@ convert_explicit_location_to_linespec (struct linespec_state *self, *result->file_symtabs = symtabs_from_filename (source_filename, self->search_pspace); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { source_file_not_found_error (source_filename); } @@ -2613,7 +2613,7 @@ parse_linespec (linespec_parser *parser, const char *arg, = symtabs_from_filename (user_filename.get (), PARSER_STATE (parser)->search_pspace); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { file_exception = ex; } @@ -2930,7 +2930,7 @@ linespec_complete_label (completion_tracker &tracker, func_name_match_type, NULL, unknown_offset); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { return; } @@ -2960,7 +2960,7 @@ linespec_complete (completion_tracker &tracker, const char *text, { parse_linespec (&parser, text, match_type); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { } @@ -3150,7 +3150,7 @@ event_location_to_sals (linespec_parser *parser, result = parse_linespec (parser, ls->spec_string, ls->match_type); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { throw_exception (except); } @@ -3963,7 +3963,7 @@ find_linespec_symbols (struct linespec_state *state, /* If successful, we're done. If NOT_FOUND_ERROR was not thrown, rethrow the exception that we did get. */ - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (except.error != NOT_FOUND_ERROR) throw_exception (except); diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index 229f660eb91..d323a716e39 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -433,7 +433,7 @@ public: fork_load_infrun_state (m_oldfp); insert_breakpoints (); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { warning (_("Couldn't restore checkpoint state in %s: %s"), target_pid_to_str (m_oldfp->ptid).c_str (), diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index c2eb55f7d86..ed1f67c4a67 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1192,7 +1192,7 @@ linux_nat_target::attach (const char *args, int from_tty) { inf_ptrace_target::attach (args, from_tty); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { pid_t pid = parse_pid_to_attach (args); std::string reason = linux_ptrace_attach_fail_reason (pid); @@ -1405,7 +1405,7 @@ detach_one_lwp (struct lwp_info *lp, int *signo_p) { linux_target->low_prepare_to_resume (lp); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (!check_ptrace_stopped_lwp_gone (lp)) throw_exception (ex); @@ -1587,7 +1587,7 @@ linux_resume_one_lwp (struct lwp_info *lp, int step, enum gdb_signal signo) { linux_resume_one_lwp_throw (lp, step, signo); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (!check_ptrace_stopped_lwp_gone (lp)) throw_exception (ex); @@ -3549,7 +3549,7 @@ resume_stopped_resumed_lwps (struct lwp_info *lp, const ptid_t wait_ptid) linux_resume_one_lwp_throw (lp, lp->step, GDB_SIGNAL_0); } } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (!check_ptrace_stopped_lwp_gone (lp)) throw_exception (ex); diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index ccc5d17015c..5de985def39 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -1930,7 +1930,7 @@ linux_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size) { update_thread_list (); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { exception_print (gdb_stderr, e); } diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index e1b2ae6f4b8..b3e1a243183 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -502,7 +502,7 @@ thread_db_find_new_threads_silently (thread_info *stopped) thread_db_find_new_threads_2 (stopped, true); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (libthread_db_debug) exception_fprintf (gdb_stdlog, except, @@ -772,7 +772,7 @@ check_thread_db (struct thread_db_info *info, bool log_progress) if (!tdb_testinfo->threads_seen) error (_("no threads seen")); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (warning_pre_print) fputs_unfiltered (warning_pre_print, gdb_stderr); @@ -1518,7 +1518,7 @@ find_new_threads_once (struct thread_db_info *info, int iteration, TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (libthread_db_debug) { diff --git a/gdb/main.c b/gdb/main.c index 8abd9defac5..e67efc7bcdf 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -373,7 +373,7 @@ catch_command_errors (catch_command_errors_const_ftype command, maybe_wait_sync_command_done (was_sync); } - catch (const gdb_exception_RETURN_MASK_ALL &e) + catch (const gdb_exception &e) { return handle_command_errors (e); } @@ -1172,7 +1172,7 @@ captured_main (void *data) { captured_command_loop (); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } @@ -1187,7 +1187,7 @@ gdb_main (struct captured_main_args *args) { captured_main (args); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index bf358915894..1406e21aed6 100644 --- a/gdb/mi/mi-cmd-break.c +++ b/gdb/mi/mi-cmd-break.c @@ -58,7 +58,7 @@ breakpoint_notify (struct breakpoint *b) { print_breakpoint (b); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index c689d49d230..0dc0b55bc91 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -540,7 +540,7 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what, common_val_print (arg->val, &stb, 0, &opts, language_def (SYMBOL_LANGUAGE (arg->sym))); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { stb.printf (_(""), except.what ()); diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 26dfc4a5385..25c79b150ef 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -830,7 +830,7 @@ mi_print_breakpoint_for_event (struct mi_interp *mi, breakpoint *bp) print_breakpoint (bp); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 33cd1f89c42..17ca8074719 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -1942,7 +1942,7 @@ mi_execute_command (const char *cmd, int from_tty) { command = mi_parse (cmd, &token); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { mi_print_exception (token, exception); xfree (token); @@ -1969,7 +1969,7 @@ mi_execute_command (const char *cmd, int from_tty) { captured_mi_execute_command (current_uiout, command.get ()); } - catch (const gdb_exception_RETURN_MASK_ALL &result) + catch (const gdb_exception &result) { /* Like in start_event_loop, enable input and force display of the prompt. Otherwise, any command that calls diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 20e27902084..be1a27f0d78 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -1302,7 +1302,7 @@ find_objc_msgcall_submethod (int (*f) (CORE_ADDR, CORE_ADDR *), if (f (pc, new_pc) == 0) return 1; } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_fprintf (gdb_stderr, ex, "Unable to determine target of " diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 5b0b9dcf9aa..62679ac4445 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -755,7 +755,7 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr, { boffset = baseclass_offset (type, i, valaddr, offset, address, val); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == NOT_AVAILABLE_ERROR) skip = -1; diff --git a/gdb/parse.c b/gdb/parse.c index 5ae1cb96a97..cc1fd7fd1a3 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -1141,7 +1141,7 @@ parse_exp_in_context (const char **stringptr, CORE_ADDR pc, { lang->la_parser (&ps); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { /* If parsing for completion, allow this to succeed; but if no expression elements have been written, then there's nothing @@ -1228,7 +1228,7 @@ parse_expression_for_completion (const char *string, exp = parse_exp_in_context (&string, 0, 0, 0, 0, &subexp, nullptr, &cstate); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { /* Nothing, EXP remains NULL. */ } diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index e2ead9d97b0..82277a03f89 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1842,7 +1842,7 @@ ppc_linux_spe_context (int wordsize, enum bfd_endian byte_order, spe_context_cache_ptid = inferior_ptid; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { return 0; } diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 8b6f1ca0323..9e84594fe68 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1887,7 +1887,7 @@ do_one_display (struct display *d) d->exp = parse_expression (d->exp_string, &tracker); d->block = tracker.block (); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { /* Can't re-parse the expression. Disable this display item. */ d->enabled_p = 0; @@ -1952,7 +1952,7 @@ do_one_display (struct display *d) addr = gdbarch_addr_bits_remove (d->exp->gdbarch, addr); do_examine (d->format, d->exp->gdbarch, addr); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { fprintf_filtered (gdb_stdout, _("\n"), ex.what ()); @@ -1986,7 +1986,7 @@ do_one_display (struct display *d) val = evaluate_expression (d->exp.get ()); print_formatted (val, d->format.size, &opts, gdb_stdout); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { fprintf_filtered (gdb_stdout, _(""), ex.what ()); } @@ -2189,7 +2189,7 @@ print_variable_and_value (const char *name, struct symbol *var, function. */ frame = NULL; } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { fprintf_filtered (stream, "", name, except.what ()); diff --git a/gdb/python/py-arch.c b/gdb/python/py-arch.c index c7c6faea5cd..0799186ca5f 100644 --- a/gdb/python/py-arch.c +++ b/gdb/python/py-arch.c @@ -203,7 +203,7 @@ archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw) { insn_len = gdb_print_insn (gdbarch, pc, &stb, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); return NULL; diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c index 16c717c5bb4..03430e69e39 100644 --- a/gdb/python/py-breakpoint.c +++ b/gdb/python/py-breakpoint.c @@ -145,7 +145,7 @@ bppy_set_enabled (PyObject *self, PyObject *newvalue, void *closure) else disable_breakpoint (self_bp->bp); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_SET_HANDLE_EXCEPTION (except); } @@ -250,7 +250,7 @@ bppy_set_task (PyObject *self, PyObject *newvalue, void *closure) { valid_id = valid_task_id (id); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_SET_HANDLE_EXCEPTION (except); } @@ -292,7 +292,7 @@ bppy_delete_breakpoint (PyObject *self, PyObject *args) { delete_breakpoint (self_bp->bp); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -333,7 +333,7 @@ bppy_set_ignore_count (PyObject *self, PyObject *newvalue, void *closure) { set_ignore_count (self_bp->number, (int) value, 0); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_SET_HANDLE_EXCEPTION (except); } @@ -469,7 +469,7 @@ bppy_set_condition (PyObject *self, PyObject *newvalue, void *closure) { set_breakpoint_condition (self_bp->bp, exp, 0); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -498,7 +498,7 @@ bppy_get_commands (PyObject *self, void *closure) { print_command_lines (current_uiout, breakpoint_commands (bp), 0); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { current_uiout->redirect (NULL); gdbpy_convert_exception (except); @@ -540,7 +540,7 @@ bppy_set_commands (PyObject *self, PyObject *newvalue, void *closure) counted_command_line lines = read_command_lines_1 (reader, 1, nullptr); breakpoint_set_commands (self_bp->bp, std::move (lines)); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -864,7 +864,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs) error(_("Do not understand breakpoint type to set.")); } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { bppy_pending_object = NULL; gdbpy_convert_exception (except); diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index 24321278b79..87d1888c528 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -572,7 +572,7 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw) set_cmd_completer_handle_brkchars (cmd, cmdpy_completer_handle_brkchars); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { xfree (cmd_name); xfree (docstring); diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c index 6faffd2e86f..7784a92bffb 100644 --- a/gdb/python/py-finishbreakpoint.c +++ b/gdb/python/py-finishbreakpoint.c @@ -121,7 +121,7 @@ bpfinishpy_pre_stop_hook (struct gdbpy_breakpoint_object *bp_obj) self_finishbp->return_value = Py_None; } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); gdbpy_print_stack (); @@ -141,7 +141,7 @@ bpfinishpy_post_stop_hook (struct gdbpy_breakpoint_object *bp_obj) disable_breakpoint (bp_obj->bp); gdb_assert (bp_obj->bp->disposition == disp_del); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); gdbpy_print_stack (); @@ -208,7 +208,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs) } } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); return -1; @@ -267,7 +267,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs) } } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { /* Just swallow. Either the return type or the function value remain NULL. */ @@ -302,7 +302,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs) &bkpt_breakpoint_ops, 0, 1, internal_bp, 0); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_SET_HANDLE_EXCEPTION (except); } @@ -364,7 +364,7 @@ bpfinishpy_detect_out_scope_cb (struct breakpoint *b, void *args) || frame_find_by_id (b->frame_id) == NULL)) bpfinishpy_out_of_scope (finish_bp); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); gdbpy_print_stack (); diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c index 9066f6096e6..03273217076 100644 --- a/gdb/python/py-frame.c +++ b/gdb/python/py-frame.c @@ -99,7 +99,7 @@ frapy_is_valid (PyObject *self, PyObject *args) { frame = frame_object_to_frame_info (self); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -127,7 +127,7 @@ frapy_name (PyObject *self, PyObject *args) name = find_frame_funname (frame, &lang, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -161,7 +161,7 @@ frapy_type (PyObject *self, PyObject *args) type = get_frame_type (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -182,7 +182,7 @@ frapy_arch (PyObject *self, PyObject *args) { FRAPY_REQUIRE_VALID (self, frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -203,7 +203,7 @@ frapy_unwind_stop_reason (PyObject *self, PyObject *args) { FRAPY_REQUIRE_VALID (self, frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -228,7 +228,7 @@ frapy_pc (PyObject *self, PyObject *args) pc = get_frame_pc (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -264,7 +264,7 @@ frapy_read_register (PyObject *self, PyObject *args) if (val == NULL) PyErr_SetString (PyExc_ValueError, _("Unknown register.")); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -286,7 +286,7 @@ frapy_block (PyObject *self, PyObject *args) FRAPY_REQUIRE_VALID (self, frame); block = get_frame_block (frame, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -331,7 +331,7 @@ frapy_function (PyObject *self, PyObject *args) gdb::unique_xmalloc_ptr funname = find_frame_funname (frame, &funlang, &sym); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -373,7 +373,7 @@ frame_info_to_frame_object (struct frame_info *frame) } frame_obj->gdbarch = get_frame_arch (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); return NULL; @@ -398,7 +398,7 @@ frapy_older (PyObject *self, PyObject *args) prev = get_prev_frame (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -430,7 +430,7 @@ frapy_newer (PyObject *self, PyObject *args) next = get_next_frame (frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -462,7 +462,7 @@ frapy_find_sal (PyObject *self, PyObject *args) symtab_and_line sal = find_frame_sal (frame); sal_obj = symtab_and_line_to_sal_object (sal); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -521,7 +521,7 @@ frapy_read_var (PyObject *self, PyObject *args) var = lookup_sym.symbol; block = lookup_sym.block; } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); return NULL; @@ -548,7 +548,7 @@ frapy_read_var (PyObject *self, PyObject *args) val = read_var_value (var, block, frame); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -569,7 +569,7 @@ frapy_select (PyObject *self, PyObject *args) select_frame (fi); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -589,7 +589,7 @@ gdbpy_newest_frame (PyObject *self, PyObject *args) { frame = get_current_frame (); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -609,7 +609,7 @@ gdbpy_selected_frame (PyObject *self, PyObject *args) { frame = get_selected_frame ("No frame is currently selected."); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c index deb4a8f1c8b..017ea90f619 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c @@ -1085,7 +1085,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, { gdbarch = get_frame_arch (frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { /* Let gdb try to print the stack trace. */ return EXT_LANG_BT_NO_FILTERS; @@ -1170,7 +1170,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, success = py_print_frame (item.get (), flags, args_type, out, 0, levels_printed.get ()); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { gdbpy_convert_exception (except); success = EXT_LANG_BT_ERROR; diff --git a/gdb/python/py-gdb-readline.c b/gdb/python/py-gdb-readline.c index 51ec6d814ae..ec4ff9e13c0 100644 --- a/gdb/python/py-gdb-readline.c +++ b/gdb/python/py-gdb-readline.c @@ -44,7 +44,7 @@ gdbpy_readline_wrapper (FILE *sys_stdin, FILE *sys_stdout, p = command_line_input (prompt, "python"); } /* Handle errors by raising Python exceptions. */ - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { /* Detect user interrupt (Ctrl-C). */ if (except.reason == RETURN_QUIT) diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index fee6b301c0a..1bbca27bf0b 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -393,7 +393,7 @@ infpy_threads (PyObject *self, PyObject *args) { update_thread_list (); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -513,7 +513,7 @@ infpy_read_memory (PyObject *self, PyObject *args, PyObject *kw) read_memory (addr, buffer.get (), length); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -574,7 +574,7 @@ infpy_write_memory (PyObject *self, PyObject *args, PyObject *kw) { write_memory_with_notification (addr, buffer, length); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -728,7 +728,7 @@ infpy_search_memory (PyObject *self, PyObject *args, PyObject *kw) buffer, pattern_size, &found_addr); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -787,7 +787,7 @@ infpy_thread_from_thread_handle (PyObject *self, PyObject *args, PyObject *kw) if (thread_info != NULL) return thread_to_thread_object (thread_info).release (); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c index 3c6d147f48a..33ed8d53d70 100644 --- a/gdb/python/py-infthread.c +++ b/gdb/python/py-infthread.c @@ -185,7 +185,7 @@ thpy_switch (PyObject *self, PyObject *args) { switch_to_thread (thread_obj->thread); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-lazy-string.c b/gdb/python/py-lazy-string.c index 61722d929d1..87c6ceaf2a4 100644 --- a/gdb/python/py-lazy-string.c +++ b/gdb/python/py-lazy-string.c @@ -142,7 +142,7 @@ stpy_convert_to_value (PyObject *self, PyObject *args) break; } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c index 813b2d92eaa..aa43d9e7c74 100644 --- a/gdb/python/py-linetable.c +++ b/gdb/python/py-linetable.c @@ -168,7 +168,7 @@ ltpy_get_pcs_for_line (PyObject *self, PyObject *args) { pcs = find_pcs_for_symtab_line (symtab, py_line, &best_entry); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c index 75ccc18406b..199c567a044 100644 --- a/gdb/python/py-objfile.c +++ b/gdb/python/py-objfile.c @@ -134,7 +134,7 @@ objfpy_get_build_id (PyObject *self, void *closure) { build_id = build_id_bfd_get (objfile->obfd); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -426,7 +426,7 @@ objfpy_add_separate_debug_file (PyObject *self, PyObject *args, PyObject *kw) symbol_file_add_separate (abfd.get (), file_name, 0, obj->objfile); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-param.c b/gdb/python/py-param.c index c211d477ea4..afeff581ee4 100644 --- a/gdb/python/py-param.c +++ b/gdb/python/py-param.c @@ -733,7 +733,7 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds) set_doc.get (), show_doc.get (), doc.get (), set_list, show_list); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { xfree (cmd_name); Py_DECREF (self); diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index a02965da400..7760cab0ae0 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -212,7 +212,7 @@ pretty_print_one_value (PyObject *printer, struct value **out_value) } } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { } @@ -640,7 +640,7 @@ gdbpy_get_varobj_pretty_printer (struct value *value) { value = value_copy (value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c index eb6acb29dd4..4483d036ace 100644 --- a/gdb/python/py-progspace.c +++ b/gdb/python/py-progspace.c @@ -391,7 +391,7 @@ pspy_block_for_pc (PyObject *o, PyObject *args) if (cust != NULL && COMPUNIT_OBJFILE (cust) != NULL) block = block_for_pc (pc); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -436,7 +436,7 @@ pspy_find_pc_line (PyObject *o, PyObject *args) sal = find_pc_line (pc, 0); result = symtab_and_line_to_sal_object (sal); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c index 64b25fa5124..e7153fb6d7b 100644 --- a/gdb/python/py-record-btrace.c +++ b/gdb/python/py-record-btrace.c @@ -212,7 +212,7 @@ recpy_bt_insn_sal (PyObject *self, void *closure) { result = symtab_and_line_to_sal_object (find_pc_line (insn->pc, 0)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -283,7 +283,7 @@ recpy_bt_insn_data (PyObject *self, void *closure) buffer.resize (insn->size); read_memory (insn->pc, buffer.data (), insn->size); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -318,7 +318,7 @@ recpy_bt_insn_decoded (PyObject *self, void *closure) { gdb_print_insn (target_gdbarch (), insn->pc, &strfile, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); return NULL; @@ -795,7 +795,7 @@ recpy_bt_goto (PyObject *self, PyObject *args) else target_goto_record (obj->number); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-record.c b/gdb/python/py-record.c index 66fa8bf3f5e..d46a03e75ac 100644 --- a/gdb/python/py-record.c +++ b/gdb/python/py-record.c @@ -607,7 +607,7 @@ gdbpy_start_recording (PyObject *self, PyObject *args) record_start (method, format, 0); ret = gdbpy_current_recording (self, args); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); } @@ -641,7 +641,7 @@ gdbpy_stop_recording (PyObject *self, PyObject *args) { record_stop (0); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c index 63d8ab16aa1..8605ae71a24 100644 --- a/gdb/python/py-symbol.c +++ b/gdb/python/py-symbol.c @@ -200,7 +200,7 @@ sympy_needs_frame (PyObject *self, void *closure) { result = symbol_read_needs_frame (symbol); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -283,7 +283,7 @@ sympy_value (PyObject *self, PyObject *args) can happen with nested functions). */ value = read_var_value (symbol, NULL, frame_info); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -391,7 +391,7 @@ gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw) selected_frame = get_selected_frame (_("No frame selected.")); block = get_frame_block (selected_frame, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -402,7 +402,7 @@ gdbpy_lookup_symbol (PyObject *self, PyObject *args, PyObject *kw) symbol = lookup_symbol (name, block, (domain_enum) domain, &is_a_field_of_this).symbol; } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -451,7 +451,7 @@ gdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw) { symbol = lookup_global_symbol (name, NULL, (domain_enum) domain).symbol; } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index d918fc0d68e..22cc658a8b4 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -316,7 +316,7 @@ typy_fields_items (PyObject *self, enum gdbpy_iter_kind kind) { checked_type = check_typedef (checked_type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -423,7 +423,7 @@ typy_strip_typedefs (PyObject *self, PyObject *args) { type = check_typedef (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -444,7 +444,7 @@ typy_get_composite (struct type *type) { type = check_typedef (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -513,7 +513,7 @@ typy_array_1 (PyObject *self, PyObject *args, int is_vector) if (is_vector) make_vector_type (array); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -547,7 +547,7 @@ typy_pointer (PyObject *self, PyObject *args) { type = lookup_pointer_type (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -615,7 +615,7 @@ typy_reference (PyObject *self, PyObject *args) { type = lookup_lvalue_reference_type (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -649,7 +649,7 @@ typy_const (PyObject *self, PyObject *args) { type = make_cv_type (1, 0, type, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -667,7 +667,7 @@ typy_volatile (PyObject *self, PyObject *args) { type = make_cv_type (0, 1, type, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -685,7 +685,7 @@ typy_unqualified (PyObject *self, PyObject *args) { type = make_cv_type (0, 0, type, NULL); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -703,7 +703,7 @@ typy_get_sizeof (PyObject *self, void *closure) { check_typedef (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { } @@ -723,7 +723,7 @@ typy_get_alignof (PyObject *self, void *closure) { align = type_align (type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { align = 0; } @@ -750,7 +750,7 @@ typy_lookup_typename (const char *type_name, const struct block *block) type = lookup_typename (python_language, python_gdbarch, type_name, block, 0); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -804,7 +804,7 @@ typy_lookup_type (struct demangle_component *demangled, break; } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -846,7 +846,7 @@ typy_legacy_template_argument (struct type *type, const struct block *block, /* Note -- this is not thread-safe. */ info = cp_demangled_name_to_comp (TYPE_NAME (type), &err); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -926,7 +926,7 @@ typy_template_argument (PyObject *self, PyObject *args) if (TYPE_IS_REFERENCE (type)) type = check_typedef (TYPE_TARGET_TYPE (type)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -958,7 +958,7 @@ typy_template_argument (PyObject *self, PyObject *args) { val = value_of_variable (sym, block); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -976,7 +976,7 @@ typy_str (PyObject *self) LA_PRINT_TYPE (type_object_to_type (self), "", &thetype, -1, 0, &type_print_raw_options); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1010,7 +1010,7 @@ typy_richcompare (PyObject *self, PyObject *other, int op) { result = types_deeply_equal (type1, type2); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { /* If there is a GDB exception, a comparison is not capable (or trusted), so exit. */ diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index e506ec01396..08c3aff928b 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -150,7 +150,7 @@ pyuw_value_obj_to_pointer (PyObject *pyo_value, CORE_ADDR *addr) rc = 1; } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); } @@ -215,7 +215,7 @@ unwind_infopy_str (PyObject *self) value_print (value, &stb, &opts); stb.puts (")"); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -349,7 +349,7 @@ pending_framepy_str (PyObject *self) sp_str = core_addr_to_string_nz (get_frame_sp (frame)); pc_str = core_addr_to_string_nz (get_frame_pc (frame)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -395,7 +395,7 @@ pending_framepy_read_register (PyObject *self, PyObject *args) "Cannot read register %d from frame.", regnum); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c index 76b5ac04e9c..9fee8817781 100644 --- a/gdb/python/py-utils.c +++ b/gdb/python/py-utils.c @@ -258,7 +258,7 @@ get_addr_from_python (PyObject *obj, CORE_ADDR *addr) { *addr = value_as_address (value_object_to_value (obj)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_SET_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index a761b1e5303..d3f4de40540 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -224,7 +224,7 @@ valpy_dereference (PyObject *self, PyObject *args) res_val = value_ind (((value_object *) self)->value); result = value_to_value_object (res_val); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -267,7 +267,7 @@ valpy_referenced_value (PyObject *self, PyObject *args) result = value_to_value_object (res_val); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -290,7 +290,7 @@ valpy_reference_value (PyObject *self, PyObject *args, enum type_code refcode) self_val = ((value_object *) self)->value; result = value_to_value_object (value_ref (self_val, refcode)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -326,7 +326,7 @@ valpy_const_value (PyObject *self, PyObject *args) res_val = make_cv_value (1, 0, self_val); result = value_to_value_object (res_val); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -350,7 +350,7 @@ valpy_get_address (PyObject *self, void *closure) res_val = value_addr (val_obj->value); val_obj->address = value_to_value_object (res_val); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { val_obj->address = Py_None; Py_INCREF (Py_None); @@ -428,7 +428,7 @@ valpy_get_dynamic_type (PyObject *self, void *closure) type = NULL; } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -534,7 +534,7 @@ valpy_lazy_string (PyObject *self, PyObject *args, PyObject *kw) str_obj = gdbpy_create_lazy_string_object (addr, length, user_encoding, type); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -569,7 +569,7 @@ valpy_string (PyObject *self, PyObject *args, PyObject *kw) { LA_GET_STRING (value, &buffer, &length, &char_type, &la_encoding); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -730,7 +730,7 @@ valpy_format_string (PyObject *self, PyObject *args, PyObject *kw) common_val_print (((value_object *) self)->value, &stb, 0, &opts, python_language); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -775,7 +775,7 @@ valpy_do_cast (PyObject *self, PyObject *args, enum exp_opcode op) result = value_to_value_object (res_val); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -853,7 +853,7 @@ value_has_field (struct value *v, PyObject *field) else has_field = 0; } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_SET_HANDLE_EXCEPTION (except); } @@ -1031,7 +1031,7 @@ valpy_getitem (PyObject *self, PyObject *key) if (res_val) result = value_to_value_object (res_val); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -1064,7 +1064,7 @@ valpy_call (PyObject *self, PyObject *args, PyObject *keywords) { ftype = check_typedef (value_type (function)); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1111,7 +1111,7 @@ valpy_call (PyObject *self, PyObject *args, PyObject *keywords) gdb::make_array_view (vargs, args_count)); result = value_to_value_object (return_value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1136,7 +1136,7 @@ valpy_str (PyObject *self) common_val_print (((value_object *) self)->value, &stb, 0, &opts, python_language); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1155,7 +1155,7 @@ valpy_get_is_optimized_out (PyObject *self, void *closure) { opt = value_optimized_out (value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1177,7 +1177,7 @@ valpy_get_is_lazy (PyObject *self, void *closure) { opt = value_lazy (value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1199,7 +1199,7 @@ valpy_fetch_lazy (PyObject *self, PyObject *args) if (value_lazy (value)) value_fetch_lazy (value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1370,7 +1370,7 @@ valpy_binop (enum valpy_opcode opcode, PyObject *self, PyObject *other) { result = valpy_binop_throw (opcode, self, other); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1438,7 +1438,7 @@ valpy_negative (PyObject *self) val = value_neg (((value_object *) self)->value); result = value_to_value_object (val); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1465,7 +1465,7 @@ valpy_absolute (PyObject *self) if (value_less (value, value_zero (value_type (value), not_lval))) isabs = 0; } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1498,7 +1498,7 @@ valpy_nonzero (PyObject *self) /* All other values are True. */ nonzero = 1; } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { except = ex; } @@ -1521,7 +1521,7 @@ valpy_invert (PyObject *self) { val = value_complement (((value_object *) self)->value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1648,7 +1648,7 @@ valpy_richcompare (PyObject *self, PyObject *other, int op) { result = valpy_richcompare_throw (self, other, op); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1686,7 +1686,7 @@ valpy_int (PyObject *self) l = value_as_long (value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1722,7 +1722,7 @@ valpy_long (PyObject *self) l = value_as_long (value); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1757,7 +1757,7 @@ valpy_float (PyObject *self) else error (_("Cannot convert value to float.")); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1900,7 +1900,7 @@ convert_value_from_python (PyObject *obj) PyString_AsString (PyObject_Str (obj))); #endif } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { gdbpy_convert_exception (except); return NULL; @@ -1923,7 +1923,7 @@ gdbpy_history (PyObject *self, PyObject *args) { res_val = access_value_history (i); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1952,7 +1952,7 @@ gdbpy_convenience_variable (PyObject *self, PyObject *args) res_val = NULL; } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1998,7 +1998,7 @@ gdbpy_set_convenience_variable (PyObject *self, PyObject *args) set_internalvar (var, value); } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } diff --git a/gdb/python/python.c b/gdb/python/python.c index 503639ed764..4dad8ec10d1 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -501,7 +501,7 @@ gdbpy_parameter (PyObject *self, PyObject *args) { found = lookup_cmd_composition (newarg.c_str (), &alias, &prefix, &cmd); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { GDB_PY_HANDLE_EXCEPTION (ex); } @@ -614,7 +614,7 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw) /* Do any commands attached to breakpoint we stopped at. */ bpstat_do_actions (); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -842,7 +842,7 @@ gdbpy_decode_line (PyObject *self, PyObject *args) sals = def_sal; } } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { /* We know this will always throw. */ gdbpy_convert_exception (ex); @@ -900,7 +900,7 @@ gdbpy_parse_and_eval (PyObject *self, PyObject *args) gdbpy_allow_threads allow_threads; result = parse_and_eval (expr_str); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1150,7 +1150,7 @@ gdbpy_write (PyObject *self, PyObject *args, PyObject *kw) fprintf_filtered (gdb_stdout, "%s", arg); } } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { GDB_PY_HANDLE_EXCEPTION (except); } @@ -1223,7 +1223,7 @@ gdbpy_print_stack (void) { begin_line (); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { } } @@ -1254,7 +1254,7 @@ gdbpy_print_stack (void) fprintf_filtered (gdb_stderr, "Python Exception %s %s: \n", type.get (), msg.get ()); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { } } diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c index add89698c05..f5a5306fe12 100644 --- a/gdb/record-btrace.c +++ b/gdb/record-btrace.c @@ -286,7 +286,7 @@ record_btrace_enable_warn (struct thread_info *tp) { btrace_enable (tp, &record_btrace_conf); } - catch (const gdb_exception_RETURN_MASK_ERROR &error) + catch (const gdb_exception_error &error) { warning ("%s", error.what ()); } @@ -1482,7 +1482,7 @@ record_btrace_target::insert_breakpoint (struct gdbarch *gdbarch, { ret = this->beneath ()->insert_breakpoint (gdbarch, bp_tgt); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { replay_memory_access = old; throw_exception (except); @@ -1512,7 +1512,7 @@ record_btrace_target::remove_breakpoint (struct gdbarch *gdbarch, { ret = this->beneath ()->remove_breakpoint (gdbarch, bp_tgt, reason); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { replay_memory_access = old; throw_exception (except); @@ -1989,7 +1989,7 @@ get_thread_current_frame_id (struct thread_info *tp) { id = get_frame_id (get_current_frame ()); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { /* Restore the previous execution state. */ set_executing (inferior_ptid, executing); @@ -2068,7 +2068,7 @@ record_btrace_start_replaying (struct thread_info *tp) if (upd_step_stack_frame_id) tp->control.step_stack_frame_id = frame_id; } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { xfree (btinfo->replay); btinfo->replay = NULL; @@ -2893,7 +2893,7 @@ cmd_record_btrace_bts_start (const char *args, int from_tty) { execute_command ("target record-btrace", from_tty); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { record_btrace_conf.format = BTRACE_FORMAT_NONE; throw_exception (exception); @@ -2914,7 +2914,7 @@ cmd_record_btrace_pt_start (const char *args, int from_tty) { execute_command ("target record-btrace", from_tty); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { record_btrace_conf.format = BTRACE_FORMAT_NONE; throw_exception (exception); @@ -2935,7 +2935,7 @@ cmd_record_btrace_start (const char *args, int from_tty) { execute_command ("target record-btrace", from_tty); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { record_btrace_conf.format = BTRACE_FORMAT_BTS; @@ -2943,7 +2943,7 @@ cmd_record_btrace_start (const char *args, int from_tty) { execute_command ("target record-btrace", from_tty); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { record_btrace_conf.format = BTRACE_FORMAT_NONE; throw_exception (ex); diff --git a/gdb/record-full.c b/gdb/record-full.c index ce3f67fc74b..57d7bb0e114 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -761,7 +761,7 @@ record_full_message (struct regcache *regcache, enum gdb_signal signal) if (ret < 0) error (_("Process record: failed to record execution log.")); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { record_full_list_release (record_full_arch_list_tail); throw_exception (ex); @@ -785,7 +785,7 @@ record_full_message_wrapper_safe (struct regcache *regcache, { record_full_message (regcache, signal); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); return false; @@ -1434,7 +1434,7 @@ record_full_wait_1 (struct target_ops *ops, else status->value.sig = GDB_SIGNAL_TRAP; } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { if (execution_direction == EXEC_REVERSE) { @@ -2473,7 +2473,7 @@ record_full_restore (void) record_full_arch_list_add (rec); } } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { record_full_list_release (record_full_arch_list_tail); throw_exception (ex); diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 6887a6aac18..2f7ecf366c3 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -1189,7 +1189,7 @@ remote_fileio_request (remote_target *remote, char *buf, int ctrlc_pending_p) { do_remote_fileio_request (remote, buf); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { if (ex.reason == RETURN_QUIT) remote_fileio_reply (remote, -1, FILEIO_EINTR); diff --git a/gdb/remote.c b/gdb/remote.c index 0424ea4ef1e..318459405ce 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1151,7 +1151,7 @@ remote_target::remote_get_noisy_reply () gdbarch_relocate_instruction (target_gdbarch (), &to, from); relocated = 1; } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { if (ex.error == MEMORY_ERROR) { @@ -5605,7 +5605,7 @@ remote_target::open_1 (const char *name, int from_tty, int extended_p) { remote->start_remote (from_tty, extended_p); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { /* Pop the partially set up target - unless something else did already before throwing the exception. */ @@ -9768,7 +9768,7 @@ remote_target::remote_kill_k () { putpkt ("k"); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error == TARGET_CLOSE_ERROR) { @@ -13136,7 +13136,7 @@ remote_target::get_trace_status (struct trace_status *ts) { p = remote_get_noisy_reply (); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != TARGET_CLOSE_ERROR) { @@ -13790,7 +13790,7 @@ remote_target::enable_btrace (ptid_t ptid, const struct btrace_config *conf) { btrace_read_config (&tinfo->conf); } - catch (const gdb_exception_RETURN_MASK_ERROR &err) + catch (const gdb_exception_error &err) { if (err.message != NULL) warning ("%s", err.what ()); diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 3cd9ba44d3d..bd09ae6fdfd 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -656,7 +656,7 @@ riscv_print_one_register_info (struct gdbarch *gdbarch, val = value_of_register (regnum, frame); regtype = value_type (val); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { /* Handle failure to read a register without interrupting the entire 'info registers' flow. */ @@ -2806,7 +2806,7 @@ riscv_frame_this_id (struct frame_info *this_frame, cache = riscv_frame_cache (this_frame, prologue_cache); *this_id = cache->this_id; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { /* Ignore errors, this leaves the frame id as the predefined outer frame id which terminates the backtrace at this point. */ diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c index 0c0f026be4f..e99865682fd 100644 --- a/gdb/rs6000-aix-tdep.c +++ b/gdb/rs6000-aix-tdep.c @@ -674,7 +674,7 @@ rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch, { pc = read_memory_unsigned_integer (addr, tdep->wordsize, byte_order); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { /* An error occured during reading. Probably a memory error due to the section not being loaded yet. This address diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 2f08e0f54c0..7a59e119f4f 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -3468,7 +3468,7 @@ rs6000_frame_cache (struct frame_info *this_frame, void **this_cache) cache->base = get_frame_register_unsigned (this_frame, gdbarch_sp_regnum (gdbarch)); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); @@ -3697,7 +3697,7 @@ rs6000_epilogue_frame_cache (struct frame_info *this_frame, void **this_cache) trad_frame_set_value (cache->saved_regs, gdbarch_pc_regnum (gdbarch), lr); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); diff --git a/gdb/rust-exp.y b/gdb/rust-exp.y index 4aed05c0a95..2be2532eb84 100644 --- a/gdb/rust-exp.y +++ b/gdb/rust-exp.y @@ -2621,7 +2621,7 @@ rust_lex_exception_test (rust_parser *parser, const char *input, rust_lex_test_one (parser, input, DECIMAL_INTEGER); SELF_CHECK (0); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { SELF_CHECK (strcmp (except.what (), err) == 0); } diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index c14b45b0a28..c3857eed2a2 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -1748,7 +1748,7 @@ tuple structs, and tuple-like enum variants")); result = value_struct_elt (&lhs, NULL, field_name, NULL, "structure"); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { error (_("Could not find field %s of struct variant %s::%s"), field_name, TYPE_NAME (outer_type), diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index d44c10869bd..a08738881ff 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -2554,7 +2554,7 @@ s390_frame_unwind_cache (struct frame_info *this_frame, if (!s390_prologue_frame_unwind_cache (this_frame, info)) s390_backchain_frame_unwind_cache (this_frame, info); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); diff --git a/gdb/selftest-arch.c b/gdb/selftest-arch.c index 340056e73e0..38cd6248d04 100644 --- a/gdb/selftest-arch.c +++ b/gdb/selftest-arch.c @@ -72,7 +72,7 @@ struct gdbarch_selftest : public selftest function (gdbarch); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { pass = false; exception_fprintf (gdb_stderr, ex, diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c index 4cd8a699793..3053c189802 100644 --- a/gdb/solib-dsbt.c +++ b/gdb/solib-dsbt.c @@ -834,7 +834,7 @@ enable_break (void) { tmp_bfd = solib_bfd_open (buf); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { } diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index 63edd41cddc..fdd4b345305 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -565,7 +565,7 @@ enable_break2 (void) { tmp_bfd = solib_bfd_open (buf); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { } diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c index 832da23b266..94d8cadabcb 100644 --- a/gdb/solib-spu.c +++ b/gdb/solib-spu.c @@ -133,7 +133,7 @@ append_ocl_sos (struct so_list **link_ptr) link_ptr = &newobj->next; } } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { /* Ignore memory errors. */ switch (ex.error) diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 53d5db864e0..cf83196721f 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -874,7 +874,7 @@ solib_svr4_r_map (struct svr4_info *info) addr = read_memory_typed_address (info->debug_base + lmo->r_map_offset, ptr_type); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { exception_print (gdb_stderr, ex); } @@ -913,7 +913,7 @@ solib_svr4_r_ldsomap (struct svr4_info *info) = read_memory_unsigned_integer (info->debug_base + lmo->r_version_offset, lmo->r_version_size, byte_order); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { exception_print (gdb_stderr, ex); } @@ -1734,7 +1734,7 @@ solib_event_probe_action (struct probe_and_action *pa) { probe_argc = pa->prob->get_argument_count (frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { exception_print (gdb_stderr, ex); probe_argc = 0; @@ -1897,7 +1897,7 @@ svr4_handle_solib_event (void) { val = pa->prob->evaluate_argument (1, frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { exception_print (gdb_stderr, ex); val = NULL; @@ -1928,7 +1928,7 @@ svr4_handle_solib_event (void) { val = pa->prob->evaluate_argument (2, frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { exception_print (gdb_stderr, ex); return; @@ -2278,7 +2278,7 @@ enable_break (struct svr4_info *info, int from_tty) { tmp_bfd = solib_bfd_open (interp_name); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { } diff --git a/gdb/solib.c b/gdb/solib.c index 75897ac55ad..25555af2939 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -700,7 +700,7 @@ solib_read_symbols (struct so_list *so, symfile_add_flags flags) so->symbols_loaded = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { exception_fprintf (gdb_stderr, e, _("Error while reading shared" " library symbols for %s:\n"), @@ -751,7 +751,7 @@ update_solib_list (int from_tty) { ops->open_symbol_file_object (from_tty); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_fprintf (gdb_stderr, ex, "Error reading attached " @@ -877,7 +877,7 @@ update_solib_list (int from_tty) } } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { exception_fprintf (gdb_stderr, e, _("Error while mapping shared " @@ -1335,7 +1335,7 @@ reload_shared_libraries_1 (int from_tty) solib_map_sections (so); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { exception_fprintf (gdb_stderr, e, _("Error while mapping " diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c index 6f2b10f058f..158db97ec61 100644 --- a/gdb/sparc64-linux-tdep.c +++ b/gdb/sparc64-linux-tdep.c @@ -138,7 +138,7 @@ sparc64_linux_handle_segmentation_fault (struct gdbarch *gdbarch, if (si_code >= SEGV_ACCADI && si_code <= SEGV_ADIPERR) addr = parse_and_eval_long ("$_siginfo._sifields._sigfault.si_addr"); } - catch (const gdb_exception_RETURN_MASK_ALL &exception) + catch (const gdb_exception &exception) { return; } diff --git a/gdb/stack.c b/gdb/stack.c index 87588e10fcf..c1a9d9dfb09 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -182,7 +182,7 @@ print_stack_frame (struct frame_info *frame, int print_level, if (set_current_sal) set_current_sal_from_frame (frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { } } @@ -295,7 +295,7 @@ print_frame_arg (const struct frame_arg *arg) common_val_print (arg->val, &stb, 2, &opts, language); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { stb.printf (_(""), except.what ()); @@ -322,7 +322,7 @@ read_frame_local (struct symbol *sym, struct frame_info *frame, { argp->val = read_var_value (sym, NULL, frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { argp->error = xstrdup (except.what ()); } @@ -347,7 +347,7 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame, { val = read_var_value (sym, NULL, frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { val_error = (char *) alloca (except.message->size () + 1); strcpy (val_error, except.what ()); @@ -367,7 +367,7 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame, ops = SYMBOL_COMPUTED_OPS (sym); entryval = ops->read_variable_at_entry (sym, frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (except.error != NO_ENTRY_VALUE_ERROR) { @@ -423,7 +423,7 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame, TYPE_LENGTH (type_deref))) val_equal = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { /* If the dereferenced content could not be fetched do not display anything. */ @@ -471,7 +471,7 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame, { val = read_var_value (sym, NULL, frame); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { val_error = (char *) alloca (except.message->size () + 1); strcpy (val_error, except.what ()); @@ -758,7 +758,7 @@ do_gdb_disassembly (struct gdbarch *gdbarch, DISASSEMBLY_RAW_INSN, how_many, low, high); } - catch (const gdb_exception_RETURN_MASK_ERROR &exception) + catch (const gdb_exception_error &exception) { /* If an exception was thrown while doing the disassembly, print the error message, to give the user a clue of what happened. */ @@ -1200,7 +1200,7 @@ print_frame (struct frame_info *frame, int print_level, { print_frame_args (func, frame, numargs, gdb_stdout); } - catch (const gdb_exception_RETURN_MASK_ERROR &e) + catch (const gdb_exception_error &e) { } @@ -1389,7 +1389,7 @@ info_frame_command_core (struct frame_info *fi, bool selected_frame_p) caller_pc = frame_unwind_caller_pc (fi); caller_pc_p = 1; } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { switch (ex.error) { @@ -2704,7 +2704,7 @@ frame_apply_command_count (const char *which_command, printf_filtered ("%s", cmd_result.c_str ()); } } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { fi = get_selected_frame (_("frame apply " "unable to get selected frame.")); diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index 118f28987a3..51a75541e52 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -198,7 +198,7 @@ add_vsyscall_page (struct target_ops *target, int from_tty) name, 0 /* from_tty */); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 8867ba75d0f..7666de390cd 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -353,7 +353,7 @@ dump_symtab_1 (struct symtab *symtab, struct ui_file *outfile) { print_symbol (gdbarch, sym, depth + 1, outfile); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { exception_fprintf (gdb_stderr, ex, "Error printing symbol:\n"); diff --git a/gdb/target.c b/gdb/target.c index 9b777ea8a07..22344002113 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -720,7 +720,7 @@ target_translate_tls_address (struct objfile *objfile, CORE_ADDR offset) } /* If an error occurred, print TLS related messages here. Otherwise, throw the error to some higher catcher. */ - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { int objfile_is_library = (objfile->flags & OBJF_SHARED); diff --git a/gdb/thread.c b/gdb/thread.c index cde7c34df69..010cd24e7e1 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -1471,7 +1471,7 @@ thr_try_catch_cmd (thread_info *thr, const char *cmd, int from_tty, printf_filtered ("%s", cmd_result.c_str ()); } } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { if (!flags.silent) { diff --git a/gdb/top.c b/gdb/top.c index 829b5340f37..60ca74da253 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1626,7 +1626,7 @@ quit_force (int *exit_arg, int from_tty) disconnect_tracing (); iterate_over_inferiors (kill_or_detach, &qt); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } @@ -1637,7 +1637,7 @@ quit_force (int *exit_arg, int from_tty) { pop_all_targets (); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } @@ -1665,7 +1665,7 @@ quit_force (int *exit_arg, int from_tty) gdb_safe_append_history (); } } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } @@ -1681,7 +1681,7 @@ quit_force (int *exit_arg, int from_tty) { do_final_cleanups (); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } diff --git a/gdb/tracefile-tfile.c b/gdb/tracefile-tfile.c index 6581cb133dc..72d2f70eaf9 100644 --- a/gdb/tracefile-tfile.c +++ b/gdb/tracefile-tfile.c @@ -547,7 +547,7 @@ tfile_target_open (const char *arg, int from_tty) if (trace_regblock_size == 0) error (_("No register block size recorded in trace file")); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { /* Remove the partially set up target. */ unpush_target (&tfile_ops); diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 533b7bc8ab8..ce8de72f28d 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -110,7 +110,7 @@ tui_rl_switch_mode (int notused1, int notused2) tui_enable (); } } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); diff --git a/gdb/typeprint.c b/gdb/typeprint.c index 91ce29b1b28..02c04514303 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -420,7 +420,7 @@ type_to_string (struct type *type) type_print (type, "", &stb, -1); return std::move (stb.string ()); } - catch (const gdb_exception_RETURN_MASK_ALL &except) + catch (const gdb_exception &except) { } diff --git a/gdb/unittests/cli-utils-selftests.c b/gdb/unittests/cli-utils-selftests.c index 6b0efe53dec..99b98bf8cd1 100644 --- a/gdb/unittests/cli-utils-selftests.c +++ b/gdb/unittests/cli-utils-selftests.c @@ -83,7 +83,7 @@ test_number_or_range_parser () minus_one.get_number (); SELF_CHECK (false); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { SELF_CHECK (ex.reason == RETURN_ERROR); SELF_CHECK (ex.error == GENERIC_ERROR); @@ -219,7 +219,7 @@ test_parse_flags_qcs () &flags); SELF_CHECK (false); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { SELF_CHECK (ex.reason == RETURN_ERROR); SELF_CHECK (ex.error == GENERIC_ERROR); diff --git a/gdb/unittests/parse-connection-spec-selftests.c b/gdb/unittests/parse-connection-spec-selftests.c index a33b3d8de6d..a4beb66e2c9 100644 --- a/gdb/unittests/parse-connection-spec-selftests.c +++ b/gdb/unittests/parse-connection-spec-selftests.c @@ -216,7 +216,7 @@ test_conn (const parse_conn_test &c) { ret = parse_connection_spec (c.connspec, &hint); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { /* If we caught an error, we should check if this connection spec was supposed to fail. */ diff --git a/gdb/valops.c b/gdb/valops.c index 69da319ea7d..0de4067c6b2 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -3625,7 +3625,7 @@ value_rtti_indirect_type (struct value *v, int *full, { target = value_ind (v); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { if (except.error == MEMORY_ERROR) { @@ -3777,7 +3777,7 @@ value_of_this_silent (const struct language_defn *lang) { ret = value_of_this (lang); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { } diff --git a/gdb/valprint.c b/gdb/valprint.c index 755473038f8..b02ebf6c272 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1060,7 +1060,7 @@ val_print (struct type *type, LONGEST embedded_offset, stream, recurse, val, &local_opts); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { fprintf_filtered (stream, _("")); } diff --git a/gdb/value.c b/gdb/value.c index 99a27b5e7b3..dad9f07b68e 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1409,7 +1409,7 @@ value_optimized_out (struct value *value) { value_fetch_lazy (value); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { /* Fall back to checking value->optimized_out. */ } @@ -2541,7 +2541,7 @@ show_convenience (const char *ignore, int from_tty) val = value_of_internalvar (gdbarch, var); value_print (val, gdb_stdout, &opts); } - catch (const gdb_exception_RETURN_MASK_ERROR &ex) + catch (const gdb_exception_error &ex) { fprintf_filtered (gdb_stdout, _(""), ex.what ()); } diff --git a/gdb/varobj.c b/gdb/varobj.c index 54b0943d2ea..8ec8298a12c 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -319,7 +319,7 @@ varobj_create (const char *objname, var->root->exp = parse_exp_1 (&p, pc, block, 0, &tracker); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { return NULL; } @@ -367,7 +367,7 @@ varobj_create (const char *objname, { value = evaluate_expression (var->root->exp.get ()); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { /* Error getting the value. Try to at least get the right type. */ @@ -1037,7 +1037,7 @@ varobj_set_value (struct varobj *var, const char *expression) value = evaluate_expression (exp.get ()); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { /* We cannot proceed without a valid expression. */ return false; @@ -1065,7 +1065,7 @@ varobj_set_value (struct varobj *var, const char *expression) val = value_assign (var->value.get (), value); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { return false; } @@ -1312,7 +1312,7 @@ install_new_value (struct varobj *var, struct value *value, bool initial) value_fetch_lazy (value); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { /* Set the value to NULL, so that for the next -var-update, we don't try to compare the new value with this value, @@ -2138,7 +2138,7 @@ value_of_root_1 (struct varobj **var_handle) { new_val = evaluate_expression (var->root->exp.get ()); } - catch (const gdb_exception_RETURN_MASK_ERROR &except) + catch (const gdb_exception_error &except) { } } diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 0df9e312d33..50094187bd1 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -947,7 +947,7 @@ catch_errors (void (*func) ()) { func (); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c index 1aa491ac373..fe85358fa26 100644 --- a/gdb/x86-linux-nat.c +++ b/gdb/x86-linux-nat.c @@ -221,7 +221,7 @@ x86_linux_nat_target::enable_btrace (ptid_t ptid, { tinfo = linux_enable_btrace (ptid, conf); } - catch (const gdb_exception_RETURN_MASK_ERROR &exception) + catch (const gdb_exception_error &exception) { error (_("Could not enable branch tracing for %s: %s"), target_pid_to_str (ptid).c_str (), exception.what ()); diff --git a/gdb/xml-support.c b/gdb/xml-support.c index 1a89213ab8f..4145878bf3a 100644 --- a/gdb/xml-support.c +++ b/gdb/xml-support.c @@ -387,7 +387,7 @@ gdb_xml_start_element_wrapper (void *data, const XML_Char *name, { parser->start_element (name, attrs); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { parser->set_error (ex); } @@ -459,7 +459,7 @@ gdb_xml_end_element_wrapper (void *data, const XML_Char *name) { parser->end_element (name); } - catch (const gdb_exception_RETURN_MASK_ALL &ex) + catch (const gdb_exception &ex) { parser->set_error (ex); }