Debugging with GDB (September 2007)

Chapter 14: HP-UX Configuration-Specific Information 169
(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
numb e r, 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.19 Enhance d support for watchpoints and breakpoints
14.19.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 watchp oints on unallocated addresses.
14.19.2 Hardware watchpoints
HP WDB provides supp ort for hardware watchpoints on HP-UX 11.x.
14.19.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.
There are only two hardware breakpoints that can be set on Integrity systems. This
is useful in ROM code debugging and shared library debugging for libraries, including
dld, that are not loaded private.
The normal breakpoints are converted to a hardware breakpoint when WDB cannot
set a normal breakpoint in the shared library.
14.19.3.1 Setting breakpoints in unstripped shared library
GDB will not be able to put breakpoints using symbolic names(of the symbols not in
export list) or line numb ers in the stripped modules.
GDB w ill be able to place breakpoints using symbol names in the unstripped shared
libraries loaded into the stripped executable.
14.19.4 Support for procedural breakpoints
HP WDB enables you to set breakpoints at the beginning (first executable line) of every
function that can be debugged. In addition, you can specify a set of commands to be