qemu-system-arm -M versatilepb -nographic -kernel u-boot.bin -S
-S 表示freeze CPU at startup (use 'c' to start execution)
ctrl-a c 进入qemu monitor。再执行一遍,退出qemu monitor,进入qemu console。
ctrl-a x 退出qemu
QEMU 0.14.50 monitor - type 'help' for more information
(qemu) info registers
R00=00000000 R01=00000000 R02=00000000 R03=00000000
R04=00000000 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=00000000 R14=00000000 R15=00000000
PSR=400001d3 -Z-- A svc32
(qemu) gdbserver tcp::1234
Waiting for gdb connection on device 'tcp::1234'
(qemu)
打开另一个terminal。
运行arm-linux-gdb u-boot.bin
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
0x00000000 in ?? ()
(gdb)
阅读(1268) | 评论(0) | 转发(0) |