From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Cc: Phil Muldoon <pmuldoon@redhat.com>
Subject: [PATCH 5/6] framefilter quit: Use RETURN_MASK_ERROR
Date: Sat, 07 Feb 2015 14:45:00 -0000 [thread overview]
Message-ID: <20150207144541.14897.8000.stgit@host1.jankratochvil.net> (raw)
In-Reply-To: <20150207144501.14897.90709.stgit@host1.jankratochvil.net>
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 <jan.kratochvil@redhat.com>
* 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");
next prev parent reply other threads:[~2015-02-07 14:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-07 14:45 [PATCH 0/6] framefilter quit: PR cli/17716 Jan Kratochvil
2015-02-07 14:45 ` [PATCH 3/6] framefilter quit: Code cleanup: Avoid gotos Jan Kratochvil
2015-02-11 13:43 ` [commit+7.9] " Jan Kratochvil
2015-02-07 14:45 ` [PATCH 4/6] framefilter quit: Make it exception safe Jan Kratochvil
2015-02-11 13:45 ` [commit+7.9] " Jan Kratochvil
2015-02-07 14:45 ` [PATCH 1/6] framefilter quit: Obvious whitespacing fixes Jan Kratochvil
2015-02-11 13:37 ` [commit+7.9] " Jan Kratochvil
2015-02-07 14:45 ` [PATCH 6/6] framefilter quit: New test Jan Kratochvil
2015-02-11 13:56 ` [commit+7.9] " Jan Kratochvil
2015-02-07 14:45 ` Jan Kratochvil [this message]
2015-02-11 13:52 ` [commit+7.9] [PATCH 5/6] framefilter quit: Use RETURN_MASK_ERROR Jan Kratochvil
2015-02-07 14:45 ` [PATCH 2/6] framefilter quit: Code cleanup: Reindentation Jan Kratochvil
2015-02-11 13:39 ` [commit+7.9] " Jan Kratochvil
2015-02-10 17:40 ` [PATCH 0/6] framefilter quit: PR cli/17716 Pedro Alves
2015-02-10 19:19 ` Phil Muldoon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150207144541.14897.8000.stgit@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pmuldoon@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox