Skip to content

bpo-45630 : Dump CodeObject API for debugging #29243

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

Closed
wants to merge 7 commits into from

Conversation

penguin-wwy
Copy link
Contributor

@penguin-wwy penguin-wwy commented Oct 27, 2021

What the title says.

https://bugs.python.org/issue45630

@penguin-wwy penguin-wwy requested a review from a team as a code owner October 27, 2021 16:57
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Nov 27, 2021
@MaxwellDupre
Copy link
Contributor

Looks interesting but there is no documentation on how to use!

@penguin-wwy
Copy link
Contributor Author

@MaxwellDupre Thanks. I add comments to explain how to use

Dump current interpreter frame's code in lldb/gdb command:

(lldb) exp _PyCode_DebugDump(frame->f_code, "debug")

Or Insert the code where you want to observe debug mode:

#ifdef Py_DEBUG
    PyCode_DUMP_IF(code, "foo", "foo", "foo.py");
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants