When debugging on the Macintosh with Tiger (10.4), the default version of gcc/g++ generates
code with a bug in the debug output. Apple released an updated XCode (version 2.4.1) with a
fix for this problem. The correct versions of gcc/g++/gdb are:
gcc: 4.0.1 - Apple build 5367
g++: 4.0.1 - Apple build 5367
gdb: 6.3.50 - Apple build 573 (10/20/2006)
> Xcode 2.4.1 addresses several issues in DWARF debugging and improves
> overall stability and security. It is recommended that all Xcode users
> install this update."
To download this version of XCode, see http://developer.apple.com/tools/download.
This problem is not an issue on Leopard (10.5).
The symptoms of the problem are that executables compiled with the -gdwarf flag
(the default for C/C++ application projects) have incorrect line information and
breakpoints may be ignored.