Re: Thread ID in crash log

2008-12-17 Thread radj
> I've done it that way when debugging threads. It doesn't take long; none of > the calls take very long, But there's still a difference, right? And when called or passed through alot, that small difference can become really big. > especially when compared to what goes on when > writing to a log

Re: Thread ID in crash log

2008-12-17 Thread radj
ng CrashLogThreadID(pthread_t) might be too costly for every call to my custom debugLog(...) because there are alot all over the code (not the best practice, me thinks). But thanks to your intro to task_threads(), I can follow the idea and try my own array of

Re: Thread ID in crash log

2008-12-17 Thread radj
ead's number from within my code that will match with crash log's thread numbers? :D ex: fwrite(filePointer, "[thread:%d] a trivial sample debug log line showing the thread number\n", ____ ); // what should go in the blank? Cheers, radj _

Thread ID in crash log

2008-12-16 Thread radj
Hello List, I've been googling and searching for this but to no joy. How do you get a thread ID of the current thread that will be similar with the one that shows up on a crash log? This is pretty helpful for debugging multi-threaded applications. Thanks,

Re: DTrace probe problem

2008-06-05 Thread radj
m the driver but unfortunately, dtrace requires more previliges than "_lp" user can give. And I've read that authentication is a little complicated. I bet I can find lots of examples of running stuff as root in other threads. Thanks for all your help, guys! radj

Re: DTrace probe problem

2008-06-05 Thread radj
he application does not run as "root" but as "_lp". Is that a big factor in the error? Cheers, radj ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contac

Re: DTrace probe problem

2008-06-04 Thread radj
I tried the raise() in D script. My driver got the signal but it kinda malfunctioned, it got stuck somehow although it still can accept any signal. Weird. My small experience can't tell me anything. So I googled up some more D trace commands and found system(). I tried this instead: pid$1::dummyC

Re: DTrace probe problem

2008-06-03 Thread radj
> > I'm not sure I understand what you're asking. Are you looking for the > dtrace:::BEGIN probe? If you put an action on that, it's executed when > DTrace starts tracing. > This is exactly what I'm looking for. Thanks again! :) ___ Cocoa-dev mailing

Re: DTrace probe problem

2008-06-03 Thread radj
t possible to use raise() when dtrace command has finished compiling and not when a probe fires? Curious, radj ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: DTrace probe problem

2008-06-03 Thread radj
t possible to use raise() when dtrace command has finished compiling and not when an objc probe fires? radj ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators a

Solved (still open to suggestions): DTrace probe problem

2008-06-02 Thread radj
Finally got it to poll. I had to study signals and signal handling within the driver. lol. I've tried it and atleast it helps me delay the actual "initialization" of the driver while I run the D script. Your quick responses were really helpful. Thanks alot, Bill! DTrace rocks! ra

Re: DTrace probe problem

2008-06-01 Thread radj
> 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 > varia