Skip to content

Commit a51526c

Browse files
committed
qemu user gdb example
1 parent 7a53483 commit a51526c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.adoc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6586,12 +6586,20 @@ Anyways, this warns us that the userland emulation will likely not be reliable,
65866586
GDB step debugging is also possible with:
65876587

65886588
....
6589-
qemu-arm -g 1234 -L . bin/ls
6590-
../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gdb -ex 'target remote localhost:1234'
6589+
cd out/arm/buildroot/target
6590+
qemu-arm -g 1234 -L . ../build/kernel_module-1.0/user/myinsmod.out
6591+
../host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gdb \
6592+
--nh \
6593+
-ex 'set architecture arm' \
6594+
-ex 'set sysroot .' \
6595+
-ex 'file ../build/kernel_module-1.0/user/myinsmod.out' \
6596+
-ex 'target remote localhost:1234' \
6597+
-ex 'break main' \
6598+
-ex 'continue' \
6599+
-ex 'layout split' \
6600+
;
65916601
....
65926602

6593-
TODO: find source. Lazy now.
6594-
65956603
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:
65966604

65976605
....

0 commit comments

Comments
 (0)