1829924 Members
2643 Online
109997 Solutions
New Discussion

Core files

 
William Bogdanowich
New Member

Core files

Help I'm going crazy. I need to learn how to decipher core files I just got our IT people to install WDB and now I have to learn how to use it.


GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.

No executable file now.
No symbol file now.
warning: Unknown symbols for '/vobs/PTC/POS/LOCATION_MANAGER/core'; use the 'symbol-file' command.
Core was generated by `POS_LOCATION_M'.
Program terminated with signal 6, Aborted.
#0 0xc01f49b0 in ()
Source directories searched: $cdir:$cwd
Source directories searched: /vobs/PTC/POS/LOCATION_MANAGER:$cdir:$cwd
(gdb) symbol-file POS_LOCATION_MANAGER.HP_UX11
Reading symbols from POS_LOCATION_MANAGER.HP_UX11...done.


Then I select "Call Stack" and get:

warning: GDB cannot print complete stack trace since some shared libraries are missing.
Set GDB_SHLIB_PATH and try again.
Invalid
#1 0xc020111c in ()


At the WDB command line I typed below and got the error

(gdb) GDB_SHLIB_PATH=/usr/lib
Undefined command: "GDB". Try "help".

How do you set the path and I'm I selecting the correct path for HP-UX
I running

HP-UX normal B.11.00 U 9000/785 2000052961 unlimited-user license
11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: Core files

export SDB_SHLIB_PATH=/usr/bin
export SHLIB_PATH=/usr/bin

That will work with posix and korn.

Use the two line format (set, export) for other shells like bourne.

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
William Bogdanowich
New Member

Re: Core files

Iâ m trying to use WDB â HP â UX Debugger to read cord files when I uses
export SDB_SHLIB_PATH=/user/bin
export SHLIB_PATH=/usr/bin
on the WDB command line I get
Undefined command: exportâ

Is there a typo should SDB be GDB still get error

Iâ m using HP WDB-GUI Reference Manual and the Debug with GDB HP eleventh Edition as reference. There a little help,
Pete Randall
Outstanding Contributor

Re: Core files

Apparently it can't find the export command itself. What shell are you running? Try typing "whence export".


Pete

Pete
William Bogdanowich
New Member

Re: Core files

I'm using c shell and which did not find the export command, but are we going down the wrong bunny trail. I want to get WDB to read my core files and find the system libraries
Dave Hutton
Honored Contributor

Re: Core files

You need to use
setenv GDB_SHILIB_PATH /usr/lib

for c shell
Victor Pavon
Advisor

Re: Core files

William:
You're trying to execute export in the gdb command prompt.
Exit gdb, at the OS prompt type
# export SDB_SHLIB_PATH=/user/bin
# export SHLIB_PATH=/usr/bin
Find the name of the process that generated the core file by typing:
# file /core
The command will return something like:
: core file from 'NAME OF PROCCESS' - received SIGSEGV

and reenter the WDB shell (gdb) by typing:
# gdb /core
If all goes well gdb will analyze the core structure and display pertinent app errors.
Note:
You may need to cd to the bin directory (where the app reside) and run gdb from there to get a full output from the debugger.
Enjoy,
Victor
B. Hulst
Trusted Contributor

Re: Core files

Hi,

Basically what you want to know is the error situation of the reason for the core dump.

Very often it also helps to use:

strings core | more
or
strings core > core_output.log

Then you get only the readable core information
and then search for error...

Bob :)
ranganath ramachandra
Esteemed Contributor

Re: Core files

in my opinion, one should not (advise anyone to) look at the strings in a core file. if you dont know what a core file is, this will only confuse you a lot more.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Amit Agarwal_1
Trusted Contributor

Re: Core files

You can use dcore utility from Chris Bertin to read core. You can download it from

http://rpm-www.rose.hp.com/~chrisb/tools.html
Nguyen Anh Tien
Honored Contributor

Re: Core files


HP-UX B11.11 use POSFIX as default shel, so use 2 command to set env parameter.
#export SDB_SHLIB_PATH=/usr/bin
#export SHLIB_PATH=/usr/bin
HP is simple
B. Hulst
Trusted Contributor

Re: Core files

Hi,

About the advice...

Of course any reply in these forums is still subject to the readers own evalution.

In my case it solved a few system crashes by just going through the core files with strings and figuring out why the hack it did crash. Many time I found hardware problems from them. :-(

Regards,
Bob

Ps. This was my 0.02 euro contribution. :-)