Skip to content

Instantly share code, notes, and snippets.

@EugeneRash
Created January 28, 2014 16:08
Show Gist options
  • Save EugeneRash/8670589 to your computer and use it in GitHub Desktop.
Save EugeneRash/8670589 to your computer and use it in GitHub Desktop.
NSString *sourceString = [[NSThread callStackSymbols] objectAtIndex:1];
NSCharacterSet *separatorSet = [NSCharacterSet characterSetWithCharactersInString:@" -[]+?.,"];
NSMutableArray *array = [NSMutableArray arrayWithArray:[sourceString componentsSeparatedByCharactersInSet:separatorSet]];
[array removeObject:@""];
NSLog(@"Stack = %@", [array objectAtIndex:0]);
NSLog(@"Framework = %@", [array objectAtIndex:1]);
NSLog(@"Memory address = %@", [array objectAtIndex:2]);
NSLog(@"Class caller = %@", [array objectAtIndex:3]);
NSLog(@"Function caller = %@", [array objectAtIndex:4]);
NSLog(@"Line caller = %@", [array objectAtIndex:5]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment