1847172 Members
6118 Online
110263 Solutions
New Discussion

Re: Core file

 
Omololu
Occasional Contributor

Core file

Is there any other way of analysing a core file generated by an application during an issue on system. CAn Q4 analyse only core file.

How? apart from

# file core
8 REPLIES 8
Florian Heigl (new acc)
Honored Contributor

Re: Core file

First thing on my mind is adb, but I'm not very skilled with software debuggin, so either look at the man page or wait for more people to reply to see if it suits Your needs.
yesterday I stood at the edge. Today I'm one step ahead.
Steven E. Protter
Exalted Contributor

Re: Core file

No, q4 analyzes a crash dump.

adb and strings can give you a look at a core file, as can a stack trace.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
D Block 2
Respected Contributor

Re: Core file

adb command:

adb
$c

$q


-- if you are looking for a valid stack trace, then use a real debugger that is free from HP supporting C++ programs named:
WDB.

The problem using "adb" with the $c command, is that, the Stack Trace shows function names as mixed text (mangled). You can not tell a developer which exact member-function caused the core.

You might have to rebuild your executable using a -g option to see the real function-names when running WDB.

When downloading WDB, you will need two packages installed:
1) WDB (which is like GNU's gdb command), and
2) WDB-GUI (which is the Window/Gui package.)

http://www.hp.com/go/wdb
Golf is a Good Walk Spoiled, Mark Twain.
Amit Agarwal_1
Trusted Contributor

Re: Core file

You can use gdb to analyse.

$ gdb

Its a fantastic tool to analyse core files. you can use wdb wrapper to get GUI.

Kent Ostby
Honored Contributor

Re: Core file

strings is actually not that useful because it will list every possible message that is built into the program or the libraries that it is linked with.

So you will see messages from strings about libdld.sl in almost any core file, but that doesn't mean that libdld.sl has anything to do with the program dying. It just gets linked into a lot of stuff.

adb is useful at times to show the stack trace IF the program was compiled with debugging information mode.

Generally, my approach is to do the "file core" you mention and then talk to the person who wrote the program or load patches if that applies.

If it's a program you wrote, you can look at adb or gdb as possible debugging tools.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Doug Burton
Respected Contributor

Re: Core file

What made the core in the first place:
file core

To get the libs used:
what core

To debug the stinker:
gdb -c core

To debug the stinker:
gdb ProgramName -c core

Also see HP doc - KNC071499001
Muthukumar_5
Honored Contributor

Re: Core file

You can some information from what and then use debugger adb / gdb.

gdb -q
gdb> bt

You will get stack trace by this.

You can also use a simple document as,
http://geocities.com/kmuthu_gct/core_analysis.html

HTH.


Easy to suggest when don't know about the problem!
Kent Ostby
Honored Contributor

Re: Core file

Okay .. found what I was looking for:

echo \$r | adb core

This will tell you where you are in the program and dump the registers.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"