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

(gdb) x/s *($glob+0x8)
0x0: Error accessing memory address 0x0: Invalid argument.
This indicates that the variable is a null pointer.
5. To display the string value pointed to by $glob+0xC, enter the following command
at the gdb prompt:
(gdb) x/s *($glob+0xC)
0x7f7e62f9: "/opt/softbench/bin:/usr/bin:/opt/user/bin:
/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/net/bin:
/opt/fc/bin:/opt/fcms/bin:/opt/upgrade/bin:/opt/pd/bin:/usr/bin/X11:
/usr/contrib/bin/X11:/o"...
6. To display the int value at $glob+0x10 in hexadecimal format, enter the following
command at the gdb prompt:
gdb) x/x $glob+0x10
0x40001190 <global_vars+16>: 0x0001b669
7. To display the int value at $glob+0x10 in decimal format, enter the following
command:
((gdb) x/d $glob+0x10
0x40001190 <global_vars+16>: 112233
Examples Illustrating Core File Debugging 49