I have a C application running on embedded ARM M4; it works correctly.
I use Kinetis Design Studio, which uses gdb
, as my debugger on Windows.
For most of my .obj
, I can single-step the C source. However, for a few files, although I can use breakpoints, single-stepping the C source doesn't work: pressing Single-step
causes debugger to act as if I pressed Run
but the app is definitely not running.
But single-stepping the assembly, same .obj
files, works correctly.
I use the same compile options for all .c
-x c -Wall -Werror -std=c99 -nostdlib -mthumb -mtune=cortex-m4 -mlittle-endian -Wdouble-promotion -DNDEBUG -fdata-sections -ffunction-sections -c -save-temps=obj -g3 -gdwarf-2
QUESTION
For some .obj
, why do the breakpoints and assembly single-step work but not the source single-step?