skillfed

pygdbmi

Parse gdb machine interface output with Python

pygdbmi v0.11.0.0 1.8M downloads/30d#3,501 on PyPI259
Permissive license MIT DORMANT released

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 pygdbmi

uv

uv add pygdbmi

poetry

poetry add pygdbmi

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPy

Tags

gdb machine interface parsergdb output parsing pythongdb subprocess controlgdb mi structured outputgdb frontend backendgdb automation pythondebug adapter gdb
gdb-integrationdebugger-automationmi-parser

More Software Development packages