| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Some GDB commands are particularly useful with C++, and some are designed specifically for use with C++. Here is a summary:
breakpoint menusWhen you want a breakpoint in a function whose name is overloaded, GDB breakpoint menus help you specify which function definition you want. See section Breakpoint menus.
rbreak regexSetting breakpoints using regular expressions is helpful for setting breakpoints on overloaded functions that are not members of any special classes. See section Setting breakpoints.
catch throwcatch catchDebug C++ exception handling using these commands. See section Setting catchpoints.
ptype typenamePrint inheritance relationships as well as other information for type typename. See section Examining the Symbol Table.
set print demangleshow print demangleset print asm-demangleshow print asm-demangleControl whether C++ symbols display in their source form, both when displaying code as C++ source and when displaying disassemblies. See section Print settings.
set print objectshow print objectChoose whether to print derived (actual) or declared types of objects. See section Print settings.
set print vtblshow print vtblControl the format for printing virtual function tables.
See section Print settings.
(The vtbl commands do not work on programs compiled with the HP
ANSI C++ compiler (aCC).)
set overload-resolution onEnable overload resolution for C++ expression evaluation. The default is on. For overloaded functions, GDB evaluates the arguments and searches for a function whose signature matches the argument types, using the standard C++ conversion rules (see C++ expressions, for details). If it cannot find a match, it emits a message.
set overload-resolution offDisable overload resolution for C++ expression evaluation. For overloaded functions that are not class member functions, GDB chooses the first function of the specified name that it finds in the symbol table, whether or not its arguments are of the correct type. For overloaded functions that are class member functions, GDB searches for a function whose signature exactly matches the argument types.
Overloaded symbol namesYou can specify a particular definition of an overloaded symbol, using
the same notation that is used to declare such symbols in C++: type
symbol(types) rather than just symbol. You can
also use the GDB command-line word completion facilities to list the
available choices, or to finish the type list for you.
See section Command completion, for details on how to do this.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Build Daemon user on October, 25 2005 using texi2html 1.76.