HP-UX HB v13.00 Ch-11 - Software Development

HP-UX Handbook Rev 13.00 Page 55 (of 101)
Chapter 11 Software Development
October 29, 2013
-verifyall
Executes a series of tests on the file. This can be used to verify the general
structure of the file. It prints error messages if internal structures are
corrupted.
For detailed explanation of the odump(1) outputs, refer to the man page for a.out(4).
odump(1) can only be used with 32-bit PA-RISC objects. For 64-bit PA-RISC objects or IA64
objects elfdump(1) is an equivalent tool.
odump(1) and elfdump(1) belong to the linker tools.
Runtime Analysis
One of Murphy's Laws says:
A program does not what you want, it does what you write!
The tools described on this page help you to analyze the behaviour of programs and bring what
you write closer to what you want.
gdb(1)/wdb(1)
gdb(1) is the command line oriented Gnu debugger, wdb(1) is a graphical user interface, which
allows more comfortable debugging. wdb(1) will not be discussed here.
gdb(1) is free and is shipped with all HP compilers. It can also be downloaded from the HP
WDB product page [1].
The purpose of a debugger is to show what is going on in a running program, or to show the state
of an aborted program which has been saved to a core file. You can:
Start a program under control of the debugger or bring an already running process under
control by attaching to it.
Stop program execution on specified conditions or at a specified point of the program
code.
Execute program instructions step by step.
Examine and change data when the program is stopped.
Examine the data of a program that aborted with a core file.
gdb can be started as follows: