Debugging with GDB Manual HP WDB v6.3 (5900-2180, August 2012)

For generating a side debug file which is contained in ELF32 image, use the linker option
+dbgfile side_file_name, where, the side_file_name is the file name of the side debug
file. For generating a side debug file which is in ELF64 binary, use the linker option
+dbgfile-large side_file_name. You can use this option even when the actual
executable is in ELF32 container.
Invoke gdb on the executable to start debugging the application. The debugger will read in
the debug information automatically from the side file generated by linker. By default, the
debugger searches for the debug file in the following locations:
The directory where the executable resides, say /tmp/executable_dir/
If the debug file is not found where the executable resides, the debugger searches the
directory /tmp/executable_dir/.debug
You can specify the directory where the side file is kept using the environment variable
GDB_DEBUG_ABSPATH. For example, if the side file is kept at /tmp, then specify the side file
path to debugger by doing an export GDB_DEBUG_ABSPATH=/tmp.
NOTE: This feature of debugging with debug information available in the side debug file is
currently supported only on HP Integrity systems.
14.17 Printing the Execution Path Entries for the Current Frame or Thread
HP WDB 5.7 and later versions of the debugger enable you to print the execution path entries in
the current frame, or the current thread for programs running on Integrity systems. This feature
enables the display of the execution path taken across branched modules. The first instruction in
each block associated with the executed branch is displayed.
This feature is supported only for compiler versions A.06.15 and later.
HP WDB supports the following commands to print the execution path entries in the current frame,
or in the current thread:
info exec-path [start_index] [end_index] (aliased to info ep)
Lists all the local execution path entries in the current frame. The [start_index] and
[end_index] indicate the range of table indexes (execution path entries) that must be
displayed.
If [end_index] is not specified, the debugger displays the complete table of execution path
entries, starting from [start_index].
If [start_index] and [end_index] are not specified, the complete table of execution
path entries is displayed.
For example,
(gdb) i ep 4 10
info exec-path summary
Prints the summary information about all the local execution path entries in the current frame.
This command displays the total number of branches for the frame, the number of branches
executed in this frame in the last iteration, and the last executed branch number.
info global-exec-path [start_index] [end_index](aliased to info gep)
Lists all the global execution path entries for the current thread.
The [start_index] and [end_index] indicate the range of table indexes (execution
path entries) that must be displayed.
If [end_index] is not specified, the debugger displays the complete table of execution path
entries, starting from [start_index].
14.17 Printing the Execution Path Entries for the Current Frame or Thread 161