aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2013-10-02 08:37:11 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2013-10-02 08:37:11 +0000
commit1efd76617bcb6001ca13b90d184ae11aa4f49ce3 (patch)
treead55af12b1b1a0e42e3b2e7132f717ee3ac8e282 /gdb/python
parent562fc8499256c6eb50cd1517514b3e64e7040e5b (diff)
downloadgdb-1efd76617bcb6001ca13b90d184ae11aa4f49ce3.zip
gdb-1efd76617bcb6001ca13b90d184ae11aa4f49ce3.tar.gz
gdb-1efd76617bcb6001ca13b90d184ae11aa4f49ce3.tar.bz2
2013-10-02 Phil Muldoon <pmuldoon@redhat.com>
* python/py-frame.c (frame_info_to_frame_object): Use gdbpy_convert_exception. Clean up Python object on failure.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-frame.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c
index f960b08..58cb8a0 100644
--- a/gdb/python/py-frame.c
+++ b/gdb/python/py-frame.c
@@ -333,8 +333,12 @@ frame_info_to_frame_object (struct frame_info *frame)
}
frame_obj->gdbarch = get_frame_arch (frame);
}
- GDB_PY_HANDLE_EXCEPTION (except);
-
+ if (except.reason < 0)
+ {
+ Py_DECREF (frame_obj);
+ gdbpy_convert_exception (except);
+ return NULL;
+ }
return (PyObject *) frame_obj;
}