From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23951 invoked by alias); 9 Mar 2002 15:52:42 -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 23820 invoked from network); 9 Mar 2002 15:52:34 -0000 Received: from unknown (HELO hotmail.com) (64.4.31.69) by sources.redhat.com with SMTP; 9 Mar 2002 15:52:34 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 9 Mar 2002 07:52:34 -0800 Received: from 217.215.27.171 by pv1fd.pav1.hotmail.msn.com with HTTP; Sat, 09 Mar 2002 15:52:34 GMT X-Originating-IP: [217.215.27.171] From: "Bäng-ha  " To: gdb@sources.redhat.com Bcc: Subject: Map offsets Date: Sat, 09 Mar 2002 07:52:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 09 Mar 2002 15:52:34.0422 (UTC) FILETIME=[6DC27160:01C1C782] X-SW-Source: 2002-03/txt/msg00082.txt.bz2 Hi! I'm sure this is a rather stupid question, but I'll ask it anyway: I'm debugging a couple of processes under linux, and I want to load the symbols from glibc. Now, the only way I've managed to figure out as to perform the task of finding the base address of libc if to look at the memory maps in /proc/?/maps, whence I get the base address of libc to be e.g. 0x40020000 (this was for mingetty). So naturally, I do add-symbol-file /lib/libc-2.2.2.so 0x4002000, but as it turns, it should be loaded 0x4003BCB0, i.e. at an offset of 0x1BCB0 from what /proc says. (I got the exact offset from looking at the dynamically linked function tables and comparing the read function to what was acutally loaded, if that would somehow matter) Anyway, I guess I could live with this small annoyance, if it wasn't for that other libs wants to be loaded with other offsets. 0x1BCB0 didn't work with e.g. libresolv. And, I want to know the cause of this as well, of course. So could someone tell me how to get the real offset, because I can't imagine that there isn't an error-free way to get the address, right? Thanks in advance Fredrik Tolf _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com