Re: Walking the task list from a kext
Re: Walking the task list from a kext
- Subject: Re: Walking the task list from a kext
- From: Michael Smith <email@hidden>
- Date: Wed, 7 Feb 2007 13:17:16 -0800
On Feb 4, 2007, at 7:38 PM, Yount, Chuck wrote: 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.
For hardware debugging purposes, I need the list of all processes and their address maps at a very specific point in time (when a specific ioctl is called).
I think there may be a disconnect here then. There's little or no relevance to hardware debugging in the *virtual* memory layout of a process' address space.
What information are you *actually* trying to gather? I'm concerned that if I wait until I get back to user mode, some processes may terminate before I get the whole list handled, especially if I have to write some script that calls vmmap. BTW, this is just debugging code; it will not be released with any shipping product.
For obvious reasons, the kernel frowns heavily on doing nominally unbounded work while blocking the rest of the system. You would have to stop every processor in the system and dump whatever information you're looking for to a pre-allocated buffer, and you have the chicken-and-egg problem of not knowing how big the buffer has to be until you've already stopped the system and consequently made it impossible to allocate, forcing a backoff and retry model.
This simply isn't a useful thing. Perhaps if you explain what you're actually looking for, we can suggest an alternative.
= 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