Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Optimize for Debug & Breakpoints
Optimize for Debug & Breakpoints [message #1778013] Thu, 07 December 2017 19:26
Curt Black is currently offline Curt BlackFriend
Messages: 3
Registered: November 2017
Junior Member
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:

  1. Clean Build. Yes, I have cleaned - even started from import project to workspace so it was a fresh new project.
  2. 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

thank you,
Previous Topic:Argument line problems (for image processing) in Eclipse C++
Next Topic:Eclipse 3.8.2 missing crosscompiler
Goto Forum:

Current Time: Tue Mar 20 00:25:34 GMT 2018

Powered by FUDForum. Page generated in 0.01705 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software