pygdbmi
Parse gdb machine interface output with Python
What it is and what it does
pygdbmi is a Python library that bridges GDB (the GNU debugger) and Python by parsing GDB's machine interface (MI) output into structured, JSON-serializable dictionaries. It serves two main purposes: it can parse raw GDB MI strings into Python dicts with typed fields like message, payload, token, and type, and it provides a GdbController class that spawns GDB as a subprocess and lets you send commands to it, receiving structured responses back. This is useful for building debugger frontends or integrating GDB into larger development tools.
The package has no runtime dependencies and installs cleanly. It supports Python 3.7, 3.8, 3.9, 3.10 and PyPy, and is cross-platform (Linux, macOS, Windows). However, the project is dormant—the last release was 2023-01-29 and the last commit 2023-12-27—so while it remains stable and suitable for established use cases, you should not expect active maintenance or updates for newer GDB versions or Python releases.
Use it for:
- Build a web-based or graphical GDB frontend by parsing MI output on the backend.
- Automate debugging workflows by scripting GDB commands and parsing structured responses.
- Integrate GDB into a larger IDE or development tool that needs programmatic control over the debugger.
- Parse and analyze GDB breakpoint, thread, and execution state data for testing or monitoring.
- Create a custom debugger UI that communicates with GDB via MI instead of the CLI.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses GDB machine interface output into structured Python dictionaries and provides a class to control GDB as a subprocess, returning JSON-serializable responses.
Yes, if you need to parse GDB machine interface output or control GDB from Python. The package is stable, has no dependencies, and works well for its intended purpose. However, choose it with the understanding that maintenance is dormant—it will not be updated for new GDB or Python versions, so verify compatibility with your target environment before committing to it in a new project.
Install
pygdbmi on PyPI
pip
pip install pygdbmiuv
uv add pygdbmipoetry
poetry add pygdbmiInstalling pygdbmi
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2023-01-29 and last commit 2023-12-27. The package is stable but expect no active bug fixes or feature updates.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pygdbmi
from pygdbmi.gdbmiparser import parse_response
response = parse_response('^done,bkpt={number="1",type="breakpoint"}')
print(response['type']) # 'result'
print(response['message']) # 'done'
GDB must be installed on the system; on macOS, GDB may need to be codesigned to work properly.
Verify before relying
- Whether the package works with GDB versions newer than those tested during development.
- Current status of Windows 10 / MinGW / Cygwin compatibility given the dormant maintenance state.
- Python version support beyond 3.10 given the dormant maintenance status.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,293 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,836,122/month — #3,501 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pygdbmi-0.11.0.0-py3-none-any.whl
Keywords: gdb, python, machine-interface, parse, frontend
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-gdbProvides type stubs for GDB's Python API,…
permissive · top 15,000 on PyPI
gdbmongoGdbmongo provides GDB pretty printers and…
permissive · top 5,000 on PyPI
freertos-gdbA GDB Python plugin that adds commands to…
permissive · top 5,000 on PyPI
pyocdpyOCD is a Python-based debugger and programmer…
permissive · top 5,000 on PyPI
esp-idf-panic-decoderParses ESP-IDF panic handler output (registers…
permissive · top 15,000 on PyPI
debugpydebugpy is a Debug Adapter Protocol…
permissive · top 1,000 on PyPI
esp-coredumpRetrieves and analyzes core dumps from ESP32…
permissive · top 5,000 on PyPI
EasyProcessEasyProcess wraps Python's subprocess module to…
permissive · top 5,000 on PyPI
ptyprocessRun a subprocess in a pseudo terminal (pty) and…
permissive · top 1,000 on PyPI
subprocess.runProvides a simplified interface to run shell…
permissive · top 15,000 on PyPI