run: create --tmux-program gdb to open gem5 GDB

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-05 00:00:00 +00:00
parent 7dedb18580
commit 776ec896f2
2 changed files with 37 additions and 7 deletions

View File

@@ -1426,13 +1426,25 @@ Bibliography: https://unix.stackexchange.com/questions/152738/how-to-split-a-new
==== tmux gem5
If you are using gem5 instead of QEMU, `--tmux` has a different effect: it opens the gem5 terminal instead of the debugger:
If you are using gem5 instead of QEMU, `--tmux` has a different effect by default: it opens the gem5 terminal instead of the debugger:
....
./run --emulator gem5 --tmux
....
If you also want to use the debugger with gem5, you will need to create new terminals as usual.
To open a new pane with GDB instead of the terminal, use:
....
./run --emulator gem5 --gdb-wait --tmux --tmux-program gdb
....
`--tmux-program` implies `--tmux`, so we can just write:
....
./run --emulator gem5 --gdb-wait --tmux-program gdb
....
If you also want to see both GDB and the terminal with gem5, then you will need to open a separate shell manuall as usual with `./gem5-shell`.
From inside tmux, you can do that with `Ctrl-B C` or `Ctrl-B %`.