The attached lldb command pblock
command lets you peek inside an Objective-C block. It tries to tell you where to find the source code for the block, and the values captured by the block when it was created.
Consider this example program:
#import <Foundation/Foundation.h>
@interface Foo: NSObject
@end
@implementation Foo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char *buf; | |
buf = (char *)calloc(1024, sizeof(char)); | |
fcntl(STDERR_FILENO, F_GETPATH, buf); | |
printf("----------------- old log path: %s\n", buf); | |
int retValue = dup2(fd, STDERR_FILENO); | |
free(buf); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apple Service Diagnostic Disks 25 GB [Original] | |
Applications : Mac : English | |
ASD Dual Boot 2.1.5 (2003) | |
PowerBook G4 (12-inch), PowerBook G4 (17-inch), iMac (17-inch 1GHz), Power Mac G4 (FW 800), Xserve (slot load), eMac (ATI Graphics), and Power Mac G4 (Mirrored Drive Doors 2003), iMac (USB 2.0), PowerBook G4 (15-inch FW800), PowerBook G4 (17-inch 1.33GHz) and PowerBook G4 (12-inch DVD) | |
ASD 2.5.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type d ! -path "*git*" ! -path "*build*" -exec sh -c " cd {} && git branch | grep <branchName> && pwd" ";" |