Repository navigation
What to do with Misc/gdbinit? #102809
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
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 pystackwith 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 Pythonshould have been spelled out (2.7? 3.0?). Does the macro need an update now?@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.
Unless @gpshead or perhaps @vstinner (or @davidmalcolm) have any objections, let's delete it.
As far as I know, Victor is not active right now. I will wait for @gpshead's feedback before sending a PR :)
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.
I'll approve any PR removing it.
- added a commit that references this issue
on Mar 20, 2023 - added a commit that references this issue
on Mar 20, 2023 removed!
Quoting: #101866 (comment)
Problems:
co_lnotabfrom code objects as per PEP 626 #101866gdbinitwill use a deprecatedco_lnotabpropertyWhat should we do with it?
Linked PRs
Misc/gdbinit#102854Misc/gdbinitin the code #143980Misc/gdbinitin the code (GH-143980) #144044Misc/gdbinitin the code (GH-143980) #144045