mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
[gdb/python] Use GDB_PY_SET_HANDLE_EXCEPTION more often
I found a few more places where we can use GDB_PY_SET_HANDLE_EXCEPTION. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
@@ -1054,8 +1054,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
|
|||||||
catch (const gdb_exception &except)
|
catch (const gdb_exception &except)
|
||||||
{
|
{
|
||||||
bppy_pending_object = NULL;
|
bppy_pending_object = NULL;
|
||||||
gdbpy_convert_exception (except);
|
GDB_PY_SET_HANDLE_EXCEPTION (except);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BPPY_SET_REQUIRE_VALID ((gdbpy_breakpoint_object *) self);
|
BPPY_SET_REQUIRE_VALID ((gdbpy_breakpoint_object *) self);
|
||||||
|
|||||||
@@ -541,8 +541,7 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kw)
|
|||||||
}
|
}
|
||||||
catch (const gdb_exception &except)
|
catch (const gdb_exception &except)
|
||||||
{
|
{
|
||||||
gdbpy_convert_exception (except);
|
GDB_PY_SET_HANDLE_EXCEPTION (except);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -217,8 +217,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
|
|||||||
}
|
}
|
||||||
catch (const gdb_exception &except)
|
catch (const gdb_exception &except)
|
||||||
{
|
{
|
||||||
gdbpy_convert_exception (except);
|
GDB_PY_SET_HANDLE_EXCEPTION (except);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PyErr_Occurred ())
|
if (PyErr_Occurred ())
|
||||||
|
|||||||
@@ -885,8 +885,7 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
|
|||||||
catch (const gdb_exception &except)
|
catch (const gdb_exception &except)
|
||||||
{
|
{
|
||||||
Py_DECREF (self);
|
Py_DECREF (self);
|
||||||
gdbpy_convert_exception (except);
|
GDB_PY_SET_HANDLE_EXCEPTION (except);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user