Recently my project running in mbed studio during a debug session will break at breakpoints I haven’t set and doesn’t appear to break in main as expected. However, if I set a breakpoint in main while the code is running the debugger does break, but the point it “appears” to break at isn’t correct.
I’m using the standard debug.json profile.
Edit: And just for some further commentary, here is a screenshot of a debug session in which the debugger is clearly breaking at the correct breakpoint in main(), but the line isn’t highlighted and the GDB/pyOCD is saying it doesn’t have line number information.
What could cause GDB information to not have line number information?
And not only that, but when I enter “list main” into the debug console GDB should list about 10 lines of source code around main(). However, the attached image below shows that it’s clearly confused and printing source from some other module.