* py-block.c (gdbpy_block_for_pc): Call block_for_pc inside
TRY_CATCH.
This commit is contained in:
parent
81b52a3ae5
commit
86a3263fff
|
@ -1,3 +1,8 @@
|
||||||
|
2013-02-28 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* py-block.c (gdbpy_block_for_pc): Call block_for_pc inside
|
||||||
|
TRY_CATCH.
|
||||||
|
|
||||||
2013-02-28 Tom Tromey <tromey@redhat.com>
|
2013-02-28 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* objfiles.h (ALL_PSPACE_OBJFILES): Remove trailing backlash.
|
* objfiles.h (ALL_PSPACE_OBJFILES): Remove trailing backlash.
|
||||||
|
|
|
@ -370,7 +370,7 @@ PyObject *
|
||||||
gdbpy_block_for_pc (PyObject *self, PyObject *args)
|
gdbpy_block_for_pc (PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
gdb_py_ulongest pc;
|
gdb_py_ulongest pc;
|
||||||
struct block *block;
|
struct block *block = NULL;
|
||||||
struct obj_section *section = NULL;
|
struct obj_section *section = NULL;
|
||||||
struct symtab *symtab = NULL;
|
struct symtab *symtab = NULL;
|
||||||
volatile struct gdb_exception except;
|
volatile struct gdb_exception except;
|
||||||
|
@ -382,6 +382,9 @@ gdbpy_block_for_pc (PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
section = find_pc_mapped_section (pc);
|
section = find_pc_mapped_section (pc);
|
||||||
symtab = find_pc_sect_symtab (pc, section);
|
symtab = find_pc_sect_symtab (pc, section);
|
||||||
|
|
||||||
|
if (symtab != NULL && symtab->objfile != NULL)
|
||||||
|
block = block_for_pc (pc);
|
||||||
}
|
}
|
||||||
GDB_PY_HANDLE_EXCEPTION (except);
|
GDB_PY_HANDLE_EXCEPTION (except);
|
||||||
|
|
||||||
|
@ -392,7 +395,6 @@ gdbpy_block_for_pc (PyObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
block = block_for_pc (pc);
|
|
||||||
if (block)
|
if (block)
|
||||||
return block_to_block_object (block, symtab->objfile);
|
return block_to_block_object (block, symtab->objfile);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue