Re: What exactly does "info sharedlibrary" command show?

Frederic RISS
2006-08-29T13:20:51Z

On Tue, 2006-08-29 at 21:00 +0800, chen free wrote:
> 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

Usually a process has only access to its virtual address space, thus
accessing physical memory ranges might not even be possible.
Even if you can access the physical memory, it's most of the time just
pointless because the data is loaded in memory only on-demand (upon a
pagefault).
That's why I said it's a tough job. Memory usage is hard to define when
you deal with code that is shared among processes and loaded only when
necessary...

But we're diverging from GDB. I don't know exactly what 'memory usage'
you want to monitor, but maybe GDB isn't the right tool for what you
want to do (debugger vs profiler?)

Fred.