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 — Support gdbjit for CPython · Issue #133377 · python/cpython

Support gdbjit for CPython #133377

New issue
Copy link
New issue
Copy link
Open
Open
Support gdbjit for CPython#133377
Copy link
Labels
topic-JITtriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-featureA feature request or enhancementA feature request or enhancement

Description

@Zheaoli
Zheaoli
opened on May 4, 2025
Issue body actions

Feature or enhancement

Proposal:

The GDB support a special interface for JIT. The developer can inject some debug info into the JITed code. Both of the LuaJIT and V8 are support GDBJIT

FYI:

  1. https://sourceware.org/gdb/current/onlinedocs/gdb.html/JIT-Interface.html
  2. https://v8.dev/docs/gdb-jit
  3. https://github.com/v8/v8/blob/main/src/diagnostics/gdb-jit.cc
  4. https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_gdbjit.c

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Reacted by Yao Zi, Wulian233 and Abduaziz

Activity

  1. Zheaoli
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on May 4, 2025
  2. Zheaoli commented on May 4, 2025

    @Zheaoli
    Zheaoli
    on May 4, 2025
    ContributorAuthor
    More actions

    Need a topic-jit tag

  3. picnixz
    added
    triagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
    topic-JIT
    on May 4, 2025
  4. Fidget-Spinner commented on May 4, 2025

    @Fidget-Spinner
    Fidget-Spinner
    on May 4, 2025
    Member
    More actions

    I think Pablo is proposing something similar here? #126910

  5. Zheaoli commented on May 4, 2025

    @Zheaoli
    Zheaoli
    on May 4, 2025
    ContributorAuthor
    More actions

    I think Pablo is proposing something similar here? #126910

    I think this is a liitle bit different with @pablogsal idea in #126910. I will explain this below.

    In #126910, @pablogsal proposes to compile the template code with a frame pointer. So we can debug the JIT code itself more easy.

    But for the gdbjit, the main target is that we can indicate the Python code with the JIT code in gdb.

    For example, the following this a demo in luajit with gdbjit

    Image

    Reacted by Ken Jin
  6. pablogsal commented on May 5, 2025

    @pablogsal
    pablogsal
    on May 5, 2025
    Member
    More actions

    I also have a PR that implements precisely this but that was partially turned down because adding the ELF metadata to make gdb understand jit frames was deemed too slow when I discussed with @brandtbucher.

    If there is consensus I can resurrect that code and make it opt in.

    Reacted by Nadeshiko Manju
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-JITtriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-featureA feature request or enhancementA feature request or enhancement

    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.