mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
tmux: more gentle introduction
This commit is contained in:
35
README.adoc
35
README.adoc
@@ -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!
|
||||
|
||||
First start `tmux` with:
|
||||
|
||||
....
|
||||
tmux
|
||||
....
|
||||
|
||||
Now that you are inside a shell inside tmux, run:
|
||||
|
||||
....
|
||||
./run -du
|
||||
....
|
||||
|
||||
Gives two panes:
|
||||
Gives splits the terminal into two panes:
|
||||
|
||||
* left: usual QEMU
|
||||
* right: gdb
|
||||
|
||||
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
|
||||
....
|
||||
|
||||
This automatically kills the GDB pane.
|
||||
|
||||
To quit for good, exit GDB, and quit the right shell with `Ctrl-D`.
|
||||
This automatically clears the GDB pane, and starts a new one.
|
||||
|
||||
Pass extra GDB arguments with:
|
||||
|
||||
@@ -1327,13 +1338,25 @@ Pass extra GDB arguments with:
|
||||
./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:
|
||||
|
||||
....
|
||||
./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
|
||||
|
||||
Reference in New Issue
Block a user