GeezerVison is showing github.com — What to do with `Misc/gdbinit`? · Issue #102809 · python/cpython
What to do with Misc/gdbinit? #102809DescriptionQuoting: #101866 (comment)
Does this file have any tests? I suspect that most of the code in this file is wrong (as we have changed much of CPython since it was written).
Problems:
- After gh-101865: Deprecate
co_lnotab from code objects as per PEP 626 #101866 gdbinit will use a deprecated co_lnotab property
- There are no tests for it as far as I know
- When the internal of CPython are changed, there's no way to detect that it was broken
- There's no owner of this file, who can validate changes and keep it up-to-date
What should we do with it?
Linked PRs
Activityterryjreedy commented on Mar 18, 2023 @sobolevn Discussing what to do with Misc/gdbinit could have been a 'discuss' thread, but perhaps you hope to followup with PR. I have some concrete ideas based on its current content.
@warsaw You contributed this file in 2001.
@gpshead I believe you are the only other active coredev who made substantial contributions to this file.
In 2020, you added
# NOTE: If you have gdb 7 or later, it supports debugging of Python directly
# with embedded macros that you may find superior to what is in here.
# See Tools/gdb/libpython.py and http://bugs.python.org/issue8032.
If now, 13 years later, everyone uses a version of gdb that obsoletes this file, then we might delete it. End of issue.
If not, I think it should be moved to Tools/gdb, along side its current only content, libpython.py. (Can this be done without losing blame history? Which I obviously used.) This should make it more discoverable.
The NOTE: (above) should by expanded to say that some things might not work and that PR fixes would be welcome (if true ;-). I think a last revision date should be added here or maybe to individual macros (see below).
The macro that uses co_lnotab should get a note with its expected drop dead version.
@smontanaro In 2010 you added define pystack with this note.
# Note: The name of the main interpreter function and the function which
# follow it has changed over time. This version of pystack works with this
# version of Python. If you try using it with older or newer versions of
# the interpreter you may will have to change the functions you compare with
# $pc.
this version of Python should have been spelled out (2.7? 3.0?). Does the macro need an update now?
smontanaro commented on Mar 18, 2023 @terryjreedy I no longer use it, but can retrieve it from wherever if I change my mind. GDB's better Python support works for me. warsaw commented on Mar 19, 2023 sobolevn commented on Mar 20, 2023 As far as I know, Victor is not active right now. I will wait for @gpshead's feedback before sending a PR :) davidmalcolm commented on Mar 20, 2023
Unless @gpshead or perhaps @vstinner (or @davidmalcolm) have any objections, let's delete it.
FWIW I have no objections to removing gdbinit, but I haven't done CPython work in a decade, so my opinion here is probably irrelevant. gpshead commented on Mar 20, 2023 I'll approve any PR removing it. gpshead commented on Mar 20, 2023
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|