Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interpreter: add support for Python 3.13 #190

Merged
merged 6 commits into from
Oct 16, 2024
Merged

interpreter: add support for Python 3.13 #190

merged 6 commits into from
Oct 16, 2024

Conversation

florianl
Copy link
Contributor

Python 3.13 was released some days ago. Adjust offsets to support Python 3.13.

@florianl florianl requested review from a team as code owners October 14, 2024 17:19
interpreter/python/python.go Outdated Show resolved Hide resolved
interpreter/python/python.go Outdated Show resolved Hide resolved
Comment on lines 814 to 821
vms.PyFrameObject.Code = 0
vms.PyFrameObject.LastI = 56 // _Py_CODEUNIT *prev_instr
vms.PyFrameObject.Back = 8 // struct _PyInterpreterFrame *previous
vms.PyFrameObject.EntryMember = 70 // struct _PyInterpreterFrame owner
vms.PyFrameObject.EntryVal = 3 // enum _frameowner, FRAME_OWNED_BY_CSTACK
vms.PyThreadState.Frame = 72
vms.PyCFrame.CurrentFrame = 8
vms.PyASCIIObject.Data = 40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this is mostly same as in 3.12. The difference being just in PyThreadState.Frame and PyCFrame.CurrentFrame. But I suppose this is ok for now.

@@ -0,0 +1,77 @@
"""
gdb python script for dumping Python offsets.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you for this! This reminds me that we really should make this non-code. I created #191 to track this. Seems Python is the simplest place to start this when the time comes. But definitely for a later PR.

Copy link
Contributor

@fabled fabled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks! Coredump test might be still useful to add.

@florianl florianl merged commit b00b572 into main Oct 16, 2024
23 checks passed
@florianl florianl deleted the flo-python-3-13 branch October 16, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants