aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-block.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-block.c')
-rw-r--r--gdb/python/py-block.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index 70a0a76..5fc33f0 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -366,44 +366,6 @@ blpy_iter_is_valid (PyObject *self, PyObject *args)
Py_RETURN_TRUE;
}
-/* Return the innermost lexical block containing the specified pc value,
- or 0 if there is none. */
-PyObject *
-gdbpy_block_for_pc (PyObject *self, PyObject *args)
-{
- gdb_py_ulongest pc;
- const struct block *block = NULL;
- struct compunit_symtab *cust = NULL;
-
- if (!PyArg_ParseTuple (args, GDB_PY_LLU_ARG, &pc))
- return NULL;
-
- TRY
- {
- cust = find_pc_compunit_symtab (pc);
-
- if (cust != NULL && COMPUNIT_OBJFILE (cust) != NULL)
- block = block_for_pc (pc);
- }
- CATCH (except, RETURN_MASK_ALL)
- {
- GDB_PY_HANDLE_EXCEPTION (except);
- }
- END_CATCH
-
- if (cust == NULL || COMPUNIT_OBJFILE (cust) == NULL)
- {
- PyErr_SetString (PyExc_RuntimeError,
- _("Cannot locate object file for block."));
- return NULL;
- }
-
- if (block)
- return block_to_block_object (block, COMPUNIT_OBJFILE (cust));
-
- Py_RETURN_NONE;
-}
-
/* This function is called when an objfile is about to be freed.
Invalidate the block as further actions on the block would result
in bad data. All access to obj->symbol should be gated by