From 1efd76617bcb6001ca13b90d184ae11aa4f49ce3 Mon Sep 17 00:00:00 2001 From: Phil Muldoon Date: Wed, 2 Oct 2013 08:37:11 +0000 Subject: [PATCH] 2013-10-02 Phil Muldoon * python/py-frame.c (frame_info_to_frame_object): Use gdbpy_convert_exception. Clean up Python object on failure. --- gdb/ChangeLog | 5 +++++ gdb/python/py-frame.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 22a22713604..7f86c8993e7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-10-02 Phil Muldoon + + * python/py-frame.c (frame_info_to_frame_object): Use + gdbpy_convert_exception. Clean up Python object on failure. + 2013-10-02 Phil Muldoon * python/lib/gdb/command/frame_filters.py diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c index f960b08bffa..58cb8a0c5c3 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; } -- 2.30.2