Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: "Gene Homan" <homang@pcisys.net>
Subject: Re: How can I read a core file?
Date: 1999/01/18	[thread overview]
Message-ID: <7813g3$4ja$1@newman.pcisys.net> (raw)
In-Reply-To: 36a5da49.188006877@news.newsguy.com

There's no easy way to simply read what you need from a core that I know of
guy.  However, you can get some information from the core if it is indeed a
valid dump (usually smaller cores are bogus with no useful information).

To get some information, do the following:

1. Start a script - # script /tmp/myscript.
    You should see a message with something like "Script started"

2. Do the following command to see what executable produced the core (you
must be in
    the directory where the core was deposited or feed the full path to
where it is) -
    # file core
    You should see a "by someexecname" in the output that will tell you what
executable
    had the problem.

3.  Ok, say the executable that produced the core was /usr/bin/myprog.  What
you need
     to do next is use a debugger to pull a stack trace from the core.  Now,
I'm an old
     HP and Solaris guy myself so I'm not sure which debugger(s) come by
default with
     Digital Unix, but it should be ADB,DBX or something along those lines.
You will
     need to find out which one you have and learn the commands it uses.
However, for
     ADB the operation would go something like this (still in the directory
with the core):

     # adb /usr/bin/myprog core
        $C
        ^D

     If all goes well, this should produce a few lines of jibberish that
will be saved to the
     script you started at the beginning of all of this.

4. Next, simply end your script -
    # exit
    "Script ended"

Then, in the /tmp/myscript output you should have a relavent stack trace.
Now all of this was the easy part.  To actually determined what caused the
failure requires skills in reading that stack and pinpointing the error.
This is the part where I usually contact the coder, the vendor or their
associated support personnel.

Hope this helps.

Later,
Gene....


Juan Carlos Fischer wrote in message
<36a5da49.188006877@news.newsguy.com>...
>Hello!
>
>Can someone tell me please the easyest way to see a core dump file in order
>to determine why a program failed.
>
>TIA and regards
>
>-jcf





      parent reply	other threads:[~1999-01-18  5:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-13  5:00 How can I read a core file? Juan Carlos Fischer
1999-01-14  5:00 ` Alan Way
1999-01-18  5:00 ` Gene Homan [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox