From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9023 invoked by alias); 29 Aug 2006 13:00:33 -0000 Received: (qmail 9014 invoked by uid 22791); 29 Aug 2006 13:00:32 -0000 X-Spam-Check-By: sourceware.org Received: from py-out-1112.google.com (HELO py-out-1112.google.com) (64.233.166.176) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Aug 2006 13:00:27 +0000 Received: by py-out-1112.google.com with SMTP id b29so2491187pya for ; Tue, 29 Aug 2006 06:00:25 -0700 (PDT) Received: by 10.35.107.20 with SMTP id j20mr14880642pym; Tue, 29 Aug 2006 06:00:25 -0700 (PDT) Received: by 10.35.35.4 with HTTP; Tue, 29 Aug 2006 06:00:25 -0700 (PDT) Message-ID: Date: Tue, 29 Aug 2006 13:00:00 -0000 From: "chen free" To: "Frederic RISS" Subject: Re: What exactly does "info sharedlibrary" command show? Cc: gdb@sources.redhat.com In-Reply-To: <1156855634.3429.197.camel@crx549.cro.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1156855634.3429.197.camel@crx549.cro.st.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00212.txt.bz2 Thanks, Jacobowitz and Fred. Yes, it a tough job, maybe I have to dump the memory image and look into it. BTW, the "dump" command of GDB is also only able to dump process' own virtual memory space ? Because when I try to dump physical memory address range, the result is all zeros....I tried this on 2.6 kernel Looking forward to your reply. Regards, Eric 2006/8/29, Frederic RISS : > > On Tue, 2006-08-29 at 20:03 +0800, chen free wrote: > > Recently I'm looking for a proper method of finding the memory usage > > of shared library of a specific program, > > This is a tough job, I'm not sure looking at info sharedlibrary will > help you much. > > > and from the manual of GDB, I > > found "info sharedlibrary" command. > > > > However, I'm curious about the display of its result. Does anyone know > > the meaning of memory address reported by GDB? Something like: > > ============ > > > > >From To Syms Read Shared Object Library > > 0x005cfc00 0x006bf800 Yes /lib/tls/libc.so.6 > > 0x0059e7a0 0x005b010f Yes /lib/ld-linux.so.2 > > > > ============ > > I believe they are not the physical address, right? > > They are the start/end (virtual) addresses of the library .text section. > > > ============ > > Contents of "maps" > > 0x005bb000 0x006de000 r-xp 00000000 fd:00 3605643 /lib/tls/libc-2.3.4.so > > If you take this as an example, you should find out that 0x005cfc00 - > 0x005bb000 gives you the .text section load addr (check in the elf file > using objdump -h or readelf -s). > > Fred. > >