• 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
Determining the name of a method's caller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determining the name of a method's caller


  • Subject: Determining the name of a method's caller
  • From: Stuart Malin <email@hidden>
  • Date: Thu, 4 Feb 2010 12:52:53 -0500

I have tried to search for a technique to do this, but perhaps my searching skills are deficient.  What I want to do is be able to write an NSLog() call in a method that emits information about the method that invoked the present method.  This would serve me in debugging without needing to run gdb and put a break on the target method.  I have run across content on the Web that suggests that the Google Toolbox for Mac has some such capability in GTMStackTrace, but while I did find GTMStackTrace.h, I didn't locate the implementation (.m) file.

I'm wondering if this will be hard to do because of the need to access registers and the stack. If so, perhaps there is some C (or even assembler?) code that I can use as guidance on effecting this. Or have I in my mind overcomplicated this task?_______________________________________________

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: Determining the name of a method's caller
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: Scope of NSOperations
  • Next by Date: Re: NSFullUserName() always returns the user name at app launch?
  • Previous by thread: Re: Scope of NSOperations
  • Next by thread: Re: Determining the name of a method's caller
  • Index(es):
    • Date
    • Thread