Re: DTrace probe problem
Re: DTrace probe problem
- Subject: Re: DTrace probe problem
- From: Bill Bumgarner <email@hidden>
- Date: Mon, 26 May 2008 23:36:28 -0700
On May 26, 2008, at 11:26 PM, radj wrote:
An alternative solution would be to make your application wait until
you have "connected" dtrace to it and then pass a signal -- could be
a literal signal -- to continue execution.
I would like to learn how to do this, do you have any posts on your
blog about this? It would be really helpful.
Our aim is to remove the need to make a Debug build to debug the
driver and using DTrace seems to be alternative to make the least
adjustments within code. I hope future replies won't question the
approach but rather talk about how to work the DTrace. :)
I haven't had to hack anything up like that in a while. It all
depends on what kind of input your driver/daemon/application can
handle without messing up.
Personally, I would start by trying to use a signal handler. See x-man-page://signal
(the signal man page). Specifically, I would write a handler for
SIGUSR1 or SIGUSR2 as those exist explicitly to offer user specific
behaviors. Take a command line option or read an environment
variable and then...
while(1) {
sleep(1);
if (signal arrived) break;
}
... or something like that (that, like, actually works...:).
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden