Debugging with GDB (September 2007)
74 Debugging with GDB
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.
arm Decode using the algorithm in the C++ Annotated Reference Man-
ual. Warning: this setting alone is not sufficient to allow debug-
ging cfront generated executables. GDB would require further
enhancement to permit that.
If you omit style, you will see a list of possible formats.
show demangle-style
Display the encoding style currently in use for decoding C++ symbols.
set print object
set print object on
When displaying a pointer to an object, identify the actual (derived) type of
the object rather than the declared type, using the virtual function table.
set print object off
Display only the declared type of objects, without reference to the virtual func-
tion table. This is the default setting.
show print object
Show whether actual, or declared, object types are displayed.
set print static-members
set print static-members on
Print static members when displaying a C++ objec t. The default is on.
set print static-members off
Do not print static memb ers w hen displaying a C++ object.
show print static-members
Show whether C++ static members are printed, or not.
set print vtbl
set print vtbl on
Pretty print C++ virtual function tables. The default is off. (The vtbl com-
mands do not work on programs compiled with the HP ANSI C++ compiler
(aCC).)
set print vtbl off
Do not pretty print C++ virtual function tables.
show print vtbl
Show whether C++ virtual function tables are pretty printed, or not.
8.8 Value history
Values printed by the print command are saved in the GDB value history. This allows
you to refer to them in other expressions. Values are kept until the symbol table is re-read