24.5.1. gem5 GDB step debug kernel

Analogous to QEMU, on the first shell:

./run --arch arm --emulator gem5 --gdb-wait

On the second shell:

./run-gdb --arch arm --emulator gem5

On a third shell:

./gem5-shell

When you want to break, just do a Ctrl-C on GDB shell, and then continue.

And we now see the boot messages, and then get a shell. Now try the ./count.sh procedure described for QEMU at: Section 3.2, “GDB step debug kernel post-boot”.