tmux: more gentle introduction

This commit is contained in:
Ciro Santilli
2018-06-18 10:15:26 +01:00
parent 5f30493cd1
commit 0a30aa70dd
2 changed files with 30 additions and 6 deletions

View File

@@ -1300,26 +1300,37 @@ https://unix.stackexchange.com/questions/152738/how-to-split-a-new-window-and-ru
tmux just makes things even more fun by allowing us to see both terminals at once without dragging windows around! tmux just makes things even more fun by allowing us to see both terminals at once without dragging windows around!
First start `tmux` with:
....
tmux
....
Now that you are inside a shell inside tmux, run:
.... ....
./run -du ./run -du
.... ....
Gives two panes: Gives splits the terminal into two panes:
* left: usual QEMU * left: usual QEMU
* right: gdb * right: gdb
and focuses on the GDB pane. and focuses on the GDB pane.
To start again, switch back to the QEMU (`<prefix>-o`) pane, and re-run: Now you can navigate with the usual tmux shortcuts:
* switch between the two panes with: `Ctrl-B O`
* close either pane by killing its terminal with `Ctrl-D` as usual
To start again, switch back to the QEMU pane, kill the emulator, and re-run:
.... ....
./run -du ./run -du
.... ....
This automatically kills the GDB pane. This automatically clears the GDB pane, and starts a new one.
To quit for good, exit GDB, and quit the right shell with `Ctrl-D`.
Pass extra GDB arguments with: Pass extra GDB arguments with:
@@ -1327,13 +1338,25 @@ Pass extra GDB arguments with:
./run -du -U start_kernel ./run -du -U start_kernel
.... ....
See the tmux manual for further details:
....
man tmux
....
==== tmux gem5
If you are using gem5 instead of QEMU, `-u` has a different effect: it opens the gem5 terminal instead of the debugger: If you are using gem5 instead of QEMU, `-u` has a different effect: it opens the gem5 terminal instead of the debugger:
.... ....
./run -gu ./run -gu
.... ....
If you also want to use the debugger with gem5, you will need to create your own panes or windows, or to see the debugger instead of the terminal: If you also want to use the debugger with gem5, you will need to create new terminals as usual.
From inside tmux, you can do that with `Ctrl-B C` or `Ctrl-B %`.
To see the debugger by default instead of the terminal, run:
.... ....
./tmu ./rungdb;./run -dg ./tmu ./rungdb;./run -dg

1
configure vendored
View File

@@ -34,6 +34,7 @@ coreutils \
cpio \ cpio \
expect \ expect \
git \ git \
tmux \
unzip \ unzip \
vinagre \ vinagre \
wget \ wget \