gh-109094: replace frame->prev_instr by frame->instr_ptr (#109095)

This commit is contained in:
Irit Katriel 2023-10-26 14:43:10 +01:00 committed by GitHub
parent 573eff3e2e
commit 67a91f78e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 249 additions and 164 deletions

View file

@ -1065,9 +1065,9 @@ class PyFramePtr:
def _f_lasti(self):
codeunit_p = gdb.lookup_type("_Py_CODEUNIT").pointer()
prev_instr = self._gdbval["prev_instr"]
instr_ptr = self._gdbval["instr_ptr"]
first_instr = self._f_code().field("co_code_adaptive").cast(codeunit_p)
return int(prev_instr - first_instr)
return int(instr_ptr - first_instr)
def is_shim(self):
return self._f_special("owner", int) == FRAME_OWNED_BY_CSTACK