Re: Register a task's exception port from a kext
Re: Register a task's exception port from a kext
- Subject: Re: Register a task's exception port from a kext
- From: Quinn <email@hidden>
- Date: Fri, 3 Oct 2008 09:44:33 +0100
At 17:47 +1000 3/10/08, nicolas vide wrote:
I'm looking for a way to monitor exceptions raised inside a specific
user task and fix them if needed. I already done this with a user
daemon - using task_set_exception_ports - but this time I want to do
it from the kernel side.
If you already have this running as a daemon, what's the incentive
for moving it into the kernel? In general we recommend that folks
keep as much code out of the kernel as possible, especially for
things like exceptions, which are usually not performance critical.
Is it possible to "forward" an exception port to my IOUserClient ?
(using IOConnectSetNotificationPort/IOUserClient::registerNotificationPort
?)
You might be able to make some progress with this, but it really runs
counter the spirit of that API.
Is there a way to setup an exception port directly from a IOService
without using an IOUserClient ?
No. Firstly, the routine you need, task_set_special_port, is not
part of the KPI. Secondly, that routine takes a task_t as its first
parameter, and IOServices have no notion of tasks.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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