Skip to content

Commit d5790bf

Browse files
committed
[tools] Allow for debugging with GDB cmd shell
1 parent baa88d2 commit d5790bf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tools/modm_tools/gdb.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ python3 -m modm_tools.gdb --elf path/to/project.elf -x modm/gdbinit --ui=tui \
5656

5757
(\* *only ARM Cortex-M targets*)
5858

59-
Currently two UIs are implemented for debugging:
59+
Currently three UIs are implemented for debugging:
6060

61+
- `--ui=cmd`: No UI, only the GDB command shell.
6162
- `--ui=tui`: Text-based UI in your shell.
6263
- `--ui=gdbgui`: Web-based UI in your browser, based on [gdbgui][].
6364

tools/modm_tools/gdb.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def _gdb_command(backend, source=None, config=None, commands=None, ui=None):
3030
if ui is None:
3131
return f"{gdb} -nx -nh -batch {args} {source}"
3232

33+
elif "cmd" in ui:
34+
return f"{gdb} {args} {source}"
35+
3336
elif "tui" in ui:
3437
return f'{gdb} -tui -ex "layout split" -ex "focus cmd" {args} -ex "refresh" {source}'
3538

0 commit comments

Comments
 (0)