} 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 C++ names in their source form rather than

print demangle on

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 C++ names in their source form rather than

print asm-demangle on

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, 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.

lucid Decode based on the Lucid C++ compiler (lcc) encoding algorithm.

94 Examining Data

Page 94
Image 94
HP gnu source-level debugger 5992-4701 manual Would print, With set print union off in effect it, Default is on