mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
run: pass Ctrl+C to GDB when using -D
This commit is contained in:
14
README.adoc
14
README.adoc
@@ -3326,11 +3326,11 @@ qemu-arm -g 1234 -L . bin/ls
|
||||
|
||||
TODO: find source. Lazy now.
|
||||
|
||||
=== Debug QEMU
|
||||
=== Debug the emulator
|
||||
|
||||
When you start interacting with QEMU hardware, it is useful to see what is going on inside of QEMU itself.
|
||||
When you start hacking QEMU or gem5, it is useful to see what is going on inside the emulator themselves.
|
||||
|
||||
This is of course trivial since QEMU is just an userland program on the host, but we make it a bit easier with:
|
||||
This is of course trivial since they are just regular userland programs on the host, but we make it a bit easier with:
|
||||
|
||||
....
|
||||
./run -D
|
||||
@@ -3349,7 +3349,13 @@ And in QEMU:
|
||||
/pci.sh
|
||||
....
|
||||
|
||||
Just make sure that you never click inside the QEMU window when doing that, otherwise you mouse gets captured forever, and the only solution I can find is to go to a TTY with `Ctrl-Alt-F1` and `kill` QEMU.
|
||||
When in <<graphic-mode,non graphic mode>>, using `-D` makes Ctrl-C not get passed to the QEMU guest anymore: it is instead captured by GDB itself, so allow breaking. So e.g. you won't be able to easily quit from a guest progra like:
|
||||
|
||||
....
|
||||
sleep 10
|
||||
....
|
||||
|
||||
In graphic mode, make sure that you never click inside the QEMU graphic while debugging, otherwise you mouse gets captured forever, and the only solution I can find is to go to a TTY with `Ctrl-Alt-F1` and `kill` QEMU.
|
||||
|
||||
You can still send key presses to QEMU however even without the mouse capture, just either click on the title bar, or alt tab to give it focus.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user