Operating System - HP-UX
1835576 Members
2335 Online
110079 Solutions
New Discussion

Re: # /usr/bin/file /var/opt/OV/tmp/core # does not show who dumped core

 
SOLVED
Go to solution
Christian Deutsch_1
Esteemed Contributor

# /usr/bin/file /var/opt/OV/tmp/core # does not show who dumped core

Hi folks,

On HP-UX 11.23, the file command does not show who dumped core:

# /usr/bin/file /var/opt/OV/tmp/core
/var/opt/OV/tmp/core: ELF-32 core file - IA64

on all other Un*x platforms (including HP-UX on PA-RISC) the file command shows me who dumped core

Is there another command or utility that does this job better?


Thanks! Christian
Yeshua loves you!
4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: # /usr/bin/file /var/opt/OV/tmp/core # does not show who dumped core

>the file command does not show who dumped core:

file(1) normally works. This core file could be corrupted or truncated (by ulimit -c?).

You could try elfdump:
$ elfdump -S -o core

The proper command is a debugger, gdb. You can download it from:
http://www.hp.com/go/wdb
TTr
Honored Contributor

Re: # /usr/bin/file /var/opt/OV/tmp/core # does not show who dumped core

The fact that this core file is shown as "ELF-32 core" I am guessing it came from a 32-bit binary and possibly the file command can not find the additional core information. Try a "strings core" and look at the output in case you find additional information.
Christian Deutsch_1
Esteemed Contributor

Re: # /usr/bin/file /var/opt/OV/tmp/core # does not show who dumped core

Thanks Dennis and TTr for your helpful responses.

Another suspicion might be that the process dumped core in such a way that file can not find a process name and gdb doesn't like the corefile:

gdb /var/opt/OV/tmp/core
HP gdb 5.4.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.4.0 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
.."/var/opt/OV/tmp/core": not in executable format: File format not recognized

In case someone has helpful comments on this that would be nice but I guess it's not very likely.

Christian
Yeshua loves you!
Dennis Handly
Acclaimed Contributor
Solution

Re: # /usr/bin/file /var/opt/OV/tmp/core # does not show who dumped core

>Another suspicion might be that the process dumped core in such a way that file can not find a process name

Yes, that's why I mentioned elfdump command above, it would tell you that. It's /usr/ccs/bin/elfdump.

>gdb doesn't like the corefile:
gdb /var/opt/OV/tmp/core
HP gdb 5.4.0

You should always be using the latest wdb, now 5.7.

>"/var/opt/OV/tmp/core": not in executable format: File format not recognized

Oops, you need to tell gdb you have a core file and no executable:
gdb -c core