Since C and C++ are so closely related, many features of gdb apply to both languages. Whenever this is the case, we discuss those languages together.
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++