Skip to content

Latest commit

 

History

History
23 lines (22 loc) · 557 Bytes

File metadata and controls

23 lines (22 loc) · 557 Bytes

Debugger

Run code in qemu with debugger

  • Compile
    # -g: reserve debugging information.
    aarch64-linux-gnu-gcc -Wall -g -c src/main.s -o build/main.o
  • Run code in qemu
    # -s: set gdb server on 1234 port 
    # -S: freeze CPU at startup
    qemu-system-aarch64 -M raspi3b -kernel build/kernel8.img -display none -d in_asm -s -S
  • Debugger
    # use the following command in gdb-multiarch
    # load debugging information
    file kernel8.elf
    # connect to qemu
    target remote 127.0.0.1:1234