I found a few more places where we can use GDB_PY_HANDLE_EXCEPTION.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return NULL;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
gdbpy_ref<> pc_obj = gdb_py_object_from_ulongest (pc);
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return NULL;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
return host_string_to_python_string (stb.c_str ()).release ();
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return nullptr;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
}
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return NULL;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
return (PyObject *) frame_obj.release ();
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return NULL;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
if (!var)
/* This readline callback is called without the GIL held. */
gdbpy_gil gil;
- gdbpy_convert_exception (except);
- return NULL;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
/* Detect EOF (Ctrl-D). */
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return nullptr;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
return uiout.result ().release ();
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return NULL;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
return PyBytes_FromString (strfile.string ().c_str ());
{
const char *method = NULL;
const char *format = NULL;
- PyObject *ret = NULL;
if (!PyArg_ParseTuple (args, "|ss", &method, &format))
return NULL;
try
{
record_start (method, format, 0);
- ret = gdbpy_current_recording (self, args);
+ return gdbpy_current_recording (self, args);
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
+ GDB_PY_HANDLE_EXCEPTION (except);
}
-
- return ret;
}
/* Implementation of gdb.current_recording (self) -> gdb.Record. */
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return nullptr;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
gdbpy_ref<> dict = uiout.result ();
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return nullptr;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
Py_RETURN_NONE;
}
catch (const gdb_exception &except)
{
- gdbpy_convert_exception (except);
- return NULL;
+ GDB_PY_HANDLE_EXCEPTION (except);
}
return value;
catch (const gdb_exception &ex)
{
/* We know this will always throw. */
- gdbpy_convert_exception (ex);
- return NULL;
+ GDB_PY_HANDLE_EXCEPTION (ex);
}
if (!sals.empty ())