This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: examining a core dump on a machine with other base addresses in shared libraries


I think you can copy the share lib in A to B, and call command "set
sysroot dirname" in gdb to let gdb know wich directory it can find
right lib in B.

Hui

On Thu, May 28, 2009 at 04:52, Drago Krznaric <drago.krznaric@spray.se> wrote:
> Hi,
>
> I have a program and a core dump created on machine A that I copy to
> machine B. I can open the core dump and get a nice backtrace on A but
> not on B. The reason appears to be that the shared libraries on A and B
> have different base addresses. They are otherwise exactly identical in
> hardware and software (RedHat 4). I guess that the addresses are
> different because of the prelink cron job or "address space layout
> randomization". Normally I don't have access to machine A, so I would
> really want to open the core dump on B without having to copy all used
> shared libraries from A to B.
>
> Does anybody know if and how this can be done?
>
> When opening core dump with gdb-6.8 on B machine, I get something like:
>
> warning: .dynamic section for "/usr/lib/libstdc++.so.6" is not at the
> expected address (wrong library or version mismatch?)
> warning: .dynamic section for "/lib/tls/libm.so.6" is not at the
> expected address
> warning: difference appears to be caused by prelink, adjusting
> expectations
> ...
>
> and when I do a backtrace I get something useless as:
>
> #0 ?0x003d17a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
> #1 ?0x004117d5 in __longjmp () from /lib/tls/libc.so.6
> #2 ?0x00000000 in ?? ()
> (gdb)
>
> Thanks in advance,
> Drago
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]