|Optimize for Debug & Breakpoints [message #1778013]
||Thu, 07 December 2017 19:26
| Curt Black
Registered: November 2017
As I understand, the optimize for debug setting (-Og) should work correctly for setting breakpoints and stepping through code.|
In my setup, using -Og exhibits problems with breakpoints/line numbers. It basically acts like I am using -O3:
- Breakpoints occur a few lines below intended line
- Stepping does not function correctly (line numbers incorrect)
Have already tried:
- Clean Build. Yes, I have cleaned - even started from import project to workspace so it was a fresh new project.
- Fresh eclipse. Used a new Eclipse environment.
When switching to 'Optimize None', then everything works as expected. My colleague, who is on the same project & compiler can use optimize for debug with no impact on breakpoints/stepping.
It leads me to believe there may be some setting that is incorrect in my eclipse setup. Any ideas are welcome!
GCC 5.4 2016 Q3
Eclipse Neon (GNU MCU Eclipse 2.9-20170629-1013)
GDB: SEGGER Jlink plus - V622b
Flags: arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Og -g3 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections
Powered by FUDForum
. Page generated in 0.01747 seconds