How to single step ARM assembly in GDB on QEMU?

前端 未结 4 1747
死守一世寂寞
死守一世寂寞 2020-11-30 11:47

I\'m trying to learn about ARM assembler programming using the GNU assembler. I\'ve setup my PC with QEmu and have a Debian ARM-HF chroot environment.

If I assemble

4条回答
  •  死守一世寂寞
    2020-11-30 12:05

    You should add the -g option too to the assembling. Otherwise the codeline info is not included. That crash probably comes from running some garbage after the code lines. Maybe you should add the exit system call:

    mov eax, 1 ; exit
    mov ebx, 0 ; returm value
    int 0x80 ; system call
    

提交回复
热议问题