Using KERN_KDGETBUF thread values
Using KERN_KDGETBUF thread values
- Subject: Using KERN_KDGETBUF thread values
- From: James Boulton <email@hidden>
- Date: Mon, 14 May 2012 20:21:57 +0100
I'm using sysctl / KERN_KDGETBUF to get some profiling information and arg5
of the kd_buf structure returned is the currently executing thread (as
returned by current_thread() in the XNU kernel).
I'm trying to figure out how to use this thread id to get some useful
details about the thread, but I cant seem to figure out how to do this.
If I try and use the value with any standard thread functions I get an error
of MACH_SEND_INVALID_DEST. I assume this value is a kernel thread id of some
kind (it doesnt appear to be a pointer) and not a mach port. It looks like I
should be using something like thread_get_kernel_port to get the send right
to the thread, but this also comes back with MACH_SEND_INVALID_DEST.
Any kernel guru's out there, I'd really appreciate some help! :o)
Cheers,
-- James
_______________________________________________
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