MCPcopy Index your code
hub / github.com/python/cpython / _f_lasti

Method _f_lasti

Tools/gdb/libpython.py:1138–1147  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1136 return self._f_special("nlocalsplus", int_from_int)
1137
1138 def _f_lasti(self):
1139 codeunit_p = gdb.lookup_type("_Py_CODEUNIT").pointer()
1140 instr_ptr = self._gdbval["instr_ptr"]
1141 if interp_frame_has_tlbc_index():
1142 tlbc_index = self._gdbval["tlbc_index"]
1143 code_arr = PyCodeArrayPtr(self._f_code().field("co_tlbc"))
1144 first_instr = code_arr.get_entry(tlbc_index).cast(codeunit_p)
1145 else:
1146 first_instr = self._f_code().field("co_code_adaptive").cast(codeunit_p)
1147 return int(instr_ptr - first_instr)
1148
1149 def is_shim(self):
1150 return self._f_special("owner", int) == FRAME_OWNED_BY_INTERPRETER

Callers 1

__init__Method · 0.95

Calls 6

_f_codeMethod · 0.95
get_entryMethod · 0.95
PyCodeArrayPtrClass · 0.85
fieldMethod · 0.80
castMethod · 0.80

Tested by

no test coverage detected