Author Topic: Debugger ignores breakpoints in some projects  (Read 4536 times)

Offline Jumer

  • Single posting newcomer
  • *
  • Posts: 2
Debugger ignores breakpoints in some projects
« on: July 21, 2014, 01:53:50 am »
I'm using Code::Blocks 13.12 (with compiler and debugger that it included in the download). I'm not sure if it is an issue of Code::Blocks itself or the debugger so I'm sorry if it's not.

When I try to debug certain project it completely ignores breakpoints.If I change the code to a more simple one it still does. But if I create a new project, the problem dissapear until I add the same files that are in the first project, when start to fail again. Build option tags are set correctly (-g checked and -s unchecked for debugger). It seems like it's definitely a code problem, because it doesn't work in other computers.

Any idea of what could be the issue?

Full debug log: http://pastebin.com/hPLfkWMi

It seems similar to this post http://forums.codeblocks.org/index.php/topic,19378.0.html posted few days ago, but I have gdb 7.5.

Thanks in advance.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Debugger ignores breakpoints in some projects
« Reply #1 on: July 21, 2014, 02:25:57 am »
Can you try to put the project in some directory which don't have spaces and non-ascii characters? This cause GDB not correctly recognize the path.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jumer

  • Single posting newcomer
  • *
  • Posts: 2
Re: Debugger ignores breakpoints in some projects
« Reply #2 on: July 21, 2014, 03:47:59 am »
That was exactly the point! Thank you so much. :D