Turns out I had to use the gcc build flag '-O0' instead of '-Og' in order to disable any sort of optimization. Using '-O0' allows me to step through each line of the code.
See the issue I had opened and the solution from igrr: https://github.com/espressif/openocd-esp32/issues/79
Search found 2 matches
- Fri Jun 28, 2019 4:36 am
- Forum: ESP-IDF
- Topic: GDB skips over code
- Replies: 1
- Views: 3470
- Thu Jun 27, 2019 7:06 pm
- Forum: ESP-IDF
- Topic: GDB skips over code
- Replies: 1
- Views: 3470
GDB skips over code
I am fairly new using gdb on ESP32 and I am not sure if what I'm seeing is expected. I got debugging working fine using a JTAG and OpenOCD but when I step through the code, some lines are getting skipped. First I thought the problem is that my ELF file is not debug optimized but looking at the compi...