Simplify exception handling in py-framefilter.c
authorTom Tromey <tom@tromey.com>
Fri, 23 Mar 2018 16:32:26 +0000 (10:32 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 27 Mar 2018 03:57:14 +0000 (21:57 -0600)
commit76c939acfd21928957b45816bf78935363438b0a
tree629fb1f91f62edb72cc2df506f92588a5214ff22
parent9507b29c0a00fb62f015fe69f82aaf8f5377ab35
Simplify exception handling in py-framefilter.c

This patch changes py-framefilter.c as suggested by Pedro in:
https://sourceware.org/ml/gdb-patches/2017-06/msg00748.html

In particular, gdb exceptions are now caught at the outermost layer,
rather than in each particular function.  This simplifies much of the
code.

gdb/ChangeLog
2018-03-26  Tom Tromey  <tom@tromey.com>

* python/py-framefilter.c (py_print_type): Don't catch
exceptions.  Return void.
(py_print_value): Likewise.
(py_print_single_arg): Likewise.
(enumerate_args): Don't catch exceptions.
(py_print_args): Likewise.
(py_print_frame): Likewise.
(gdbpy_apply_frame_filter): Catch exceptions here.
gdb/ChangeLog
gdb/python/py-framefilter.c