/* 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) { unsigned PY_LONG_LONG pc; struct block *block; struct obj_section *section; struct symtab *symtab; if (!PyArg_ParseTuple (args, "K", &pc)) return NULL; section = find_pc_mapped_section (pc); symtab = find_pc_sect_symtab (pc, section); if (!symtab || symtab->objfile == NULL) { PyErr_SetString (PyExc_RuntimeError, _("Cannot locate object file for block.")); return NULL; } block = block_for_pc (pc); if (block) return block_to_block_object (block, symtab->objfile); Py_RETURN_NONE; }
struct symbol * get_frame_function_inlined (struct frame_info * frame) { struct block *bl = get_frame_block (frame, 0); struct bfd_section *sect; if (bl == 0) return 0; sect = find_pc_mapped_section (bl->startaddr); return block_inlined_function (bl, sect); }
/* 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; struct block *block; struct obj_section *section = NULL; struct symtab *symtab = NULL; volatile struct gdb_exception except; if (!PyArg_ParseTuple (args, GDB_PY_LLU_ARG, &pc)) return NULL; TRY_CATCH (except, RETURN_MASK_ALL) { section = find_pc_mapped_section (pc); symtab = find_pc_sect_symtab (pc, section); }
struct block * block_for_pc (CORE_ADDR pc) { return block_for_pc_sect (pc, find_pc_mapped_section (pc)); }
struct blockvector * blockvector_for_pc (CORE_ADDR pc, int *pindex) { return blockvector_for_pc_sect (pc, find_pc_mapped_section (pc), pindex, NULL); }
struct symbol * find_pc_function (CORE_ADDR pc) { return find_pc_sect_function (pc, find_pc_mapped_section (pc)); }
struct blockvector * blockvector_for_pc (CORE_ADDR pc, struct block **pblock) { return blockvector_for_pc_sect (pc, find_pc_mapped_section (pc), pblock, NULL); }