diff --git a/README.md b/README.md index 21633f9..1c8696b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # gdbplotter -Lightweight Python tool that connects to a running gdb server and visualises data from given memory addresses. 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. +Lightweight Python tool that connects to a running gdb server and visualises data from given memory addresses. + +![UI Overview](doc/ui_data_mon.png) ## Features @@ -44,6 +46,23 @@ from gdbplotter import gdbparser # parse gdb output and plot ``` +### Specifying your memory regions + +![Memory regions](doc/ui_mem_regions.png) + +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](https://docs.python.org/3/library/struct.html#format-characters) + ## 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.). @@ -51,3 +70,7 @@ Upon first run of the GUI, the tool will create a file called `gdbplotter_config ## 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. diff --git a/doc/ui_data_mon.png b/doc/ui_data_mon.png new file mode 100644 index 0000000..c842d34 Binary files /dev/null and b/doc/ui_data_mon.png differ diff --git a/doc/ui_mem_regions.png b/doc/ui_mem_regions.png new file mode 100644 index 0000000..1019c0e Binary files /dev/null and b/doc/ui_mem_regions.png differ diff --git a/pyproject.toml b/pyproject.toml index 324e2fc..46c6bcd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gdbplotter" -version = "0.1.1" +version = "0.1.2" description = "Simple UI for printing GDB memory values" readme = "README.md" license ={ file = "LICENSE"} @@ -18,3 +18,7 @@ dev = [ [project.gui-scripts] gdbplotter = "gdbplotter.plotter_ui:main" + +[project.urls] +homepage = "https://github.com/1atabey1/gdbplotter" +repository = "https://github.com/1atabey1/gdbplotter" diff --git a/uv.lock b/uv.lock index 603db74..b9e5654 100644 --- a/uv.lock +++ b/uv.lock @@ -171,7 +171,7 @@ wheels = [ [[package]] name = "gdbplotter" -version = "0.1.1" +version = "0.1.2" source = { editable = "." } dependencies = [ { name = "matplotlib" },