From 5d9c59954f8b3d17402ac68681556a8f858833e2 Mon Sep 17 00:00:00 2001 From: Phil Muldoon Date: Mon, 28 Nov 2011 15:49:43 +0000 Subject: 2011-11-28 Phil Muldoon PR python/13369 PR python/13374 * python/python.c (gdbpy_decode_line): Do not acquire GIL. * python/py-inferior.c (inferior_to_inferior_object): Ditto. * python/py-value.c (valpy_nonzero): Use TRY_CATCH to catch GDB exceptions. * python/py-type.c (typy_strip_typedefs): Ditto. (typy_legacy_template_argument): Ditto. * python/py-inferior.c (inferior_to_inferior_object): Ditto. * python/py-breakpoint.c (bppy_set_ignore_count): Ditto. --- gdb/python/py-value.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/python/py-value.c') diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index 15c183a..05e592f 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -880,10 +880,10 @@ valpy_nonzero (PyObject *self) struct type *type; int nonzero = 0; /* Appease GCC warning. */ - type = check_typedef (value_type (self_value->value)); - TRY_CATCH (except, RETURN_MASK_ALL) { + type = check_typedef (value_type (self_value->value)); + if (is_integral_type (type) || TYPE_CODE (type) == TYPE_CODE_PTR) nonzero = !!value_as_long (self_value->value); else if (TYPE_CODE (type) == TYPE_CODE_FLT) -- cgit v1.1