Re: parsing /proc/<pid>/maps

Chris Wedgwood (chris@cybernet.co.nz)
Thu, 8 Oct 1998 19:11:20 +1300


On Wed, Oct 07, 1998 at 09:31:42PM -0600, Larry McVoy wrote:

> I'm writing a perl script to put this in more readable format and I
> want to convert from dev/inum to file name. Is there a script out
> there that does that already? Thanks in advance.

I assume your using 2.0.x ? 2.1.x already does this for you:

08048000-080a4000 r-xp 00000000 03:03 8777 /bin/bash
080a4000-080ab000 rw-p 0005b000 03:03 8777 /bin/bash
080ab000-080e8000 rwxp 00000000 00:00 0
40000000-40005000 r-xp 00000000 03:03 250254 /lib/ld-linux.so.1.9.6
40005000-40006000 rw-p 00004000 03:03 250254 /lib/ld-linux.so.1.9.6
40006000-40009000 rw-p 00000000 00:00 0
40009000-4000b000 r-xp 00000000 03:03 250468 /lib/libtermcap.so.2.0.8
4000b000-4000c000 rw-p 00001000 03:03 250468 /lib/libtermcap.so.2.0.8
4000c000-4000d000 r-xp 00000000 03:03 250255 /lib/libdl.so.1.9.6
4000d000-4000f000 rw-p 00000000 03:03 250255 /lib/libdl.so.1.9.6
4000f000-40093000 r-xp 00000000 03:03 250146 /lib/libc.so.5.4.44
40093000-40099000 rw-p 00083000 03:03 250146 /lib/libc.so.5.4.44
40099000-400cb000 rw-p 00000000 00:00 0
bfffe000-c0000000 rwxp fffff000 00:00 0

Still, it doesn't help with 2.0.x (but you could always claim "THIS
SCRIPT REQUIRES LINUX 2.1.X OR LATER").

-cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/