Operating System - HP-UX
1834991 Members
2240 Online
110073 Solutions
New Discussion

How can I analyze a core file ?

 
Preet Dhillon
Advisor

How can I analyze a core file ?

Dear Colleagues,

One of my applications on HP-UX 10.20 is crashing with a core dump and I'd like to find out why.

Are there any tools I can use to analyze the contents of a core file and identify what caused the program to fail? I've heard of dbx, is this downloadable from somewhere ?

Many thanks and regards,
Preet
Nothing succeeds like excess
8 REPLIES 8
Clemens van Everdingen
Honored Contributor

Re: How can I analyze a core file ?

Hi.

Do the following:

file core

Or check follwoing threads:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x037937f45ef7d4118fef0090279cd0f9,00.html

C.



The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Paula J Frazer-Campbell
Honored Contributor

Re: How can I analyze a core file ?

Hi

Down load and install wdb:-

http://hp.com/go/wdb

fire up /opt/langtools/bin/gdb -c
"bt" will give a stack trace:-

(gdb) bt
#0 0xc01ecb88 in ??
#1 0xc01ecb68 in ?? ()
#2 0xc01ecb68 in ?? ()

or use "where"

There are two stored registers that will tell you the address being
accessed
and instruction the process was executing when it failed. In gdb or at
the
"(gdb)" command prompt in wdb, try:

(gdb) p /x $ior

This prints the "Interrupt Offset Register" that is the address the
program
was trying to access when it failed.

(gdb) p /x $iir

This is the "Interrupt Instruction Register" that shows the machine
instruction that caused the failure. To decode this start up a separate "adb" (adb) should already be installed ??? note it has no prompt and the $ prefixes each command - $q = quit) session and enter the value from the above command and follow it
with "=i". For example,

(gdb) p /x $iir
$2 = 0xfe01280

$ adb
0xfe01280=i
LDW 254,0(r31)
This is a Load word command being executed. See instructions set for PA Risc.

HTH

Paula




If you can spell SysAdmin then you is one - anon
steven Burgess_2
Honored Contributor

Re: How can I analyze a core file ?

Hi Preet

Once you have downloaded the software

Have a look at the attached
take your time and think things through
steven Burgess_2
Honored Contributor

Re: How can I analyze a core file ?

Hi Preet

Once you have downloaded the software

Have a look at the attached
take your time and think things through
Bill McNAMARA_1
Honored Contributor

Re: How can I analyze a core file ?

what core
file core
strings core

for quick and dirty analysis.

To really find out whats the story you'll quickly need source code for the application and the WDB debugger from the hp.com/go/developers site.

You should perhaps search the patch archive and get your system a little up to date, just in case it's an OS lib problem or something like that.

Later,
Bill
It works for me (tm)
pap
Respected Contributor

Re: How can I analyze a core file ?

you can analyse core file through Q4 software from HP.
You can download the latest available patches for Q4 and it will give you the report.

Thanks,
-pap
"Winners don't do different things , they do things differently"
Alex Glennie
Honored Contributor

Re: How can I analyze a core file ?

You'll find the following url of use ....

http://devresource.hp.com/devresource/Tools/wdb/doc/guide/index.html

fyi gdb is what lies beneath wdb but without the nice gui interface.
MANOJ SRIVASTAVA
Honored Contributor

Re: How can I analyze a core file ?

Hi Preet

Essentially do a strings core | more to get a feel about the error , in the inital lines you would get the error type and the possible reason , howeever to analyse it full you need to have some other utilities , I use to analyse system crash dumps using q4 tool . May be this site site has somethignfor you

http://docs.hp.com/cgi-bin/otsearch/getfile?id=/hpux/onlinedocs/os/syscrash.html&searchterms=DO%7cI%7cUSE%7cQ4%7cHOW&queryid=20020418-092122

Manoj Srivastava