Hello People,
I am using Code::Blocks version:
Name : Code::Blocks
Version : svn-r13046
SDK Version : 2.23.0
When I set a breakpoint on an if statement, the code stops on a statement within the block, not on the if statement as I expect. Also, when I set a breakpoint on an assignment statement the code stops on the next non-assignment statement. It looks like the debugger will not stop on any flow control statement, but I have not fully checked this.
Did something change in the last several versions?
I prefer to have programs break on flow control statements so I can evaluate what is going to happen. More importantly, I expect the program to halt wherever I have a breakpoint, regardless of the instruction.
I have enabled debugging symbols and tried variations of optimizations. I have also set both target options as well as project options.
-Og; Optimize debugging executable (compile speed, execution speed and better debugging)
-g; Produce debugging symbols
-O1; Linker output optimization (level 1)
Always breaks on statement below with '--->'.
Never stops on if statement, the line in the if block.
Never stops on the DevicesCount assignment statement.
if (oDevices.find(0) != oDevices.end()) {
CmdRez = oDevices.at(0);
}
if (oDevices.size() > 1)
{
std::map<uint8_t, std::map<uint16_t, std::vector<uint8_t>>>::const_iterator ItorDevices;
std::map<uint16_t, std::vector<uint8_t>> oADevice;
std::map<uint16_t, std::vector<uint8_t>> TempMap;
std::vector<uint8_t> DevicesVector;
uint8_t DeviceCount = 0;
// ADC_LibUSBDevices
---> ResultVector.push_back(((ADC_LibUSBDevices >> 8) & 0xFF));
While researching another issue I thought I saw a post about current versions of Code::Blocks no longer stopping on flow control. However, I was not able to locate whatever it was I saw.
What else can I try? I want to have the program break on flow control and assignment statements.
=thoth=