Debugging C++ Applications Using HP WDB (766162-001, March 2014)
Example 12 Debugging using inline_bp_individual Option
(gdb) set inline-debug inline_bp_individual
(gdb) file inline_func
Reading symbols from inline_func...done.
(gdb) b ifunc
Breakpoint 1 at 0x4000ee0:0: file inline_func.C, line 18 from
/tmp/inline_func.
Breakpoint 2 at 0x4001590:1: file inline_func.C, line 18 from /tmp/inline_func.
Breakpoint 3 at 0x4001c40:1: file inline_func.C, line 18 from /tmp/inline_func.
Multiple breakpoints were set.
Use the "delete" command to delete unwanted breakpoints.
Also, you can use the following commands for debugging inline functions:
• step
• next
• list
• backtrace
• frame <n>
• info locals
• info args
• breakpoint
• info frame
Limitations of debugging inline functions
Following are the limitations of debugging inline functions.
• The inline breakpoint features are not available for programs that are compiled with +O2
optimization level and above. If inline-debug is set to inline_bp_individual or
inline_bp_all and a +O2 or more optimized executable is attached to WDB, the value
of inline-debug automatically changes to ON.
• The inline breakpoint features can deteriorate the performance of the application that is being
debugged. You can explicitly disable the breakpoint features when the features are not required
and continue to use other inline debugging features, such as step and next.
• Complete debug support for inlined subroutines is not available.
The following commands do not work if the inline-function name is passed:
Disassembly <inline_func_name>
Info functions <inline_func_name>
Info symbol <inline_func_name>
Info address <inline_func_name>
Displaying static and dynamic (Run-Time) type information
The static type of a class pointer or reference is its type as defined in the program, and thus cannot
change. The dynamic type is the type of the object being referenced, before any casts are made
to that object, which is the actual type, and thus may change during program execution. HP WDB
obtains the information about the actual object from the virtual table associated with that object.
When displaying object information for C++ class pointers or references using HP WDB, you have
the option of viewing either static type information or dynamic (run-time) type information.
Displaying static and dynamic (Run-Time) type information 21