From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22583 invoked by alias); 9 Feb 2010 22:08:30 -0000 Received: (qmail 22573 invoked by uid 22791); 9 Feb 2010 22:08:30 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Feb 2010 22:08:25 +0000 Received: (qmail 12185 invoked from network); 9 Feb 2010 22:08:24 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Feb 2010 22:08:24 -0000 Date: Tue, 09 Feb 2010 22:08:00 -0000 From: Daniel Jacobowitz To: ineya ineya Cc: gdb@sourceware.org Subject: Re: reconstructing process memory map from core Message-ID: <20100209220815.GA14898@caradoc.them.org> Mail-Followup-To: ineya ineya , gdb@sourceware.org References: <7b8592a1002091400y5b901e90s8cb26f75c057ffab@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7b8592a1002091400y5b901e90s8cb26f75c057ffab@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-02/txt/msg00055.txt.bz2 On Tue, Feb 09, 2010 at 11:00:34PM +0100, ineya ineya wrote: > But it doesn't work, gdb is trying to read something from heap, and if > this fails, no symbols are loaded. So I was wondering why gdb needs to > access heap? Or more generally how are symbols loaded / how is the > process memory map reconstructed from core file? The dynamic linker maintains a linked list of loaded shared libraries, in the heap. > I thought all that is needed is to have: > - list of external function - in .dynsym I guess > - .got from runtime Neither of these are useful for determining shared library load addresses. .dynsym is not useful at all; it is read-only so we can recover it from the executable. -- Daniel Jacobowitz CodeSourcery