Author Topic: Debugger not updating breakpoint position?  (Read 3355 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Debugger not updating breakpoint position?
« on: March 31, 2006, 12:32:15 am »
Dear all,
I found something which unfortunately doesn't work as expected:
Create a console application and paste the following code into:
Code
#include <vector>
int main()
{
  std::vector<int> vd2;
  vd2.push_back(4);
  vd2.push_back(5);
  vd2.push_back(6);

  return 0;
}
Now set a breakpoint to the line that contains vd2.push_back(6);. Now compile (with the "-g" switch!) and run the debugger. It'll break nicely at that point. So far so good. Now do not remove the breakpoint but modify the code to the following by adding the upper 4 lines using the lower four ones via copy&paste to:
Code
int main()
{
  std::vector<int> vd1;
  vd1.push_back(1);
  vd1.push_back(2);
  vd1.push_back(3);

  std::vector<int> vd2;
  vd2.push_back(4);
  vd2.push_back(5);
  vd2.push_back(6);

  return 0;
}
(don't forget to at least rename the upper vector). You'll see the breakpoint has moved and still points to the line with vd2.push_back(6); but a few rows downwards. Now compile again and run the debugger. You'll see it will not stop at the line with the breakpoint (the one having the "red dot" set) but at the line containing vd1.push_back(3);. It seems the breakpoint in the editor (the "red dot") is updated to the correct new line but not the debug position internally. Is it easily possible to fix this?
With best regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugger not updating breakpoint position?
« Reply #1 on: March 31, 2006, 10:59:14 am »
Fixed, thanks.
Be patient!
This bug will be fixed soon...