* python/py-inferior.c (infpy_read_memory): Don't call
authorTom Tromey <tromey@redhat.com>
Fri, 17 May 2013 16:52:34 +0000 (16:52 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 17 May 2013 16:52:34 +0000 (16:52 +0000)
PyErr_SetString if PyObject_New fails.
* python/py-frame.c (frame_info_to_frame_object): Don't call
PyErr_SetString if PyObject_New fails.

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

index 47dbcb54deabb82487c0199b41d6eb7f27b2bbd3..f6c82649c5b63ee0b36045a81da9f32ff8ed25f3 100644 (file)
@@ -1,3 +1,10 @@
+2013-05-17  Tom Tromey  <tromey@redhat.com>
+
+       * python/py-inferior.c (infpy_read_memory): Don't call
+       PyErr_SetString if PyObject_New fails.
+       * python/py-frame.c (frame_info_to_frame_object): Don't call
+       PyErr_SetString if PyObject_New fails.
+
 2013-05-17  Pavel Chupin  <pavel.v.chupin@intel.com>
 
        * acinclude.m4: Add check for dlopen in libdl.
index e2eb9c5947d7d8723f8af6ebfab8deb97e756e05..9342f45d5b0a07bbcc2639d038f6470e14d30482 100644 (file)
@@ -304,11 +304,7 @@ frame_info_to_frame_object (struct frame_info *frame)
 
   frame_obj = PyObject_New (frame_object, &frame_object_type);
   if (frame_obj == NULL)
-    {
-      PyErr_SetString (PyExc_MemoryError, 
-                      _("Could not allocate frame object."));
-      return NULL;
-    }
+    return NULL;
 
   TRY_CATCH (except, RETURN_MASK_ALL)
     {
index 4af71310757d26ea54234a55aff783ec44b79b80..cee3a0ded013a642763786a58a042217449c3978 100644 (file)
@@ -445,8 +445,6 @@ infpy_read_memory (PyObject *self, PyObject *args, PyObject *kw)
   if (membuf_obj == NULL)
     {
       xfree (buffer);
-      PyErr_SetString (PyExc_MemoryError,
-                      _("Could not allocate memory buffer object."));
       return NULL;
     }