GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — What to do with `Misc/gdbinit`? · Issue #102809 · python/cpython

What to do with Misc/gdbinit? #102809

New issue
Copy link
New issue
Copy link
Closed
Closed
What to do with Misc/gdbinit?#102809
Copy link
Assignees
sobolevn
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@sobolevn
sobolevn
opened on Mar 18, 2023
Issue body actions

Quoting: #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:

  1. After gh-101865: Deprecate co_lnotab from code objects as per PEP 626 #101866 gdbinit will use a deprecated co_lnotab property
  2. There are no tests for it as far as I know
  3. When the internal of CPython are changed, there's no way to detect that it was broken
  4. 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

  • gh-102809: Remove Misc/gdbinit #102854
  • gh-102809: Remove gdbinit mentioned in README since gdbinit was removed in ef000eb #103269
  • gh-102809: No longer mention Misc/gdbinit in the code #143980
  • [3.14] gh-102809: No longer mention Misc/gdbinit in the code (GH-143980) #144044
  • [3.13] gh-102809: No longer mention Misc/gdbinit in the code (GH-143980) #144045

Activity

  1. sobolevn
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Mar 18, 2023
  2. terryjreedy commented on Mar 18, 2023

    @terryjreedy
    terryjreedy
    on Mar 18, 2023
    Member
    More actions

    @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?

  3. smontanaro commented on Mar 18, 2023

    @smontanaro
    smontanaro
    on Mar 18, 2023
    Contributor
    More actions

    @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.

  4. warsaw commented on Mar 19, 2023

    @warsaw
    warsaw
    on Mar 19, 2023
    Member
    More actions

    Unless @gpshead or perhaps @vstinner (or @davidmalcolm) have any objections, let's delete it.

  5. sobolevn
    self-assigned this
    on Mar 20, 2023
  6. sobolevn commented on Mar 20, 2023

    @sobolevn
    sobolevn
    on Mar 20, 2023
    MemberAuthor
    More actions

    As far as I know, Victor is not active right now. I will wait for @gpshead's feedback before sending a PR :)

  7. davidmalcolm commented on Mar 20, 2023

    @davidmalcolm
    davidmalcolm
    on Mar 20, 2023
    Member
    More actions

    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.

  8. gpshead commented on Mar 20, 2023

    @gpshead
    gpshead
    on Mar 20, 2023
    Member
    More actions

    I'll approve any PR removing it.

  9. sobolevn
    added a commit that references this issue on Mar 20, 2023

    pythongh-102809: Remove `Misc/gdbinit`

    13deb2d
  10. gpshead
    added a commit that references this issue on Mar 20, 2023

    gh-102809: Remove `Misc/gdbinit` (#102854)

    ef000eb
  11. gpshead commented on Mar 20, 2023

    @gpshead
    gpshead
    on Mar 20, 2023
    Member
    More actions

    removed!

  12. gpshead
    closed this as completedon Mar 20, 2023
  13. Fidget-Spinner
    added a commit that references this issue on Mar 27, 2023

    pythongh-102809: Remove `Misc/gdbinit` (python#102854)

    1886084
  14. hrnciar
    added 3 commits that reference this issue on Apr 5, 2023

    pythongh-102809: Remove gdbinit mentioned in README since gdbinit was…

    f0b0af1

    pythongh-102809: Remove gdbinit mentioned in README since gdbinit was…

    d59477f

    pythongh-102809: Remove gdbinit mentioned in README since gdbinit was…

    91d8e09
  15. hauntsaninja
    added a commit that references this issue on Apr 8, 2023

    gh-102809: Remove gdbinit mention in Misc/README (#103269)

    1377496
  16. warsaw
    added 2 commits that reference this issue on Apr 11, 2023

    pythongh-102809: Remove `Misc/gdbinit` (python#102854)

    73782de

    pythongh-102809: Remove gdbinit mention in Misc/README (python#103269)

    ac125c5
  17. vstinner
    added a commit that references this issue on Jan 19, 2026

    gh-102809: No longer mention `Misc/gdbinit` in the code (#143980)

    f84ea11
  18. miss-islington
    added 2 commits that reference this issue on Jan 19, 2026

    pythongh-102809: No longer mention `Misc/gdbinit` in the code (python…

    8340f58

    pythongh-102809: No longer mention `Misc/gdbinit` in the code (python…

    34881e4
  19. vstinner
    added 2 commits that reference this issue on Jan 19, 2026

    [3.13] gh-102809: No longer mention `Misc/gdbinit` in the code (GH-14…

    7bca3dd

    [3.14] gh-102809: No longer mention `Misc/gdbinit` in the code (GH-14…

    27256ca
  20. thunder-coding
    added a commit that references this issue on Feb 15, 2026

    pythongh-102809: No longer mention `Misc/gdbinit` in the code (python…

    746eb98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sobolevn
    sobolevn

Labels

type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.