From patchwork Sat Feb 7 14:45:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 4958 Received: (qmail 25492 invoked by alias); 7 Feb 2015 14:45: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 25452 invoked by uid 89); 7 Feb 2015 14:45:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 07 Feb 2015 14:45:47 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t17EjkSD030661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 7 Feb 2015 09:45:46 -0500 Received: from host1.jankratochvil.net (ovpn-116-113.ams2.redhat.com [10.36.116.113]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t17EjiI7020577; Sat, 7 Feb 2015 09:45:45 -0500 Subject: [PATCH 5/6] framefilter quit: Use RETURN_MASK_ERROR From: Jan Kratochvil To: gdb-patches@sourceware.org Cc: Phil Muldoon Date: Sat, 07 Feb 2015 15:45:41 +0100 Message-ID: <20150207144541.14897.8000.stgit@host1.jankratochvil.net> In-Reply-To: <20150207144501.14897.90709.stgit@host1.jankratochvil.net> References: <20150207144501.14897.90709.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-IsSubscribed: yes Hi, now when the code is exception safe we can let RETURN_QUIT to pass through as all the installed cleanups with handle that. Jan gdb/ChangeLog 2015-02-06 Jan Kratochvil * python/py-framefilter.c (py_print_single_arg, enumerate_locals) (py_print_frame): Use RETURN_MASK_ERROR. --- gdb/python/py-framefilter.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c index c232946..5531d2b 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c @@ -376,7 +376,7 @@ py_print_single_arg (struct ui_out *out, else val = fv; - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { struct cleanup *cleanups = make_cleanup (null_cleanup, NULL); @@ -761,7 +761,7 @@ enumerate_locals (PyObject *iter, /* If the object did not provide a value, read it. */ if (val == NULL) { - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { val = read_var_value (sym, frame); } @@ -781,7 +781,7 @@ enumerate_locals (PyObject *iter, if (print_args_field || args_type != NO_VALUES) make_cleanup_ui_out_tuple_begin_end (out, NULL); } - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { if (! ui_out_is_mi_like_p (out)) { @@ -838,7 +838,7 @@ enumerate_locals (PyObject *iter, do_cleanups (locals_cleanups); - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { ui_out_text (out, "\n"); } @@ -1042,7 +1042,7 @@ py_print_frame (PyObject *filter, int flags, if (frame == NULL) return EXT_LANG_BT_ERROR; - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { gdbarch = get_frame_arch (frame); } @@ -1074,7 +1074,7 @@ py_print_frame (PyObject *filter, int flags, and are printed with indention. */ if (indent > 0) { - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { ui_out_spaces (out, indent*4); } @@ -1117,7 +1117,7 @@ py_print_frame (PyObject *filter, int flags, slot = (struct frame_info **) htab_find_slot (levels_printed, frame, INSERT); - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { level = frame_relative_level (frame); @@ -1151,7 +1151,7 @@ py_print_frame (PyObject *filter, int flags, print nothing. */ if (opts.addressprint && has_addr) { - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { annotate_frame_address (); ui_out_field_core_addr (out, "addr", gdbarch, address); @@ -1218,7 +1218,7 @@ py_print_frame (PyObject *filter, int flags, return EXT_LANG_BT_ERROR; } - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { annotate_frame_function_name (); if (function == NULL) @@ -1251,7 +1251,7 @@ py_print_frame (PyObject *filter, int flags, /* File name/source/line number information. */ if (print_frame_info) { - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { annotate_frame_source_begin (); } @@ -1285,7 +1285,7 @@ py_print_frame (PyObject *filter, int flags, } make_cleanup (xfree, filename); - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { ui_out_wrap_hint (out, " "); ui_out_text (out, " at "); @@ -1319,7 +1319,7 @@ py_print_frame (PyObject *filter, int flags, if (py_line != Py_None) { line = PyLong_AsLong (py_line); - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { ui_out_text (out, ":"); annotate_frame_source_line (); @@ -1340,7 +1340,7 @@ py_print_frame (PyObject *filter, int flags, elided frames, so if MI output detected do not send newline. */ if (! ui_out_is_mi_like_p (out)) { - TRY_CATCH (except, RETURN_MASK_ALL) + TRY_CATCH (except, RETURN_MASK_ERROR) { annotate_frame_end (); ui_out_text (out, "\n");