From 6cbc7c3d3433bf5c6288cbad2ba224919ff4922c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 17 May 2013 16:52:34 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 7 +++++++ gdb/python/py-frame.c | 6 +----- gdb/python/py-inferior.c | 2 -- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 47dbcb54dea..f6c82649c5b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2013-05-17 Tom Tromey + + * 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 * acinclude.m4: Add check for dlopen in libdl. diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c index e2eb9c5947d..9342f45d5b0 100644 --- a/gdb/python/py-frame.c +++ b/gdb/python/py-frame.c @@ -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) { diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index 4af71310757..cee3a0ded01 100644 --- a/gdb/python/py-inferior.c +++ b/gdb/python/py-inferior.c @@ -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; } -- 2.30.2