• 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: -finstrument-functions and program startup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -finstrument-functions and program startup


  • Subject: Re: -finstrument-functions and program startup
  • From: Colin Wheeler <email@hidden>
  • Date: Thu, 29 Jan 2009 16:08:55 -0600

Specify the methods you want to trace in the probefunc section. For example
if you want to trace what lead up to and happened after a specific method
you could do something like
BEGIN
{
self->traceme = 0;
}

pid$target::<interested_method>:entry
{
self->traceme = 1;
ustack();
}

pid$target:::entry,
pid$target:::return
/self->traceme = 1/
{
}

END
{
self->traceme = 0;
}

this should simply give you a stack trace of what lead up to that method and
show you the functions occurred after that, if you want you can do stuff
like probemod != "libxxx.dylib" etc for the predicate.

On Thu, Jan 29, 2009 at 3:37 PM, Shawn Erickson <email@hidden> wrote:

> On Thu, Jan 29, 2009 at 12:55 PM, Benjamin Stiglitz <email@hidden>
> wrote:
>
> > That's not correct—the pid provider instruments every user function call
> in
> > the target (well, every one that has an externally visible symbol).
>
> Ah must be lack of symbols preventing it from working in my tests. Was
> only ever getting system library entry points and internal methods.
>
> How is this instrumentation done? I guess the text segment is modified
> in RAM when the pid provider is attached to the process?
>
> -Shawn
> _______________________________________________
>
> 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
>
_______________________________________________

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

References: 
 >-finstrument-functions and program startup (From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>)
 >Re: -finstrument-functions and program startup (From: Greg Parker <email@hidden>)
 >RE: -finstrument-functions and program startup (From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>)
 >Re: -finstrument-functions and program startup (From: Shawn Erickson <email@hidden>)
 >Re: -finstrument-functions and program startup (From: Benjamin Stiglitz <email@hidden>)
 >Re: -finstrument-functions and program startup (From: Shawn Erickson <email@hidden>)
 >Re: -finstrument-functions and program startup (From: Benjamin Stiglitz <email@hidden>)
 >Re: -finstrument-functions and program startup (From: Shawn Erickson <email@hidden>)

  • Prev by Date: problems resetting timer interval.
  • Next by Date: Re: Why does NSTableView stop responding to validateMenuItem: ?
  • Previous by thread: Re: -finstrument-functions and program startup
  • Next by thread: Drag and drop from NSCollectionView
  • Index(es):
    • Date
    • Thread