15.4.1 C and C++
The C++ debugging facilities are jointly implemented by the C++
compiler and gdb. Therefore, to debug your C++ code
effectively, you must compile your C++ programs with a supported
C++ compiler, such as gnu
g++, or the HP ANSI C++
For best results when using gnu C++, use the DWARF 2 debugging
format; if it doesn't work on your system, try the stabs+ debugging
format. You can select those formats explicitly with the
command-line options -gdwarf-2 and -gstabs+.
See Options for Debugging Your Program or GCC (Using the gnu Compiler Collection (GCC)).