Client library and CLI for DOSBox-X remote debug protocols (GDB and QMP)
Project description
dbxdebug
Client library and CLI for DOSBox-X remote debug protocols.
Features
-
GDB Client: Remote debugging via GDB Remote Serial Protocol
- Memory read/write
- Register inspection
- Breakpoint management
- Execution control (step, continue, halt)
-
QMP Client: Keyboard input via QEMU Monitor Protocol
- Key press/release with timing control
- Text typing with shift handling
- Key combinations (Ctrl+C, Alt+F4, etc.)
-
Video Tools: DOS text mode screen capture
- Screen capture (text, raw, HTML)
- Timed multi-frame recording
- Color analysis
- BIOS timer correlation
Installation
uv sync
CLI Usage
dbxdebug
├── mem # Memory operations (alias: gdb)
│ ├── read # Read memory
│ └── write # Write hex bytes
│
├── cpu # CPU and execution control
│ ├── regs # Display registers
│ ├── break # Set breakpoint
│ ├── delete # Remove breakpoint
│ ├── step # Single step
│ ├── cont # Continue execution
│ └── halt # Stop execution
│
├── key # Keyboard input (alias: qmp)
│ ├── send # Key chord (e.g., ctrl c)
│ ├── type # Type text string
│ ├── down # Press and hold key
│ ├── up # Release key
│ └── list # List QMP commands
│
└── screen # Screen capture
├── show # Display text to stdout
├── capture # Save frame to file (-f raw|html|text)
├── record # Multi-frame timed capture
├── watch # Real-time display
├── info # Video mode, BIOS ticks
└── colors # Analyze color palette
Examples
# Memory
dbxdebug mem read b800:0000 4000 --hex
dbxdebug mem write 0x1000 90909090
# CPU / Debugging
dbxdebug cpu regs
dbxdebug cpu break 0x1000
dbxdebug cpu step
dbxdebug cpu cont
# Keyboard
dbxdebug key send a
dbxdebug key send ctrl c
dbxdebug key send ctrl alt delete
dbxdebug key type "Hello World!"
# Screen
dbxdebug screen show
dbxdebug screen capture -f html -o snapshot
dbxdebug screen record -d 60 -r 30 -o session.capture.gz
dbxdebug screen watch
dbxdebug screen colors
Library Usage
from dbxdebug import (
GDBClient, QMPClient, DOSVideoTools,
ScreenRecorder, load_capture,
ctrl_key, CTRL_C, DBX_KEY,
)
# Memory and debugging
with GDBClient() as gdb:
regs = gdb.read_registers()
mem = gdb.read_memory("b800:0000", 4000)
gdb.write_memory(0x1000, b"\x90\x90")
gdb.set_breakpoint(0x1000)
gdb.step()
gdb.continue_execution()
# Keyboard input
with QMPClient() as qmp:
qmp.send_key(["ctrl", "c"]) # Key chord
qmp.send_key(CTRL_C) # Using constant
qmp.type_text("Hello World!") # Type string
qmp.key_down("shift") # Hold key
qmp.key_up("shift") # Release key
# Screen capture
with DOSVideoTools() as video:
lines = video.screen_dump() # Text lines
raw = video.screen_raw() # Raw bytes with attrs
lines, ticks = video.screen_dump_with_ticks()
# Timed recording
with DOSVideoTools() as video:
recorder = ScreenRecorder()
recorder.record(video, duration=10.0, sample_rate=50)
recorder.save("session.capture.gz")
# Load and analyze capture
data = load_capture("session.capture.gz")
Ports
| Protocol | Default Port | Purpose |
|---|---|---|
| GDB | 2159 | Debugging, memory access |
| QMP | 4444 | Keyboard input |
Enable in DOSBox-X config:
[dosbox]
gdbserver=true
qmpserver=true
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbxdebug-0.2.1.tar.gz.
File metadata
- Download URL: dbxdebug-0.2.1.tar.gz
- Upload date:
- Size: 74.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abf437329d240fcb810bbecb0f8fee82c6f653c5e1c7fde2b47aa0f1aeb47d78
|
|
| MD5 |
eec9e69fbff36a7e34975f2f4528079c
|
|
| BLAKE2b-256 |
056c5cbbc71c118d8ab1f5f8ee6b0ec00bd7b588d28d8819bd9a5c71224afd4a
|
Provenance
The following attestation bundles were made for dbxdebug-0.2.1.tar.gz:
Publisher:
publish.yml on lokkju/dbxdebug
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbxdebug-0.2.1.tar.gz -
Subject digest:
abf437329d240fcb810bbecb0f8fee82c6f653c5e1c7fde2b47aa0f1aeb47d78 - Sigstore transparency entry: 769314180
- Sigstore integration time:
-
Permalink:
lokkju/dbxdebug@2a1734bec2af2d99090c82dd3d79eb1cfb8393c7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/lokkju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a1734bec2af2d99090c82dd3d79eb1cfb8393c7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dbxdebug-0.2.1-py3-none-any.whl.
File metadata
- Download URL: dbxdebug-0.2.1-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73e3b17f35337462775a0afb04b9b00457f2c54ee1a8e4c93179240d1b05be0d
|
|
| MD5 |
513131b80aeefbc6ab8b4b9d00adff3e
|
|
| BLAKE2b-256 |
f724606e165dda1b7880aa9568e229d4e62c004adc1b6a5926581f5a72b8de4f
|
Provenance
The following attestation bundles were made for dbxdebug-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on lokkju/dbxdebug
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbxdebug-0.2.1-py3-none-any.whl -
Subject digest:
73e3b17f35337462775a0afb04b9b00457f2c54ee1a8e4c93179240d1b05be0d - Sigstore transparency entry: 769314193
- Sigstore integration time:
-
Permalink:
lokkju/dbxdebug@2a1734bec2af2d99090c82dd3d79eb1cfb8393c7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/lokkju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a1734bec2af2d99090c82dd3d79eb1cfb8393c7 -
Trigger Event:
push
-
Statement type: