From 1ccb6f106a77893b00287bbfbaa69f22f9567d2c Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 24 Sep 2024 13:06:32 +0200 Subject: [gdb/python] Eliminate GDB_PY_HANDLE_EXCEPTION Result of: ... $ search="GDB_PY_HANDLE_EXCEPTION (" $ replace="return gdbpy_handle_gdb_exception (nullptr, " $ sed -i \ "s/$search/$replace/" \ gdb/python/*.c ... Also remove the now unused GDB_PY_HANDLE_EXCEPTION. No functional changes. Tested on x86_64-linux. Approved-By: Tom Tromey --- gdb/python/py-unwind.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gdb/python/py-unwind.c') diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index a10a758..68deaf9 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -228,7 +228,7 @@ unwind_infopy_str (PyObject *self) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } } else @@ -378,7 +378,7 @@ unwind_infopy_add_saved_register (PyObject *self, PyObject *args, PyObject *kw) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } gdbpy_ref<> new_value = gdbpy_ref<>::new_reference (pyo_reg_value); @@ -429,7 +429,7 @@ pending_framepy_str (PyObject *self) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } return PyUnicode_FromFormat ("SP=%s,PC=%s", sp_str, pc_str); @@ -456,7 +456,7 @@ pending_framepy_repr (PyObject *self) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } return PyUnicode_FromFormat ("<%s level=%d, sp=%s, pc=%s>", @@ -505,7 +505,7 @@ pending_framepy_read_register (PyObject *self, PyObject *args, PyObject *kw) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } return result; @@ -546,7 +546,7 @@ pending_framepy_name (PyObject *self, PyObject *args) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } if (name != nullptr) @@ -574,7 +574,7 @@ pending_framepy_pc (PyObject *self, PyObject *args) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } return gdb_py_object_from_ulongest (pc).release (); @@ -601,7 +601,7 @@ pending_framepy_language (PyObject *self, PyObject *args) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } Py_RETURN_NONE; @@ -628,7 +628,7 @@ pending_framepy_find_sal (PyObject *self, PyObject *args) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } return sal_obj; @@ -653,7 +653,7 @@ pending_framepy_block (PyObject *self, PyObject *args) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } for (fn_block = block; @@ -696,7 +696,7 @@ pending_framepy_function (PyObject *self, PyObject *args) } catch (const gdb_exception &except) { - GDB_PY_HANDLE_EXCEPTION (except); + return gdbpy_handle_gdb_exception (nullptr, except); } if (sym != nullptr) -- cgit v1.1