aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-lazy-string.c
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2011-10-27 09:14:27 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2011-10-27 09:14:27 +0000
commit76dce0be7b6b831559f41f69e85fc1e8f9d28343 (patch)
tree06396641895472efb609d0ddeb6b815a472fd3fe /gdb/python/py-lazy-string.c
parentd848dec6d9d34420121d9de18315c111d88017fd (diff)
downloadgdb-76dce0be7b6b831559f41f69e85fc1e8f9d28343.zip
gdb-76dce0be7b6b831559f41f69e85fc1e8f9d28343.tar.gz
gdb-76dce0be7b6b831559f41f69e85fc1e8f9d28343.tar.bz2
2011-10-27 Phil Muldoon <pmuldoon@redhat.com>
* python/py-breakpoint.c (bppy_set_enabled): Use TRY_CATCH. (bppy_set_task): Ditto. (bppy_delete_breakpoint): Ditto. * python/py-symbol.c (gdbpy_lookup_symbol): Ditto. (gdbpy_lookup_global_symbol): Ditto. * python/py-lazy-string.c (stpy_convert_to_value): Ditto. * python/py-frame.c (frapy_is_valid): Ditto. (frame_info_to_frame_object): Ditto. * python/py-type.c (typy_lookup_type): Ditto. (typy_getitem): Ditto. (typy_has_key): Ditto. (typy_richcompare): Use TRY_CATCH. Do not return Py_NE on error.
Diffstat (limited to 'gdb/python/py-lazy-string.c')
-rw-r--r--gdb/python/py-lazy-string.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/python/py-lazy-string.c b/gdb/python/py-lazy-string.c
index 940ce88..45ba41e 100644
--- a/gdb/python/py-lazy-string.c
+++ b/gdb/python/py-lazy-string.c
@@ -96,7 +96,8 @@ static PyObject *
stpy_convert_to_value (PyObject *self, PyObject *args)
{
lazy_string_object *self_string = (lazy_string_object *) self;
- struct value *val;
+ struct value *val = NULL;
+ volatile struct gdb_exception except;
if (self_string->address == 0)
{
@@ -105,7 +106,12 @@ stpy_convert_to_value (PyObject *self, PyObject *args)
return NULL;
}
- val = value_at_lazy (self_string->type, self_string->address);
+ TRY_CATCH (except, RETURN_MASK_ALL)
+ {
+ val = value_at_lazy (self_string->type, self_string->address);
+ }
+ GDB_PY_HANDLE_EXCEPTION (except);
+
return value_to_value_object (val);
}