# Linux Kernel Module Cheat
The perfect emulation setup to study and develop the <<linux-kernel>> v5.9.2, kernel modules, <<qemu-buildroot-setup,QEMU>>, <<gem5-buildroot-setup,gem5>> and x86_64, ARMv7 and ARMv8 <<userland-assembly,userland>> and <<baremetal-setup,baremetal>> assembly, <<c,ANSI C>>, <<cpp,C++>> and <<posix,POSIX>>. <<gdb>> and <<kgdb>> just work. Powered by <<about-the-qemu-buildroot-setup,Buildroot>> and <<about-the-baremetal-setup,crosstool-NG>>. Highly automated. Thoroughly documented. Automated <<test-this-repo,tests>>.

#### 3.6.3. GDB step debug userland non-init

Non-init process:

- Shell 1:

      ./run --gdb-wait

- Shell 2:

      ./run-gdb --userland userland/linux/rand_check.c main

- Shell 1 after the boot finishes:

      ./linux/rand_check.out

This is the least reliable setup as there might be other processes that use the given virtual address.

- GDB step debug userland non-init without --gdb-wait