News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

GDB Skips break points

Started by Geoffles, May 23, 2008, 04:55:09 PM

Previous topic - Next topic

Geoffles

Hi there,

I seem to be having some problems while trying to debug. Although i can set break points in my different source files, GDB doesnt seem to stop on them except for my main source file. I can step through the program, but commands such as run to cursor just finish running the program and don't stop.

Is this normal GDB behaviour? Is it something I am doing or is this a code::blocks problem?

I'm using CB 8.02 with MinGW 3.4.5, and its GDB 5.2.1

Any help would be greatly appreciated, thanks :)


Pecan

http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
Debugging with Code::Blocks - CodeBlocks

Maybe the workaround for breakpoints in ctors/dtors will help.

Pecan

That GDB version should be at least 6.3.

You could just use the one suggested by the CodeBlocks install.

Geoffles

Thanks for your reply, I have updated my GDB to 6.8 now, and I have read the link you posted and I tried a little experiment.

I don't know quite what is going on, but when I first tried the debugging after updating GDB it didn't make any difference, then I tried doing a clean build, and it still didn't work. Then I tried making dummy class which then worked, even from the constructor. I then removed it and suddenly it was stopping at my break points Oo

Other thing I tried changing was explicit inclusion of all the header files my main source file, and i cant seem to replicate it not stopping at the break points any more, which is a good thing, unless it happens again :P

Thanks for your help!

Pecan

#4
Another suggestion:

Make sure that all your debugged source files are part of (included in) a CodeBlocks project so that CodeBlocks can effectively handle handing off the source files and their location to GDB.

darcwader

i had faced similar issue, but i was using a custom makefile. after i set the execution directory proper for debug target ... Project  >  Properties > build targets :: execution working dir (same as debug dir) it worked for me.