CSE 2312 - Brief Guide for Using the GDB Debugger

Topics:


Starting a Debugging Session

Suppose that your source code is saved in a file called test1.s, which you have compiled into an executable called test1.bin. To start the debugger, you perform these steps:
  1. On the terminal window, execute this command (make sure you enter it as a single line, and you copy and paste exactly, including spaces):
    qemu-system-arm -s -M versatilepb -daemonize -m 128M -S -d in_asm,cpu,exec -kernel test1.bin ; gdb-multiarch
    
  2. The GDB debugger has now started. Enter the following three lines:
    set architecture arm
    target remote :1234
    symbol-file test1.elf
    


Debugging Commands


Back to the resources page.                 Back to the CSE 2312 home page.