Reputation: 1152
I have a program that crashed on RHEL 6.5, also I have a coredump file.
I want to debug it on RHEL 6.4, but it has another version of glibc. I put glibc.so.6 from RHEL 6.5 to lib/ directory, but can't set gdb up to use it:
[nskdvlp@srv2-csd-mong01 snmp_int]$ LD_LIBRARY_PATH=/u01/app/maa/snmp_int/lib gdb bin/snmp_int
Reading symbols from /u01/app/maa/snmp_int/bin/snmp_int...done.
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) set solib-search-path lib
warning: .dynamic section for "/lib64/libc.so.6" is not at the expected address (wrong library or version mismatch?)
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /u01/app/maa/snmp_int/lib/libsnmp_int_snmp.so.6.0.5...done.
Loaded symbols for /u01/app/maa/snmp_int/lib/libsnmp_int_snmp.so.6.0.5
(gdb) core core.110358
[New Thread 110358]
[New Thread 110367]
warning: .dynamic section for "/lib64/libc.so.6" is not at the expected address (wrong library or version mismatch?)
warning: Could not load shared library symbols for (0x%0*Zx)
.
Do you need "set solib-search-path" or "set sysroot"?
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
(gdb) bt
#0 0x0000003e93a32925 in ?? ()
#1 0x0000003e93a3408d in ?? ()
#2 0x0000000000000000 in ?? ()
Other .so libraries are loaded well from lib/
Upvotes: 2
Views: 3223
Reputation: 213526
I put glibc.so.6 from RHEL 6.5 to lib/ directory, but can't set gdb up to use it:
There is no such thing as glibc.so.6
. You mean libc.so.6
.
This is nowhere near sufficient: you need all libraries and the dynamic loader from the system on which the core was produced. See this answer for what you need to do.
Upvotes: 1