Frequently, the same method X gets called from different other methods A, B, C. Is it possible to get a name of the caller method (A, B, C) from inside method X? Most preferably would be GDB console command (during debug) but stuff with NSLog would also be sufficient.
Share
Typing
btwhile inside the called function will help. This prints the backtrace of the called functions; the function just below the called function in the call hierarchy is the one that called it.Observe, here, that
maincalledfactorial.