* python/python.c (gdbpy_find_pc_line): Call find_pc_line
inside TRY_CATCH.
This commit is contained in:
parent
dd5fa3e772
commit
9e974e552d
@ -1,3 +1,8 @@
|
|||||||
|
2013-02-28 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* python/python.c (gdbpy_find_pc_line): Call find_pc_line
|
||||||
|
inside TRY_CATCH.
|
||||||
|
|
||||||
2013-02-28 Tom Tromey <tromey@redhat.com>
|
2013-02-28 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* py-finishbreakpoint.c (bpfinishpy_init): Reorganize to call
|
* py-finishbreakpoint.c (bpfinishpy_init): Reorganize to call
|
||||||
|
@ -738,16 +738,25 @@ gdbpy_parse_and_eval (PyObject *self, PyObject *args)
|
|||||||
static PyObject *
|
static PyObject *
|
||||||
gdbpy_find_pc_line (PyObject *self, PyObject *args)
|
gdbpy_find_pc_line (PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
struct symtab_and_line sal;
|
|
||||||
CORE_ADDR pc;
|
|
||||||
gdb_py_ulongest pc_llu;
|
gdb_py_ulongest pc_llu;
|
||||||
|
volatile struct gdb_exception except;
|
||||||
|
PyObject *result;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple (args, GDB_PY_LLU_ARG, &pc_llu))
|
if (!PyArg_ParseTuple (args, GDB_PY_LLU_ARG, &pc_llu))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
pc = (CORE_ADDR) pc_llu;
|
TRY_CATCH (except, RETURN_MASK_ALL)
|
||||||
sal = find_pc_line (pc, 0);
|
{
|
||||||
return symtab_and_line_to_sal_object (sal);
|
struct symtab_and_line sal;
|
||||||
|
CORE_ADDR pc;
|
||||||
|
|
||||||
|
pc = (CORE_ADDR) pc_llu;
|
||||||
|
sal = find_pc_line (pc, 0);
|
||||||
|
result = symtab_and_line_to_sal_object (sal);
|
||||||
|
}
|
||||||
|
GDB_PY_HANDLE_EXCEPTION (except);
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read a file as Python code.
|
/* Read a file as Python code.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user