mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
qemu user gdb example
This commit is contained in:
16
README.adoc
16
README.adoc
@@ -6586,12 +6586,20 @@ Anyways, this warns us that the userland emulation will likely not be reliable,
|
||||
GDB step debugging is also possible with:
|
||||
|
||||
....
|
||||
qemu-arm -g 1234 -L . bin/ls
|
||||
../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gdb -ex 'target remote localhost:1234'
|
||||
cd out/arm/buildroot/target
|
||||
qemu-arm -g 1234 -L . ../build/kernel_module-1.0/user/myinsmod.out
|
||||
../host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gdb \
|
||||
--nh \
|
||||
-ex 'set architecture arm' \
|
||||
-ex 'set sysroot .' \
|
||||
-ex 'file ../build/kernel_module-1.0/user/myinsmod.out' \
|
||||
-ex 'target remote localhost:1234' \
|
||||
-ex 'break main' \
|
||||
-ex 'continue' \
|
||||
-ex 'layout split' \
|
||||
;
|
||||
....
|
||||
|
||||
TODO: find source. Lazy now.
|
||||
|
||||
link:https://stackoverflow.com/questions/48959349/how-to-solve-fatal-kernel-too-old-when-running-gem5-in-syscall-emulation-se-m[crosstool-ng] tests show that QEMU also has a runtime check for the kernel version which can fail as:
|
||||
|
||||
....
|
||||
|
||||
Reference in New Issue
Block a user