24.5.2. gem5 GDB step debug userland process

We are unable to use gdbserver because of networking as mentioned at: Section 15.3.1.3, “gem5 host to guest networking”

The alternative is to do as in GDB step debug userland processes.

Next, follow the exact same steps explained at GDB step debug userland non-init without --gdb-wait, but passing --emulator gem5 to every command as usual.

But then TODO (I’ll still go crazy one of those days): for arm, while debugging ./linux/myinsmod.out hello.ko, after then line:

23     if (argc < 3) {
24         params = "";

I press n, it just runs the program until the end, instead of stopping on the next line of execution. The module does get inserted normally.

TODO:

./run-gdb --arch arm --emulator gem5 --userland gem5-1.0/gem5/util/m5/m5 main

breaks when m5 is run on guest, but does not show the source code.