Debugging Core Files Using HP WDB

FAQ
1 Are shared memory segments dumped in the core file by default?
No.
However, the shared memory segments can be dumped into the core file if you set the following
kernel symbols:
core_addshmem_read
This kernel symbol controls if shared memory segments that are mapped read-only into
a process are dumped in a core file. To view the current value of the tunable and change
it , enter the following commands:
# echo 'core_addshmem_read/X'|adb -k /stand/vmunix /dev/kmem
core_addpid:
core_addpid: 0
# echo 'core_addshmem_read/W 1'|adb -k -w /stand/vmunix /dev/kmem
core_addpid: 0 = 1
core_addshmem_write
This kernel symbol controls if shared memory segments that are mapped read/write into
a process are dumped in a core file. To view the current value of the tunable and change
it , enter the following commands:
# echo 'core_addshmem_write/X'|adb -k /stand/vmunix /dev/kmem
core_addpid:
core_addpid: 0
# echo 'core_addshmem_write/W 1'|adb -k -w /stand/vmunix /dev/kmem
core_addpid: 0 = 1
NOTE:
HP does not provide complete support for these kernel symbols.
The large size of the shared memory segments must be taken into account before using
these kernel symbols.
2 How do I check if the system is enabled for creating core files with sizes greater than 2 GB?
How do I enable the system for creating core files with sizes greater than 2 GB?
To check if the system is enabled for creating core files with sizes greater than 2 GB, enter the
following command:
fsadm <filesystem>
If this command displays largefiles”, the system is enabled for creating core files greater
than 2 GB.
To enable a system for creating core files greater than 2 GB, enter the following command:
fsadm -o largefiles <filesystem>
3 How do I verify if a core file is truncated?
To verify if a core file is truncated, enter the following command:
elfdump -o -S core
If the core file is not truncated or corrupted, the output of the elfdump -o -S core is as
follows:
core:
*** Program Header ***
Type Offset Vaddr FSize Memsz
CoreVer 0000000000003028 0000000000000000 0000000000000004 0000000000000004
CoreKern 000000000000302c 0000000000000000 000000000000003c 000000000000003c
CoreComm 0000000000003068 0000000000000000 000000000000000a 000000000000000a
CoreProc 0000000000003078 0000000000000000 000000000000be00 000000000000be00
CoreLoad 000000000000ee78 6000000000000000 0000000005160000 0000000005160000
CoreMMF 000000000516ee78 9fffffffdd6f4000 0000000000004000 0000000000004000
FAQ 47