-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-32280: Store _PyRuntime
in a named section
#4802
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
Conversation
@zooba, I figure you'd know about "named sections" well enough to have some insight here. The point of the PR may be moot (see the BPO issue), but let's assume we want to accommodate the use case described in the issue. Is a named section the right way to go? Is the proposed change the approach we'd want in CPython? Note that the question of the fate of the |
ping, @zooba |
I don't know anything about the Windows and macOS specific pagma. So I have no opinion on this PR. |
db906f5
to
10f79fe
Compare
This can be very useful to debuggers so I think this is a good idea but I think we should just have it as non-stable detail that could change if we need to so I am removing the NEWS item. People implementing debuggers and runtime state tools will already read the source to reverse engineer the information needed so they will find this in any case. I have also updated the patch to include this on Linux for gcc/clang |
7f48393
to
8ca4970
Compare
Example usage:
obviously, the real advantage here is to other tools much less powerful than GDB :) |
8ca4970
to
44b352a
Compare
44b352a
to
ffcd44c
Compare
Thanks @maxbelanger for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
This commit stores the _PyRuntime structure in a section of the same name. This allows a debugging or crash reporting tool to quickly locate this structure at runtime without requiring the symbol table. Co-authored-by: Pablo Galindo <pablogsal@gmail.com> (cherry picked from commit 35002aa) Co-authored-by: Max Bélanger <aeromax@gmail.com>
GH-27448 is a backport of this pull request to the 3.10 branch. |
This commit stores the _PyRuntime structure in a section of the same name. This allows a debugging or crash reporting tool to quickly locate this structure at runtime without requiring the symbol table. Co-authored-by: Pablo Galindo <pablogsal@gmail.com> (cherry picked from commit 35002aa) Co-authored-by: Max Bélanger <aeromax@gmail.com> Co-authored-by: Max Bélanger <aeromax@gmail.com>
This patch stores the
_PyRuntime
structure in a section of the same name (on Windows, macOS or Linux; otherwise untested in our configurations). This allows a debugging or crash reporting tool to quickly locate this structure at runtime without requiring the symbol table.https://bugs.python.org/issue32280