Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Frederic RISS <frederic.riss@st.com>
To: chen free <dits365@gmail.com>
Cc: gdb@sources.redhat.com
Subject: Re: What exactly does "info sharedlibrary" command show?
Date: Tue, 29 Aug 2006 12:47:00 -0000	[thread overview]
Message-ID: <1156855634.3429.197.camel@crx549.cro.st.com> (raw)
In-Reply-To: <e55f4e5f0608290503l54ffebfdu2e5e65f4c8089fd2@mail.gmail.com>


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.


  parent reply	other threads:[~2006-08-29 12:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 12:03 chen free
2006-08-29 12:40 ` Daniel Jacobowitz
2006-08-29 19:15   ` Mark Kettenis
2006-08-29 19:28     ` Daniel Jacobowitz
2006-08-29 20:06       ` Mark Kettenis
2006-08-29 20:12         ` Daniel Jacobowitz
2006-08-29 21:05           ` Steve Eaton
2006-08-29 21:17             ` Daniel Jacobowitz
2006-08-29 21:08           ` Mark Kettenis
2006-08-29 21:24             ` Daniel Jacobowitz
2006-08-30  5:22           ` chen free
2006-08-30 12:39             ` Daniel Jacobowitz
2006-08-30 13:24               ` chen free
2006-08-29 12:47 ` Frederic RISS [this message]
2006-08-29 13:00   ` chen free
2006-08-29 13:20     ` Frederic RISS
2006-08-29 13:36       ` chen free

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1156855634.3429.197.camel@crx549.cro.st.com \
    --to=frederic.riss@st.com \
    --cc=dits365@gmail.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox