Subject: Re: what files are mapped?
To: None <kpneal@pobox.com>
From: Andrew Cagney <cagney@mac.com>
List: tech-kern
Date: 01/20/2002 13:01:41
> On Sun, Jan 20, 2002 at 03:36:42PM +0100, wojtek@chylonia.3miasto.net wrote:
> 
>> On Sun, 20 Jan 2002, Emmanuel Dreyfus wrote:
> 
>> > Is there any way, from userland to discover which files have been mapped
>> > in the current process memory, and where they have been mapped?
> 
>> current process??
>> you should just record every mapping you do somewhere and then check it
> 
> 
> And if he happens to be writing a shared library that needs to know
> what the program using the library has mapped outside of library
> control?


Per MRG's comment, /proc.

For examples, see the recent changes related to ``(gdb) 
generate-core-file <file>'' and ``(gdb) attach <pid>'' changes in 
current GDB sources.

Andrew