From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21816 invoked by alias); 27 May 2009 20:52:52 -0000 Received: (qmail 21808 invoked by uid 22791); 27 May 2009 20:52:51 -0000 X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=BAYES_00,RCVD_NUMERIC_HELO,SPF_PASS X-Spam-Check-By: sourceware.org Received: from spsmtp02oc.mail2world.com (HELO spsmtp02oc.mail2world.com) (74.202.142.148) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 May 2009 20:52:39 +0000 Received: from mail pickup service by spsmtp02oc.mail2world.com with Microsoft SMTPSVC; Wed, 27 May 2009 13:51:17 -0700 auth-sender:drago.krznaric@spray.se Received: from 90.225.97.154 unverified ([90.225.97.154]) by spsmtp02oc.mail2world.com with Mail2World SMTP Server; Wed, 27 May 2009 13:51:16 -0700 Subject: examining a core dump on a machine with other base addresses in shared libraries From: Drago Krznaric To: gdb@sourceware.org Content-Type: text/plain Date: Wed, 27 May 2009 20:52:00 -0000 Message-Id: <1243457555.17311.4.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00171.txt.bz2 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