Debugging C++ Applications Using HP WDB (766162-001, March 2014)

The following <options> are available to debug inline functions:
on
Enables the inline debugging feature without the inline breakpoints options on HP Integrity
systems. This command is enabled by default.
off
Disables the inline debugging feature. For this option to be effective, you must enter this
command before attaching the debugger to the application.
inline_bp_all
Enables inline debugging feature. It also allows you to set and modify breakpoints on all
instances of a particular inline function. A single instance of the specified inline function is
displayed as a representative instance for all the instances of the specified inline function. This
creates a single-breakpoint illusion for multiple instances of the inline function. You can set
and modify breakpoints on all the instances of the inline functions by setting and modifying
breakpoints on the displayed instance of the inline function. You must enter the
inline_bp_all command before attaching the debugger to the application. Example 11
shows the procedure to debug using inline_bp_all option.
Example 11 Debugging using inline_bp_all Option
(gdb) set inline-debug inline_bp_all
(gdb) file inline_func
Reading symbols from inline_func...done.
(gdb) b ifunc
Breakpoint 1 at 0x4001290:0: file inline_func.C, line 19 from /task_new/C++WhitePaper/inline_func.
(gdb) r
Starting program: /user/C++WhitePaper/inline_func
Breakpoint 1, ifunc (x1=10) at inline_func.C:19
19 func(x1);
(gdb) bt
#0 ifunc (x1=10) at inline_func.C:19
#1 0x4001190:0 in main () at inline_func.C:10
(gdb) bt
#0 ifunc (x1=10) at inline_func.C:19
#1 0x4001190:0 in main () at inline_func.C:10
(gdb) c
Continuing.
Breakpoint 1, ifunc (x1=100) at inline_func.C:19
19 func(x1);
(gdb) bt
#0 ifunc (x1=100) at inline_func.C:19
#1 0x40011c0:0 in main () at inline_func.C:11
inline_bp_individual
Enables inline debugging feature. It also allows you to set and modify breakpoints on a specific
instance of an inline function. All instances of the inline function are displayed separately with
individual breakpoint occurrences. You can set or delete individual breakpoints on a specific
instance of an inline function without modifying the breakpoints on other instances of the inline
function. You must enter this command before attaching the debugger to the application.
Example 12 shows the procedure to debug using inline_bp_individual option.
20