* How can I read a core file?
@ 1999-01-13 5:00 Juan Carlos Fischer
1999-01-14 5:00 ` Alan Way
1999-01-18 5:00 ` Gene Homan
0 siblings, 2 replies; 3+ messages in thread
From: Juan Carlos Fischer @ 1999-01-13 5:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How can I read a core file?
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
1 sibling, 0 replies; 3+ messages in thread
From: Alan Way @ 1999-01-14 5:00 UTC (permalink / raw)
% dbx <program executable> <core>
(dbx) where
That should show you where/why a program died.
Sacs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How can I read a core file?
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
1 sibling, 0 replies; 3+ messages in thread
From: Gene Homan @ 1999-01-18 5:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-01-18 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox