Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
(gdb) quit
The program is running. Exit anyway? (y or n) y
14.21 Instruction Level Stepping
During instruction level stepping with nexti and stepi, HP WDB prints the assembly
instruction along with the next source line.
(gdb) stepi 0x101530:0 st4 [r9]=r34 1337 args.argc = argc;
It also prints DOC line information, which includes actual line number and the column
number, when debugging a binary with -g -O.
(gdb) stepi ;;; [8, 1] 0x4000820:1 nop.m 0x0
GDB cannot step into a function with no debug information. GDB cannot do a next over
a line when there is not debug information. However, the continue command works
in such situations.
14.22 Enhanced support for watchpoints and breakpoints
14.22.1 Deferred watchpoints
When you try to set a watchpoint in an expression, HP WDB places a deferred watch-
point if HP WDB cannot evaluate the expression. The watchpoint is automatically enabled
whenever the expression can be evaluated during the programs execution. This is
especially useful when placing the watchpoints on unallocated addresses.
14.22.2 Hardware watchpoints
HP WDB provides support for hardware watchpoints on HP-UX 11.x. through the following
commands.
set can-use-hw-watchpoints integer
Set debugger's willingness to use hardware watchpoint. If the integer value is set
to zero, then gdb does not use hardware for new watchpoints, even if the hardware
watchpoints are available. However, if there are hardware watchpoints created
before setting this to nonzero, the debugger will continue to use the hardware
watchpoints.
show can-use-hw-watchpoints
Displays if the debugger currently can use hardware watchpoint or not.
14.22.3 Hardware breakpoints
The hbreak command sets hardware assisted breakpoints.
hbreak args
The arguments (args) is same as that for the break command and the breakpoint is set
in the same way. However, the breakpoint uses hardware assisted breakpoint registers.
14.21 Instruction Level Stepping 209