• 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: Examining the Call Stack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Examining the Call Stack


  • Subject: Re: Examining the Call Stack
  • From: Jérémie Banier <email@hidden>
  • Date: Wed, 22 Dec 2004 08:40:17 +0100

Hello,

you can always write a couple of tracing macro something like
#define TRACE_FUNC(x) NSLog(@"0x%x->%s", self, x);
then
void myfunc(int a ....) {
TRACE_FUNC("myfunc")
.....
}
This is a classic approach and is often usefull
Does that reply to your question ?
Another approach would be to use the debugging API but you propably do not want that.


Have a nice day,
Jéré.

Le 22-déc.-04, à 07:39, email@hidden a écrit :

How can I exam the call stack programatically to find out which object's method called another
method?


In other words, lets say class A has a method aMethod which sends class B's method bMethod to
some object of class B. Then when an object of class A is sent the aMethod message, an object of
class B will eventually receive a bMethod while aMethod is executing. I want bMethod to output that it
was sent to the B object in the aMethod of the A object (the address of the A object, etc...).


How can I do this? Thanks.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Examining the Call Stack (From: email@hidden)

  • Prev by Date: Re: Examining the Call Stack
  • Next by Date: Re: Examining the Call Stack
  • Previous by thread: Re: Examining the Call Stack
  • Next by thread: Re: Examining the Call Stack
  • Index(es):
    • Date
    • Thread