From: Hui Zhu <teawater@gmail.com>
To: Drago Krznaric <drago.krznaric@spray.se>
Cc: gdb@sourceware.org
Subject: Re: examining a core dump on a machine with other base addresses in shared libraries
Date: Sun, 31 May 2009 04:51:00 -0000 [thread overview]
Message-ID: <daef60380905302151jf4e6c4wad7f90b5d3939164@mail.gmail.com> (raw)
In-Reply-To: <1243457555.17311.4.camel@localhost.localdomain>
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
>
>
prev parent reply other threads:[~2009-05-31 4:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 20:52 Drago Krznaric
2009-05-27 21:41 ` Jan Kratochvil
2009-05-28 6:08 ` Drago Krznaric
2009-05-27 23:47 ` Paul Pluzhnikov
2009-05-28 20:29 ` Drago Krznaric
2009-05-31 4:51 ` Hui Zhu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=daef60380905302151jf4e6c4wad7f90b5d3939164@mail.gmail.com \
--to=teawater@gmail.com \
--cc=drago.krznaric@spray.se \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox