Skip to content

Commit 0a30aa7

Browse files
committed
tmux: more gentle introduction
1 parent 5f30493 commit 0a30aa7

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

README.adoc

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,40 +1300,63 @@ https://unix.stackexchange.com/questions/152738/how-to-split-a-new-window-and-ru
13001300

13011301
tmux just makes things even more fun by allowing us to see both terminals at once without dragging windows around!
13021302

1303+
First start `tmux` with:
1304+
1305+
....
1306+
tmux
1307+
....
1308+
1309+
Now that you are inside a shell inside tmux, run:
1310+
13031311
....
13041312
./run -du
13051313
....
13061314

1307-
Gives two panes:
1315+
Gives splits the terminal into two panes:
13081316

13091317
* left: usual QEMU
13101318
* right: gdb
13111319

13121320
and focuses on the GDB pane.
13131321

1314-
To start again, switch back to the QEMU (`<prefix>-o`) pane, and re-run:
1322+
Now you can navigate with the usual tmux shortcuts:
1323+
1324+
* switch between the two panes with: `Ctrl-B O`
1325+
* close either pane by killing its terminal with `Ctrl-D` as usual
1326+
1327+
To start again, switch back to the QEMU pane, kill the emulator, and re-run:
13151328

13161329
....
13171330
./run -du
13181331
....
13191332

1320-
This automatically kills the GDB pane.
1321-
1322-
To quit for good, exit GDB, and quit the right shell with `Ctrl-D`.
1333+
This automatically clears the GDB pane, and starts a new one.
13231334

13241335
Pass extra GDB arguments with:
13251336

13261337
....
13271338
./run -du -U start_kernel
13281339
....
13291340

1341+
See the tmux manual for further details:
1342+
1343+
....
1344+
man tmux
1345+
....
1346+
1347+
==== tmux gem5
1348+
13301349
If you are using gem5 instead of QEMU, `-u` has a different effect: it opens the gem5 terminal instead of the debugger:
13311350

13321351
....
13331352
./run -gu
13341353
....
13351354

1336-
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:
1355+
If you also want to use the debugger with gem5, you will need to create new terminals as usual.
1356+
1357+
From inside tmux, you can do that with `Ctrl-B C` or `Ctrl-B %`.
1358+
1359+
To see the debugger by default instead of the terminal, run:
13371360

13381361
....
13391362
./tmu ./rungdb;./run -dg

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ coreutils \
3434
cpio \
3535
expect \
3636
git \
37+
tmux \
3738
unzip \
3839
vinagre \
3940
wget \

0 commit comments

Comments
 (0)