Debugging Core Files Using HP WDB (5900-1573; WDB 6.2; January 2011)

not passed up the stack, the value of the parameters are not available when you
debug the core file.
You can analyze the following lines from the assembler dump to view information
about the function parameters:
0x23fc <function_abort+8>: stw %r26,-0x64(%sr0,%sp)
0x2400 <function_abort+12>: stw %r25,-0x68(%sr0,%sp)
These lines provide information about the location of the function parameters in the
stack. This calling convention for the function parameters is defined by the PA-RISC
runtime architecture.
In the case of Itanium architecture, the arguments are normally passed through the
stacked general registers, gr32, and gr33.
For example:
r26 == arg0, r25==arg1, r24==arg2, r23==arg3
The convenience variable, $sp, stores the stack pointer in WDB. The disassembly
output for the function displays the addresses of the arguments that are relative to
the stack pointer. Hence, arg0 is stored at $sp-0x64 on the stack and arg1 is
stored at $sp-0x68.
6. Examine the contents of the required memory location.
The x command enables you to examine the contents at a specified memory location.
You can use the x command to view the contents of arg0 at $sp-0x64, and arg1
at $sp-0x68.
For example:
(gdb) x/x $sp-0x68
0x7f7e6738: 0x00000020
(gdb) x/x $sp-0x64
0x7f7e673c: 0x7f7e6688
Examples Illustrating Core File Debugging 43