forked from gdbinit/MachOView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Layout.h
47 lines (38 loc) · 1.57 KB
/
Layout.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Layout.h
* MachOView
*
* Created by psaghelyi on 18/03/2011.
*
*/
#define MATCH_STRUCT(obj,location) \
struct obj const * obj = (struct obj *)[self imageAt:(location)]; \
if (!obj) [NSException raise:@"null exception" format:@#obj " is null"];
@class MVDataController;
@class MVArchiver;
@class MVNode;
@interface MVLayout : NSObject
{
MVNode * __weak rootNode;
MVDataController * __weak dataController;
uint32_t imageOffset; // absolute physical offset of the image in binary
uint32_t imageSize; // size of the image corresponds to this layout
NSThread * backgroundThread;
MVArchiver * archiver;
}
@property(nonatomic,weak,readonly) MVDataController * dataController;
@property(nonatomic,readonly) NSThread * backgroundThread;
@property(nonatomic,readonly) MVArchiver * archiver;
- (id) initWithDataController:(MVDataController *)dc rootNode:(MVNode *)node;
- (void const *) imageAt:(uint32_t)location;
- (void) printException:(NSException *)exception caption:(NSString *)caption;
- (BOOL) is64bit;
- (void) doMainTasks;
- (void) doBackgroundTasks;
- (NSString *) convertToRVA: (NSString *)offsetStr;
- (MVNode *) findNodeByUserInfo:(NSDictionary *)userInfo;
- (MVNode *) createDataNode:(MVNode *)parent
caption:(NSString *)caption
location:(uint32_t)location
length:(uint32_t)length;
@end