From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14273 invoked by alias); 26 Jul 2004 19:20:23 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14247 invoked from network); 26 Jul 2004 19:20:22 -0000 Received: from unknown (HELO mail.siemenscom.com) (12.146.131.10) by sourceware.org with SMTP; 26 Jul 2004 19:20:22 -0000 Received: from fdns2.rolm.com (localhost [127.0.0.1]) by mail.siemenscom.com (8.12.10/8.12.10) with ESMTP id i6QJKJMD004293; Mon, 26 Jul 2004 12:20:19 -0700 Received: from stca200a.bus.sc.rolm.com (stca200a.bus.sc.rolm.com [165.218.68.180]) by fdns2.rolm.com (8.12.10/8.12.10) with ESMTP id i6QJKJKO004488; Mon, 26 Jul 2004 12:20:19 -0700 (PDT) Received: by stca200a.bus.sc.rolm.com with Internet Mail Service (5.5.2657.72) id ; Mon, 26 Jul 2004 12:20:19 -0700 Message-ID: <7A25937D23A1E64C8E93CB4A50509C2A0310F2C7@stca204a.bus.sc.rolm.com> From: "Bloch, Jack" To: "'Kevin Buettner'" Cc: gdb@sources.redhat.com Subject: RE: Determining base address of shared library from core file Date: Mon, 26 Jul 2004 19:33:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2004-07/txt/msg00326.txt.bz2 When doing this, I find a DT_DEBUG entry but is has a zero in the d_un.d_val field (I am supposed to look at the executable and not the core dump right?) -----Original Message----- From: Kevin Buettner [mailto:kevinb@redhat.com] Sent: Wednesday, July 21, 2004 1:53 PM To: Bloch, Jack Cc: gdb@sources.redhat.com Subject: Re: Determining base address of shared library from core file On Mon, 19 Jul 2004 07:51:31 -0700 "Bloch, Jack" wrote: > Is there an easy way to determine the base address of a shared library from > a core file? It depends upon what you mean by "easy". For an SVR4-like system (which includes Linux), you have to traverse the dynamic section to find the address of the r_debug struct. Once that is done, you still have to traverse the link_map structs to find the desired address. See solib-svr4.c for the gory details. (IMO, this isn't very easy.) Kevin