Operating System - Linux
1752839 Members
3948 Online
108789 Solutions
New Discussion юеВ

Re: How to open a core file in gdb on a different machine.

 
SOLVED
Go to solution
Dhirendra Singh
Occasional Advisor

How to open a core file in gdb on a different machine.

Hi,
I have a problem opening core file in gdb on a different machine from the one where it is generated.
gdb is not able to open the shared libs although i set GDB_SHLIB_PATH env varaible.

hpx404!dhirend1:~ [108]> gdb /pubhome/ip/iccip/iccip/proj/golc600_S8P9V64/bin/olcServer
HP gdb 5.7 (Beta) for HP Itanium (32 or 64 bit) and target HP-UX
11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.7 (Beta) (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions
to
change it and/or distribute copies. Type "show warranty" for warranty/
support.
..
(gdb) set environment GDB_SHLIB_PATH=/pubhome/ip/iccip/iccip/proj/
golc600_S8P9V64/lib/
(gdb) core-file core
Core was generated by `olcServer'.
Program terminated with signal 11, Segmentation fault.
SEGV_ACCERR - Invalid Permissions for object
/fs_fr01/frwrk1/abp_home/core/lib/libgolcfw.so: No such file or
directory.
warning: Error in reading symbols from /fs_fr01/frwrk1/abp_home/core/
lib/libgolcfw.so... skipping

/fs_fr01/frwrk1/abp_home/core/lib/libggnart.so: No such file or
directory.
warning: Error in reading symbols from /fs_fr01/frwrk1/abp_home/core/
lib/libggnart.so... skipping

/fs_fr01/frwrk1/abp_home/core/lib/libggnparser.so: No such file or
directory.
warning: Error in reading symbols from /fs_fr01/frwrk1/abp_home/core/
lib/libggnparser.so... skipping

/fs_fr01/frwrk1/abp_home/core/lib/libggn.so: No such file or
directory.
warning: Error in reading symbols from /fs_fr01/frwrk1/abp_home/core/
lib/libggn.so... skipping

/fs_fr01/frwrk1/abp_home/core/lib/libggninfra.so: No such file or
directory.
warning: Error in reading symbols from /fs_fr01/frwrk1/abp_home/core/
lib/libggninfra.so... skipping

/fs_fr01/frwrk1/abp_home/core/lib/libggn1fl.so: No such file or
directory.
warning: Error in reading symbols from /fs_fr01/frwrk1/abp_home/core/
lib/libggn1fl.so... skipping
#0 0xc0000000620caf90 in warning: No unwind
information found.
Skipping this library /usr/lib/hpux64/libcl.so.1.()
from /fs_fr01/frwrk1/abp_home/core/lib/libgolcfw.so
(gdb)

As you can see gdb is trying to load the shared lib from /fs_fr01/frwrk1/abp_home/core/lib. It is the path of the filesystem on the machine where core is generated.
I want to change the path of the machine where i am opening the core file in gdb.
How to do it ?



4 REPLIES 4
Juan M Leon
Trusted Contributor

Re: How to open a core file in gdb on a different machine.

I will think you should be able to do a bt once on the gdb prompt. But read the following thread, it may help you with additional info

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1135986
Dennis Handly
Acclaimed Contributor

Re: How to open a core file in gdb on a different machine.

>HP gdb 5.7 (Beta)

The final version is on the web.

>How to open a core file in gdb on a different machine.

The simplest way is don't. ;-)

But if that doesn't stop you, you should use the packcore command on the system where you have the core file. And the unpackcore on the system where you are debugging.

The problem you had was that you need to export GDB_SHLIB_PATH before you run gdb and not the application you are debugging.

>Juan: I will think you should be able to do a bt once on the gdb prompt.

No, you need to use packcore/unpack core.

>But read the following thread

Yes, that will help.
Mithun R N
Advisor

Re: How to open a core file in gdb on a different machine.

Hi,

Try using packcore/unpackcore commands.

Also do have a look at the "core file debugging" white-paper available at the documentation link at http://www.hp.com/go/wdb.
This white paper has information on debugging cores in various scenarios.

Mithun
whiteknight
Honored Contributor
Solution

Re: How to open a core file in gdb on a different machine.

hi Dhirendra,

I attached the gdb core pdf file hope this is helpful. Look at page 15-17.




WK
Problem never ends, you must know how to fix it