• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: DTrace probe problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DTrace probe problem


  • Subject: Re: DTrace probe problem
  • From: Bill Bumgarner <email@hidden>
  • Date: Mon, 26 May 2008 22:51:23 -0700

On May 26, 2008, at 10:35 PM, radj wrote:
So my problem now is, how can I catch all Cocoa calls of the app without
knowing the PID it will have when it runs?

dtrace allows you to specify the command to be run on the command line. See this post:


	http://www.friday.com/bbum/2008/01/26/objective-c-printing-class-name-from-dtrace/

Specifically, you can do something like this:

sudo dtrace -s forwardMethod.d -c /Applications/TextEdit.app/Contents/ MacOS/TextEdit
This, of course, ends up running said application as root, which may not be acceptable in your case.


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.

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


  • Follow-Ups:
    • Re: DTrace probe problem
      • From: radj <email@hidden>
References: 
 >DTrace probe problem (From: radj <email@hidden>)

  • Prev by Date: Re: Cocoa-dev Digest, Vol 5, Issue 919
  • Next by Date: Re: DTrace probe problem
  • Previous by thread: DTrace probe problem
  • Next by thread: Re: DTrace probe problem
  • Index(es):
    • Date
    • Thread