Debugging with GDB Manual HP WDB v6.3 (5900-2180, August 2012)
where, A and B are ordinary numeric expressions, perhaps in parentheses.
This is also the format in which the debugger displays a Complex value.
Imaginary values cannot be assigned to variables because there is no imaginary data type. You
can take a normal number and multiply it by an imaginary number and get another imaginary
number. You can take a normal number and add it to an imaginary number to get a complex
number.
Complex numbers cannot be used in arithmetic expressions in the debugger.
For more information of _Complex type, refer to the HP C/ANSI C documentation.
14.26.5 Support for debugging namespaces
This release of HP WDB provides full support for debugging namespaces.
You do not need to use fully qualified names to access symbols within a namespace. The debugger
can compile a list of namespaces active in the scope that you are in and, when possible, choose
an appropriate symbol.
The debugger recognizes using declarations, using directives, namespace aliases, nested
namespaces, and unqualified lookup within a namespace. It also recognizes using directives and
aliases, and using declarations within namespaces.
When the debugger has a list of possible resolutions for a given symbol, it displays a menu that
shows all names fully qualified whenever namespaces are involved. You can choose the appropriate
symbol from the list.
For example, if you stop the debugger in a function that contains an int i using directive for a
namespace such as:
using namespace A::AB::ABC::ABCD
You can use the command print i and if the only possible resolution for i is A::AB::ABC::ABCD::i
the debugger prints out the name of the symbol and its value. If, however, a global i exists, the
debugger displays a menu from which to choose:
(1) i
(2) A::AB::ABC::ABCD::i
>
Setting breakpoints on functions works in the same way.
The debugger also allows semi-qualified names. For example, if you stop in a function in namespace
B, which is nested in namespace A, and namespace A has an int i, you can use print B::i to display
the value of A::B::i.
To disable namespace support, use the command:
(gdb) set namespaces-enabled off
14.26.6 Command for evaluating the address of an expression
The watch_target command takes an expression as an argument, evaluates it to an address,
and watches the target of that address.
For example:
(gdb) watch_target current_frame
This is equivalent to executing:
(gdb) print current_frame $1 = (struct frame_info *) 0x7fdf78 (gdb) watch
*(struct frame_info *) 0x7fdf78
14.27 Viewing Wide Character Strings
HP WDB print command can print wide characters and wide-character strings of the type
wchar_t. The user must use the /W option of the print command to print wide characters and
wide-character strings.
176 HP-UX Configuration-Specific Information