2013-10-02 Phil Muldoon <pmuldoon@redhat.com>
authorPhil Muldoon <pmuldoon@redhat.com>
Wed, 2 Oct 2013 08:37:11 +0000 (08:37 +0000)
committerPhil Muldoon <pmuldoon@redhat.com>
Wed, 2 Oct 2013 08:37:11 +0000 (08:37 +0000)
* python/py-frame.c (frame_info_to_frame_object): Use
gdbpy_convert_exception. Clean up Python object on failure.

gdb/ChangeLog
gdb/python/py-frame.c

index 22a227136049e30d6f11cc1628ecc360d0414308..7f86c8993e7f71036e64866aaef7703ef9111684 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2013-10-02  Phil Muldoon  <pmuldoon@redhat.com>
 
        * python/lib/gdb/command/frame_filters.py
index f960b08bffa55f2abaefd67c822b706790438733..58cb8a0c5c30f999ef17d8025d349a894bc54f58 100644 (file)
@@ -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;
 }