Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read a core file from a script...

Status
Not open for further replies.

misercord

Technical User
Feb 11, 2002
32
US
I have a shell script that is over 6034 lines long and it is coring. Is there any way to read the core so I can narrow down where the error is occuring? Can I rebould the ksh in debug?

Example form gdb of core file....

Core was generated by `/bin/ksh /usr/local/tools/scripts/UnixBuildScript'.
Program terminated with signal 11, Segmentation fault.
#0 0x08049f8d in ?? ()
(gdb) where
#0 0x08049f8d in ?? ()
#1 0x0814106a in ?? ()
#2 0x0823a498 in ?? ()
#3 0xbffeafa8 in ?? ()
#4 0x08067aa4 in ?? ()
 
You can turn on debugging by using the option:

#!/bin/csh -v Verbose Mode: Display commands being executed befoer shell interpretation

#!/bin/csh -x Display command being executed after shell intrepretation
 
I have tried ksh -v but this put out a massive amount of data that as yet is less than helpful in the problem. So what I really would like to do is be able to read the core file. I wanted to know if anyone know how to read the core file for the kron shell or has compiled the pd ksh in debug.
 
For ksh, try the -x option.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top