Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
Species it;
union {
Tree_forms tree;
Bug_forms bug;
} form;
};
struct thing foo = {Tree, {Acorn}};
with set print union on in effect 'p foo'
would print
$1 = {it = Tree, form = {tree = Acorn,
bug = Cocoon}}
and with set print union off in effect it
would print
$1 = {it = Tree, form = {...}}
These settings are of interest when debugging C++ programs:
set print demangle, set
print demangle on
Print C++ names in their source form rather than
in the encoded (“mangled”) form passed to the
assembler and linker for type-safe linkage. The
default is on.
show print demangle Show whether C++ names are printed in mangled
or demangled form.
set print asm-demangle, set
print asm-demangle on
Print C++ names in their source form rather than
their mangled form, even in assembler code
printouts such as instruction disassemblies. The
default is off.
show print asm-demangle Show whether C++ names in assembly listings
are printed in mangled or demangled form.
set demangle-style style Choose among several encoding schemes used
by different compilers to represent C++ names.
On HP-UX, HP WDB automatically chooses the
appropriate style.
The choices for style currently supported are:
auto Allow GDB to choose a decoding style
by inspecting your program.
gnu Decode based on the GNU C++
compiler (g++) encoding algorithm.
hp Decode based on the HP ANSI C++
(aCC) encoding algorithm.
8.7 Print settings 87