• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Walking the task list from a kext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Walking the task list from a kext


  • Subject: Re: Walking the task list from a kext
  • From: Michael Smith <email@hidden>
  • Date: Sun, 4 Feb 2007 11:39:02 -0800


On Feb 1, 2007, at 10:28 AM, Yount, Chuck wrote:

Sorry; I'm probably using the wrong terminology for MacOS. (I'm more familiar w/Windows and Linux.) By "modules", I mean the executable images loaded by each process. What I want is something like I can get from /proc/nnn/maps in Linux (where nnn is a pid), e.g.,
 
>ps
  PID TTY          TIME CMD
10542 pts/4    00:00:15 csh
>cat /proc/10542/maps
08048000-0808c000 r-xp 00000000 03:01 39144      /bin/tcsh
0808c000-08091000 rw-p 00043000 03:01 39144      /bin/tcsh
08091000-08619000 rwxp 00000000 00:00 0
40000000-40016000 r-xp 00000000 03:01 57570      /lib/ld-2.2.4.so
40016000-40017000 rw-p 00015000 03:01 57570      /lib/ld-2.2.4.so
40017000-40018000 rwxp 00000000 00:00 0
40027000-4003a000 r-xp 00000000 03:01 57588      /lib/libnsl-2.2.4.so
4003a000-4003b000 rw-p 00012000 03:01 57588      /lib/libnsl-2.2.4.so
4003b000-4003e000 rw-p 00000000 00:00 0
4003e000-40041000 r-xp 00000000 03:01 57640      /lib/libtermcap.so.2.0.8
40041000-40042000 rw-p 00002000 03:01 57640      /lib/libtermcap.so.2.0.8
40042000-40047000 r-xp 00000000 03:01 57581      /lib/libcrypt-2.2.4.so
40047000-40048000 rw-p 00004000 03:01 57581      /lib/libcrypt-2.2.4.so
40048000-40070000 rw-p 00000000 00:00 0
40070000-401a8000 r-xp 00000000 03:01 76074      /lib/i686/libc-2.2.4.so
401a8000-401ad000 rw-p 00137000 03:01 76074      /lib/i686/libc-2.2.4.so
401ad000-401b1000 rw-p 00000000 00:00 0
401b1000-401bc000 r-xp 00000000 03:01 57598      /lib/libnss_compat-2.2.4.so
401bc000-401bd000 rw-p 0000a000 03:01 57598      /lib/libnss_compat-2.2.4.so
401bd000-401be000 rw-p 00000000 00:00 0
bffb4000-c0000000 rwxp fffb5000 00:00 0
>
 
If I can get this from user mode, that would be ok, also.

As others have pointed out, the 'vmmap' tool will allow you to examine the various entries in a process' address map, and depending on what you actually need you can sort/filter them appropriately.

However, the fact that you were asking for this information *inside* the kernel still rings very prominent alarm bells, which is why I was asking *why* you were looking for this information.

 = Mike


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • RE: Walking the task list from a kext
      • From: "Yount, Chuck" <email@hidden>
References: 
 >RE: Walking the task list from a kext (From: "Yount, Chuck" <email@hidden>)

  • Prev by Date: Re: Debugging Proprietary KEXTs
  • Next by Date: Re: mach in signal handler
  • Previous by thread: RE: Walking the task list from a kext
  • Next by thread: RE: Walking the task list from a kext
  • Index(es):
    • Date
    • Thread