skillfed

types-gdb

Typing stubs for gdb

types-gdb v16.3.0.20260712 90.2K downloads/30d#13,614 on PyPI37
Permissive license Apache-2.0 Active released

What it is and what it does

types-gdb is a type stub package that provides type annotations for GDB's Python API. It allows Python type checkers like mypy and pyright to validate code written for GDB's scripting environment. The stubs are generated from the typeshed project and aim to match GDB version 16.3.*.

This package is only useful when writing Python scripts that will run under GDB itself—the gdb module cannot be installed separately via pip. If you're developing GDB automation scripts and want static type checking, you install types-gdb in your development environment so your type checker can understand the gdb module's interface.

Use it for:

  • Type-check GDB Python scripts before running them under GDB
  • Develop GDB automation with IDE autocomplete and type validation
  • Validate custom GDB commands written in Python against the official API
  • Catch type errors in GDB breakpoint handlers and event callbacks

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides type stubs for GDB's Python API, enabling type checkers to validate code that uses GDB's scripting interface.

Yes, if you write Python scripts for GDB and use a type checker. It has no runtime dependencies, is actively maintained, and carries a permissive license. Install it in your development environment alongside mypy or pyright to catch type errors in GDB automation code before execution.

Install

types-gdb on PyPI

pip

pip install types-gdb

uv

uv add types-gdb

poetry

poetry add types-gdb

Installing types-gdb

Before you install

Low install friction; a pure-Python stub package with no runtime dependencies. Actively maintained as part of typeshed, with recent releases and no known vulnerabilities.

License in practice

Apache-2.0 permissive license allows use in most projects without significant restrictions.

Quickstart

pip install types-gdb

# In your GDB Python script (run under GDB):
import gdb

# Type checker now understands gdb module types
breakpoint: gdb.Breakpoint = gdb.Breakpoint('main')

The gdb module is only available when Python scripts run under GDB itself; this package is for type checking only and does not provide a standalone gdb module.

Verify before relying

  • Whether type coverage is complete for all GDB 16.3.* API surface areas
  • Compatibility with GDB versions outside the 16.3.* range

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 33 days since the last release
Last repo commit
First released
Downloads 90,153/month — #13,614 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: types_gdb-16.3.0.20260712-py3-none-any.whl

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

gdb python type hintsgdb type stubstype checking gdb scriptsgdb python api typingtypeshed gdb stubs
type-stubsgdbdebugger

More Software Development packages