From 63fc91dbf3a301faf5d8f1a8b4f66ad79dd4b643 Mon Sep 17 00:00:00 2001 From: Atabey <55498083+1atabey1@users.noreply.github.com> Date: Sun, 14 Dec 2025 13:39:40 +0100 Subject: [PATCH 1/2] break build? --- src/gdbplotter/gdbparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gdbplotter/gdbparser.py b/src/gdbplotter/gdbparser.py index 39be91d..76e66b5 100644 --- a/src/gdbplotter/gdbparser.py +++ b/src/gdbplotter/gdbparser.py @@ -211,7 +211,7 @@ def stop(self): if self.rx_t: self.rx_t.join() - if self.gdb_socket: + # if self.gdb_socket: try: self.gdb_socket.close() except Exception as e: From 6df90acb0ee77126a53d6dcc5c40bd2aef65f450 Mon Sep 17 00:00:00 2001 From: Atabey <55498083+1atabey1@users.noreply.github.com> Date: Sun, 14 Dec 2025 13:46:39 +0100 Subject: [PATCH 2/2] fix build pipeline --- .github/workflows/python-package.yml | 4 ++-- README.md | 3 +++ src/gdbplotter/__main__.py | 1 - src/gdbplotter/gdbparser.py | 2 +- src/gdbplotter/plotter_ui.py | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 990d220..acbd56c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -29,7 +29,7 @@ jobs: python -m pip install --upgrade pip python -m pip install uv uv sync --frozen - - name: Lint with flake8 + - name: Lint with pre-commit config run: | # stop the build if there are Python syntax errors or undefined names - uv run pre-commit run --from-ref origin/main --to-ref HEAD + uv run pre-commit run --all-files diff --git a/README.md b/README.md index c4b4919..21633f9 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ 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. ## 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 @@ -30,6 +31,7 @@ gdbplotter ``` - Run as python module (if previous method doesnt work) + ``` python -m gdbplotter ``` @@ -38,6 +40,7 @@ python -m gdbplotter ```py from gdbplotter import gdbparser + # parse gdb output and plot ``` diff --git a/src/gdbplotter/__main__.py b/src/gdbplotter/__main__.py index 2d91028..f0837e8 100644 --- a/src/gdbplotter/__main__.py +++ b/src/gdbplotter/__main__.py @@ -1,5 +1,4 @@ from gdbplotter.plotter_ui import main - if __name__ == "__main__": main() diff --git a/src/gdbplotter/gdbparser.py b/src/gdbplotter/gdbparser.py index 76e66b5..39be91d 100644 --- a/src/gdbplotter/gdbparser.py +++ b/src/gdbplotter/gdbparser.py @@ -211,7 +211,7 @@ def stop(self): if self.rx_t: self.rx_t.join() - # if self.gdb_socket: + if self.gdb_socket: try: self.gdb_socket.close() except Exception as e: diff --git a/src/gdbplotter/plotter_ui.py b/src/gdbplotter/plotter_ui.py index 8ce466f..be81b2c 100644 --- a/src/gdbplotter/plotter_ui.py +++ b/src/gdbplotter/plotter_ui.py @@ -901,5 +901,6 @@ def main(): app = DebugDataUI() app.run() + if __name__ == "__main__": main()