Debugging Core Files Using HP WDB (5900-1573; WDB 6.2; January 2011)
(gdb) x/x 0x7f7e6688
0x7f7e6688: 0x00000011
◦ To display the char* value at the last field in the structure, enter the
following command at the gdb prompt:
(gdb) x/x 0x7f7e6688+0x10
0x7f7e6698: 0x40001120
To display the char value at this address, enter the following command at
the gdb prompt:
(gdb) x/s 0x40001120
0x40001120 <__d_trap_fptr+260>: "The meaning"
◦ To display the address of the st_two structure, enter the following command
at the gdb prompt:
(gdb) x/x 0x7f7e6688+0x8
0x7f7e6690: 0x7f7e669c
Similarly, the offsets for the following structure st_two are calculated:
struct st_two {
char *a; +0x0
int b; +0x4
float c; +0x8
char *d; +0xC
};
Examples Illustrating Core File Debugging 45