@@ -1300,40 +1300,63 @@ https://unix.stackexchange.com/questions/152738/how-to-split-a-new-window-and-ru
1300
1300
1301
1301
tmux just makes things even more fun by allowing us to see both terminals at once without dragging windows around!
1302
1302
1303
+ First start `tmux` with:
1304
+
1305
+ ....
1306
+ tmux
1307
+ ....
1308
+
1309
+ Now that you are inside a shell inside tmux, run:
1310
+
1303
1311
....
1304
1312
./run -du
1305
1313
....
1306
1314
1307
- Gives two panes:
1315
+ Gives splits the terminal into two panes:
1308
1316
1309
1317
* left: usual QEMU
1310
1318
* right: gdb
1311
1319
1312
1320
and focuses on the GDB pane.
1313
1321
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:
1315
1328
1316
1329
....
1317
1330
./run -du
1318
1331
....
1319
1332
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.
1323
1334
1324
1335
Pass extra GDB arguments with:
1325
1336
1326
1337
....
1327
1338
./run -du -U start_kernel
1328
1339
....
1329
1340
1341
+ See the tmux manual for further details:
1342
+
1343
+ ....
1344
+ man tmux
1345
+ ....
1346
+
1347
+ ==== tmux gem5
1348
+
1330
1349
If you are using gem5 instead of QEMU, `-u` has a different effect: it opens the gem5 terminal instead of the debugger:
1331
1350
1332
1351
....
1333
1352
./run -gu
1334
1353
....
1335
1354
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:
1337
1360
1338
1361
....
1339
1362
./tmu ./rungdb;./run -dg
0 commit comments