socat -d -d pty ptywhich prints out which pty to connect Qemu's virtual serial port to, for instance /dev/pts/1, and the other pty, for instance /dev/pty/6, to which one may for instance attach a GNU Screen
screen /dev/pty/6Now run Qemu
QEMU_AUDIO_DRV=none qemu-system-arm \
-cpu cortex-a15 -machine vexpress-a15 \
-kernel /tmp/vmlinuz-3.10 -append "earlyprintk console=tty1 console=ttyAMA0" \
-nographic \
-gdb tcp:localhost:1234 -S -serial /dev/pts/1
which tells Qemu to start a gdb-server at port 1234 and wait (-S) until a gdb server attaches.
Make sure to have a gdb configured for arm targets, compiled with
./configure --target=arm-linux-gnueabiand run it. Connect to the qemu gdb-server with
make
target remote :1234To see the machine code, type
C-x ato enable the terminal interface that shows code cursor, and enable asm with
layout asm
Inga kommentarer:
Skicka en kommentar