#include "regcache.h"
#include "valprint.h"
#include "user-regs.h"
-#include "py-ref.h"
#define TRACE_PY_UNWIND(level, args...) if (pyuw_debug >= level) \
{ fprintf_unfiltered (gdb_stdlog, args); }
int rc = 0;
struct value *value;
- TRY
+ try
{
if ((value = value_object_to_value (pyo_value)) != NULL)
{
rc = 1;
}
}
- CATCH (except, RETURN_MASK_ALL)
+ catch (const gdb_exception &except)
{
gdbpy_convert_exception (except);
}
- END_CATCH
return rc;
}
stb.printf ("%s(%d, ", sep, reg.number);
if (value != NULL)
{
- TRY
+ try
{
value_print (value, &stb, &opts);
stb.puts (")");
}
- CATCH (except, RETURN_MASK_ALL)
+ catch (const gdb_exception &except)
{
GDB_PY_HANDLE_EXCEPTION (except);
}
- END_CATCH
}
else
stb.puts ("<BAD>)");
if (frame == NULL)
return PyString_FromString ("Stale PendingFrame instance");
- TRY
+ try
{
sp_str = core_addr_to_string_nz (get_frame_sp (frame));
pc_str = core_addr_to_string_nz (get_frame_pc (frame));
}
- CATCH (except, RETURN_MASK_ALL)
+ catch (const gdb_exception &except)
{
GDB_PY_HANDLE_EXCEPTION (except);
}
- END_CATCH
return PyString_FromFormat ("SP=%s,PC=%s", sp_str, pc_str);
}
return NULL;
}
- TRY
+ try
{
/* Fetch the value associated with a register, whether it's
a real register or a so called "user" register, like "pc",
"Cannot read register %d from frame.",
regnum);
}
- CATCH (except, RETURN_MASK_ALL)
+ catch (const gdb_exception &except)
{
GDB_PY_HANDLE_EXCEPTION (except);
}
- END_CATCH
return val == NULL ? NULL : value_to_value_object (val);
}
/* Run unwinders. */
if (gdb_python_module == NULL
- || ! PyObject_HasAttrString (gdb_python_module, "execute_unwinders"))
+ || ! PyObject_HasAttrString (gdb_python_module, "_execute_unwinders"))
{
PyErr_SetString (PyExc_NameError,
- "Installation error: gdb.execute_unwinders function "
+ "Installation error: gdb._execute_unwinders function "
"is missing");
gdbpy_print_stack ();
return 0;
}
gdbpy_ref<> pyo_execute (PyObject_GetAttrString (gdb_python_module,
- "execute_unwinders"));
+ "_execute_unwinders"));
if (pyo_execute == NULL)
{
gdbpy_print_stack ();