mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +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:
parent
2f8cd40c37
commit
fbf8e4c35c
@ -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…
Reference in New Issue
Block a user