From: Tom Tromey Date: Thu, 28 Feb 2013 19:23:57 +0000 (+0000) Subject: * python/python.c (gdbpy_find_pc_line): Call find_pc_line X-Git-Tag: sid-snapshot-20130301~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e974e552d14a3755637f24215c563976716c971;p=platform%2Fupstream%2Fbinutils.git * python/python.c (gdbpy_find_pc_line): Call find_pc_line inside TRY_CATCH. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b9c6757..e785983 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-02-28 Tom Tromey + * python/python.c (gdbpy_find_pc_line): Call find_pc_line + inside TRY_CATCH. + +2013-02-28 Tom Tromey + * py-finishbreakpoint.c (bpfinishpy_init): Reorganize to call frame_object_to_frame_info inside TRY_CATCH. diff --git a/gdb/python/python.c b/gdb/python/python.c index 8dd65a1..e2c19b3 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -738,16 +738,25 @@ gdbpy_parse_and_eval (PyObject *self, PyObject *args) static PyObject * gdbpy_find_pc_line (PyObject *self, PyObject *args) { - struct symtab_and_line sal; - CORE_ADDR pc; gdb_py_ulongest pc_llu; + volatile struct gdb_exception except; + PyObject *result; if (!PyArg_ParseTuple (args, GDB_PY_LLU_ARG, &pc_llu)) return NULL; - pc = (CORE_ADDR) pc_llu; - sal = find_pc_line (pc, 0); - return symtab_and_line_to_sal_object (sal); + TRY_CATCH (except, RETURN_MASK_ALL) + { + 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.