gdb
to debug the kernel in the emulator:
Configure the kernel by hand to include debugging symbols:
cd kernel
make menuconfig
Select Kernel hacking or whatever it is called and select the item which says to compile the kernel with debugging info.
make
cd ..
When starting the emulator use sth. like: (but change the openbsd refs to linux)
out/host/openbsd-x86_64/bin/emulator -show-kernel -system out/target/product/generic -kernel kernel/arch/arm/boot/zImage -logcat *:v -qemu -monitor telnet::4444,server -s
then it will sit waiting for you to prepare your gdb session:
prebuilt/openbsd-x86_64/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gdb kernel/vmlinux
(gdb) br sys_execve (or some other place you want to gain control)
(gdb) target remote localhost:1234
and then, in another window, release qemu by attaching to its monitor:
telnet localhost 4444
(qemu) cont
maintained SGY instructions and kernel report
Ynterstellar Yphone assemblY on Youngdroid YdeologY
|