types-gdb
Typing stubs for gdb
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-gdbuv
uv add types-gdbpoetry
poetry add types-gdbInstalling 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
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
pygdbmiParses GDB machine interface output into…
permissive · top 5,000 on PyPI
types-MarkdownProvides type stubs for the Markdown package,…
permissive · top 5,000 on PyPI
types-cachetoolsProvides type stubs for cachetools, enabling…
permissive · top 1,000 on PyPI
types-decoratorProvides type stubs for the `decorator`…
permissive · top 5,000 on PyPI
types-oauthlibProvides type stubs for the oauthlib package,…
permissive · top 5,000 on PyPI
types-gunicornProvides type stubs for gunicorn to enable…
permissive · top 15,000 on PyPI
freertos-gdbA GDB Python plugin that adds commands to…
permissive · top 5,000 on PyPI
types-pyserialProvides type hints for the pyserial library,…
permissive · top 5,000 on PyPI
types-netaddrProvides type stubs for the netaddr package,…
permissive · top 15,000 on PyPI
types-mypy-extensionsProvides type stubs for mypy-extensions,…
permissive · top 15,000 on PyPI