Skip to content

1atabey1/gdbplotter

Repository files navigation

gdbplotter

Lightweight Python tool that connects to a running gdb server and visualises data from given memory addresses.

UI Overview

Features

  • Communicate with a GDB server and read out specific memory regions
  • Specify decoding rules for each region
  • Simple plotting UI for quick inspection of numeric traces

Installation

Install from pypi

pip install gdbplotter

Install from source into a virtual environment:

uv sync

Usage

  • Run interactively (should be installed into Scripts or bin of the virtualenv by default):
gdbplotter
  • Run as python module (if previous method doesnt work)
python -m gdbplotter
  • Or import in your own scripts:
from gdbplotter import gdbparser

# parse gdb output and plot

Specifying your memory regions

Memory regions

gdbplotter parses its signals based on the base addresses and format strings that you define in the Memory Regions tab. You can't run the tool without specifying at least one memory region first.

You can find the base address of your variables by simply starting a gdb instance and with your debug symbols loaded:

gdb
>file main.elf
>target remote localhost:50000
>print &variable

The format string structure for decoding the fields of your data region can be looked up in the Python documentation

Configuration

Upon first run of the GUI, the tool will create a file called gdbplotter_config.json in the working directory — edit this to change default behavior (input paths, plotting options, etc.).

Tests

There is a small test helper in test/gdbservermock.py for development. Run tests or examples manually as needed.

Note

Be aware that this only really makes sense on target architectures that allow reading the memory while the target is running (e.g. "Cortex Live Watch"). Tested with various STM32 processors and regular STLinks.

About

Simple Tool for visualizing and logging data from a running gdbserver instance

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages