Can you verify the project optimization and debugging settings ?
Go to the project properties > C/C++ Build > Settings > Tool Settings
In Optimization : set the optimization level to “None (-O0)”
In Debugging : set the debug level to “Maximum (-g3)”
Hope it is where the problem comes from.