Re: Unbalbe to gdb core file generted from customer machine on local host

2014-11-17 Thread James C Chen

Hi there,

Karl provided me some general information. Could gdb team please provide me
some information?

Thanks for your help.

Best Regards,

James Chen
IBM
- Forwarded by James C Chen/Ontario/IBM on 11/17/2014 11:09 AM -

From:   Karl Berry via RT i...@fsf.org
To: James C Chen/Ontario/IBM@IBMCA
Date:   11/16/2014 10:21 AM
Subject:[gnu.org #960633] Unbalbe to gdb core file generted from
customer machine



Hi - thanks for writing, but sorry, but this is the general information
address for the FSF and GNU. We aren't experts in gdb.  I suggest
writing to the public gdb help list, gdb@gnu.org.  (FWIW, as far as I
know it is necessary to use the machine the dump was made on, or an
exact clone, since by its nature it will depend on many tiny details of
the environment.  But maybe there is some trick or alternative I don't
know about.)

Best wishes,
Karl


---
Have we been helpful to you today?  Would you like to help
the FSF continue to spread the word about software freedom?
You too can become a member! Learn more at:
http://donate.fsf.org





Re: Unbalbe to gdb core file generted from customer machine on local host

2014-11-17 Thread Sergio Durigan Junior
On Sunday, November 16 2014, James C. Chen wrote:

 Hi there,

 Thanks for providing gdb support.

Hello, James.

First of all, this mailing list is not used by the GDB project anymore.
You should write to g...@sourceware.org, which is the official mailing
list for the project.

 I created an executable binary (x86-64) on my local Linux server and let it
 run on customer Linux server. Later on, my binary generated a core
 file.  I tried to gdb the core file on my local Linux server, but I can not
 get correct stack trace.

It is not clear whether you compiled your binary with debug information
or not.  Have you used the -g flag on GCC?  Also, if your binary is
linked against shared libraries, you have to make sure that the debug
information for those libraries is also installed.  And you have to make
sure that the versions of the libraries installed on your machine and on
your client's machine are the same.

 (gdb) bt full
 #0  0x003a5d07288e in ?? ()
 No symbol table info available.
 #1  0x1b36d548 in ?? ()
 No symbol table info available.
 #2  0x1b2fab70 in ?? ()
 No symbol table info available.
 #3  0x7fff60c30a9c in ?? ()
 No symbol table info available.
 #4  0x1b36d548 in ?? ()
 No symbol table info available.
 #5  0x1aafc860 in ?? ()
 No symbol table info available.
 #6  0x2230 in ?? () from /lib64/libm.so.6
 No symbol table info available.
 #7  0x545194cc0221 in ?? ()
 No symbol table info available.
 #8  0x in ?? ()
 No symbol table info available.

These errors happen when GDB does not have access to the debug
information of your binary/libraries.

 But when I gdb the core file on customer server where the core file was
 created, I am able to get correct stack trace.

 Question, do I have to gdb the core file on the customer server to get
 correct stack trace? Any way to gdb the core file on my local server?

If you are using the same versions of the same programs/libraries, then
you will be able to inspect the corefile in your machine without
problems.

-- 
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/



Re: Unbalbe to gdb core file generted from customer machine on local host

2014-11-17 Thread James C Chen
Thank you very much Sergio.

You have answered my question. I was suspecting that the difference in
version of library is the cause.

Best Regards,

James Chen
IBM


From:   Sergio Durigan Junior sergi...@sergiodj.net
To: James C Chen/Ontario/IBM@IBMCA
Cc: gdb@gnu.org
Date:   11/17/2014 03:28 PM
Subject:Re: Unbalbe to gdb core file generted from customer machine on
local host



On Sunday, November 16 2014, James C. Chen wrote:

 Hi there,

 Thanks for providing gdb support.

Hello, James.

First of all, this mailing list is not used by the GDB project anymore.
You should write to g...@sourceware.org, which is the official mailing
list for the project.

 I created an executable binary (x86-64) on my local Linux server and let
it
 run on customer Linux server. Later on, my binary generated a core
 file.  I tried to gdb the core file on my local Linux server, but I can
not
 get correct stack trace.

It is not clear whether you compiled your binary with debug information
or not.  Have you used the -g flag on GCC?  Also, if your binary is
linked against shared libraries, you have to make sure that the debug
information for those libraries is also installed.  And you have to make
sure that the versions of the libraries installed on your machine and on
your client's machine are the same.

 (gdb) bt full
 #0  0x003a5d07288e in ?? ()
 No symbol table info available.
 #1  0x1b36d548 in ?? ()
 No symbol table info available.
 #2  0x1b2fab70 in ?? ()
 No symbol table info available.
 #3  0x7fff60c30a9c in ?? ()
 No symbol table info available.
 #4  0x1b36d548 in ?? ()
 No symbol table info available.
 #5  0x1aafc860 in ?? ()
 No symbol table info available.
 #6  0x2230 in ?? () from /lib64/libm.so.6
 No symbol table info available.
 #7  0x545194cc0221 in ?? ()
 No symbol table info available.
 #8  0x in ?? ()
 No symbol table info available.

These errors happen when GDB does not have access to the debug
information of your binary/libraries.

 But when I gdb the core file on customer server where the core file was
 created, I am able to get correct stack trace.

 Question, do I have to gdb the core file on the customer server to get
 correct stack trace? Any way to gdb the core file on my local server?

If you are using the same versions of the same programs/libraries, then
you will be able to inspect the corefile in your machine without
problems.

--
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/