mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04: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:
parent
2f8cd40c37
commit
fbf8e4c35c
4 changed files with 4 additions and 8 deletions
|
|
@ -1054,8 +1054,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
catch (const gdb_exception &except)
|
||||
{
|
||||
bppy_pending_object = NULL;
|
||||
gdbpy_convert_exception (except);
|
||||
return -1;
|
||||
GDB_PY_SET_HANDLE_EXCEPTION (except);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
gdbpy_convert_exception (except);
|
||||
return -1;
|
||||
GDB_PY_SET_HANDLE_EXCEPTION (except);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -217,8 +217,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
}
|
||||
catch (const gdb_exception &except)
|
||||
{
|
||||
gdbpy_convert_exception (except);
|
||||
return -1;
|
||||
GDB_PY_SET_HANDLE_EXCEPTION (except);
|
||||
}
|
||||
|
||||
if (PyErr_Occurred ())
|
||||
|
|
|
|||
|
|
@ -885,8 +885,7 @@ parmpy_init (PyObject *self, PyObject *args, PyObject *kwds)
|
|||
catch (const gdb_exception &except)
|
||||
{
|
||||
Py_DECREF (self);
|
||||
gdbpy_convert_exception (except);
|
||||
return -1;
|
||||
GDB_PY_SET_HANDLE_EXCEPTION (except);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue