Assembler stepping in THUMB mode with GDB / J-Link GDBServer

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Assembler stepping in THUMB mode with GDB / J-Link GDBServer

    Hi,

    I am trying to single asm step through ARM7TDMI code compiled for THUMB. I am using the yagarto toolchain with GDB / Insight 6.8.

    Unfortunately GDB/GDBServer think the code is ARM and is disassembling incorrectly, if i objdump the elf file it uses the ELF headers to do correct THUMB disassembly.

    Does anyone know the 'monitor xx' command to switch to THUMB mode ? neither the supplied GDBServer documentation or the J-Link ARM documentation describe how to this.
  • I will correct myself, ARM / THUMB is correctly disassembled when normal code is compiled with -ggdb. I was stepping though the inital asm startup code crt0.s which did not have the required debug sections to tell GDB/J-LINK what instruction set it was using.