From a51526c60002229ffeb15e14c490bae8a7924c6b Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Fri, 13 Jul 2018 17:25:03 +0100 Subject: [PATCH] qemu user gdb example --- README.adoc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.adoc b/README.adoc index c09472b..6892b54 100644 --- a/README.adoc +++ b/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: ....