Operating System - HP-UX
1752790 Members
5972 Online
108789 Solutions
New Discussion юеВ

Re: Is there any command that can analysing core file?

 
SOLVED
Go to solution
jack_8
Contributor

Is there any command that can analysing core file?

I have a programme. when i run it, i found it always core dump. I trace it and find core dumping from a library. so, i want to know some information about the enviroment before core dump. such as which method in the library cause core dumping. I use hp11 and aCC 3.25 compiler and I have no the src code of the library.
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor
Solution

Re: Is there any command that can analysing core file?

Hi:

# file core

will tell you the fault reason.

See also, this thread:

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x00016d96588ad4118fef0090279cd0f9,00.html

...JRF...
jack_8
Contributor

Re: Is there any command that can analysing core file?

thanks for your answer. your method can work. but I met anohter problem. My program use shl_load function to load a library. the core dump occured from the library. I try to use adb to debug. but when enter command $c. it tells me "can't unwind -- no_entry". I don't know how to deal with it.
Alex Glennie
Honored Contributor

Re: Is there any command that can analysing core file?

the most probable cause of the error
"can't unwind -- no_entry "

Is that the source was compiled with the default "shared libraries".

To use adb and debug a core file you must first recompile the source with -a archieve... Uh :(
Ed Hon
Regular Advisor

Re: Is there any command that can analysing core file?

I've heard that vendors often compile their source code without a symbol table to prevent reverse engineering of their code. If you try to run adb against it, it gives you the "can't unwind" error.
Andy Bennett
Valued Contributor

Re: Is there any command that can analysing core file?

While 'adb' has its uses, 'gdb'/'wdb' (available from http://www.hp.com/go/wdb) is a lot more useful since it understands threads, shared libraries and C++.

To get a stack trace using 'gdb':

$ gdb
(gdb) bt

Ed is right that a lot of programs get stripped before being released (run "file ", if it says "-not stripped" it stills has the symbols).