mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-26 12:43:34 +08:00
Use gdbpy_convert_exception in a few more spots
I noticed a few places were converting a gdb exception to a Python exception "by hand". It's better to use the existing gdbpy_convert_exception helper function, as this handles memory errors correctly, and in the future may be enhanced in other ways. gdb/ChangeLog 2018-12-27 Tom Tromey <tom@tromey.com> * python/py-value.c (convert_value_from_python): Use gdbpy_convert_exception. * python/py-param.c (parmpy_init): Use gdbpy_convert_exception. * python/py-cmd.c (cmdpy_init): Use gdbpy_convert_exception. * python/py-breakpoint.c (bppy_init): Use gdbpy_convert_exception.
This commit is contained in:
@ -1732,9 +1732,7 @@ convert_value_from_python (PyObject *obj)
|
||||
}
|
||||
CATCH (except, RETURN_MASK_ALL)
|
||||
{
|
||||
PyErr_Format (except.reason == RETURN_QUIT
|
||||
? PyExc_KeyboardInterrupt : PyExc_RuntimeError,
|
||||
"%s", except.message);
|
||||
gdbpy_convert_exception (except);
|
||||
return NULL;
|
||||
}
|
||||
END_CATCH
|
||||
|
Reference in New Issue
Block a user