I have encountered a problem when debugging programs that issue a bkpt instruction using a J-Trace Cortex-M. I had originally posted the bug to GNU Tools for ARM Embedded Processors (the toolchain in question), however I was informed this could be an issue in the GDB server implementation provided by SEGGER:
bugs.launchpad.net/gcc-arm-embedded/+bug/1383840
If debugging a function that issues a bkpt instruction, arm-none-eabi-gdb correctly traps and prompts the user, however execution will not continue. Stepping past the instruction and then continuing works as expected:
Display All
bugs.launchpad.net/gcc-arm-embedded/+bug/1383840
If debugging a function that issues a bkpt instruction, arm-none-eabi-gdb correctly traps and prompts the user, however execution will not continue. Stepping past the instruction and then continuing works as expected:
Source Code
- GNU gdb (GNU Tools for ARM Embedded Processors) 7.6.0.20140731-cvs
- Copyright (C) 2013 Free Software Foundation, Inc.
- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law. Type "show copying"
- and "show warranty" for details.
- This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
- For bug reporting instructions, please see:
- <http://www.gnu.org/software/gdb/bugs/>...Program received signal SIGTRAP, Trace/breakpoint trap.
- swbreak () at ...
- 14 bkpt #0
- (gdb) c
- Continuing.Program received signal SIGTRAP, Trace/breakpoint trap.
- swbreak () at ...
- 14 bkpt #0
- (gdb) c
- Continuing.(ad infinitum)Program received signal SIGTRAP, Trace/breakpoint trap.
- swbreak () at ...
- 14 bkpt #0
- (gdb) s
- 15 mov pc, lr
- (gdb) c
- Continuing.(execution continues normally)
The post was edited 2 times, last by sstallion ().