1829545 Members
2290 Online
109992 Solutions
New Discussion

debugging

 
shilpa_1
Occasional Contributor

debugging

How to debug a core file, not able to trace the problem using dbg/gdb debuuggers, not getting in function the program is really failing.
Help me in the same.
4 REPLIES 4
Santosh Nair_1
Honored Contributor

Re: debugging

You can do a file on the core file to find out what generated the core (assuming that you don't already know). You should also be able to do a backtrace on the core from within gdb. This shows the calls that were made when the program crashed.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
T G Manikandan
Honored Contributor

Re: debugging

You can use,
#file core
to get the source for this core file.
This output gives the source that generated the file.
For ex.
if you get
core from 'telnetd'
then
#gdb 'telnetd' core
......
gdb>where

output of shared libraries,etc.which can give you a hint.
Even you can go for a wdb,which is a GUI based debugger.
Bill McNAMARA_1
Honored Contributor

Re: debugging

you can get the wildebeest debugger (based on gdb) from
http://www.hp.com/go/languages

This will help you debug core.

The quickest way is file core

swlist -l file | grep file_rtn

to find which patch/product the file causing the core came from..

See the latest patch, see if it fixes your pb.

Later,
Bill
It works for me (tm)
Roger Baptiste
Honored Contributor

Re: debugging

shilpa,

"file" command on the core file will
give the description of its source.

Another quick and dirty option to see
what's in there in the core file is to
run a strings command on it:
strings core |more
and have a look at what can be figured out.

-R
Take it easy.