forked from nygard/class-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCDMachOFile.h
More file actions
75 lines (53 loc) · 1.84 KB
/
CDMachOFile.h
File metadata and controls
75 lines (53 loc) · 1.84 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// This file is part of class-dump, a utility for examining the Objective-C segment of Mach-O files.
// Copyright (C) 1997-1998, 2000-2001, 2004-2006 Steve Nygard
#import <Foundation/NSObject.h>
#include <mach/machine.h> // For cpu_type_t, cpu_subtype_t
#include <mach-o/loader.h>
@class NSData;
@class CDSegmentCommand;
@class NSArray;
@class CDDylibCommand, CDMachOFile;
@protocol CDMachOFileDelegate
- (void)machOFile:(CDMachOFile *)aMachOFile loadDylib:(CDDylibCommand *)aDylibCommand;
@end
@interface CDMachOFile : NSObject
{
NSString *filename;
unsigned int archiveOffset;
NSData *data;
struct mach_header header;
NSArray *loadCommands;
struct {
unsigned int shouldSwapBytes:1;
} _flags;
id nonretainedDelegate;
}
NSString *CDNameForCPUType(cpu_type_t cpuType);
- (id)initWithFilename:(NSString *)aFilename;
- (id)initWithFilename:(NSString *)aFilename archiveOffset:(unsigned int)anArchiveOffset;
- (void)dealloc;
- (NSString *)filename;
- (unsigned int)archiveOffset;
- (BOOL)hasDifferentByteOrder;
- (id)delegate;
- (void)setDelegate:(id)newDelegate;
- (void)process;
- (NSArray *)_processLoadCommands;
- (NSArray *)loadCommands;
- (cpu_type_t)cpuType;
- (cpu_subtype_t)cpuSubtype;
- (unsigned long)filetype;
- (unsigned long)flags;
- (NSString *)filetypeDescription;
- (NSString *)flagDescription;
- (NSString *)description;
- (CDDylibCommand *)dylibIdentifier;
- (CDSegmentCommand *)segmentWithName:(NSString *)segmentName;
- (CDSegmentCommand *)segmentContainingAddress:(unsigned long)vmaddr;
- (const void *)pointerFromVMAddr:(unsigned long)vmaddr;
- (const void *)pointerFromVMAddr:(unsigned long)vmaddr segmentName:(NSString *)aSegmentName;
- (NSString *)stringFromVMAddr:(unsigned long)vmaddr;
- (const void *)bytes;
- (const void *)bytesAtOffset:(unsigned long)offset;
- (NSString *)importBaseName;
@end