OLD | NEW |
(Empty) | |
| 1 // -*- mode: ObjC -*- |
| 2 |
| 3 // This file is part of class-dump, a utility for examining the Objective-C seg
ment of Mach-O files. |
| 4 // Copyright (C) 1997-1998, 2000-2001, 2004-2010 Steve Nygard. |
| 5 |
| 6 #import <Foundation/Foundation.h> |
| 7 |
| 8 #include <mach-o/arch.h> |
| 9 #include <mach-o/loader.h> |
| 10 #include <mach-o/fat.h> |
| 11 #include <mach-o/swap.h> |
| 12 #include <mach/machine.h> // For cpu_type_t, cpu_subtype_t |
| 13 |
| 14 typedef struct { |
| 15 cpu_type_t cputype; |
| 16 cpu_subtype_t cpusubtype; |
| 17 } CDArch; |
| 18 |
| 19 @class CDMachOFile, CDSearchPathState; |
| 20 |
| 21 extern NSString *CDNameForCPUType(cpu_type_t cputype, cpu_subtype_t cpusubtype); |
| 22 extern CDArch CDArchFromName(NSString *name); |
| 23 extern BOOL CDArchUses64BitABI(CDArch arch); |
| 24 |
| 25 @interface CDFile : NSObject |
| 26 { |
| 27 NSString *filename; |
| 28 NSData *data; |
| 29 NSUInteger offset; // Or perhaps dataOffset, archiveOffset |
| 30 CDSearchPathState *searchPathState; |
| 31 } |
| 32 |
| 33 // Returns CDFatFile, CDMachO32File, or CDMachO64File. |
| 34 + (id)fileWithData:(NSData *)someData filename:(NSString *)aFilename searchPathS
tate:(CDSearchPathState *)aSearchPathState; |
| 35 + (id)fileWithData:(NSData *)someData offset:(NSUInteger)anOffset filename:(NSSt
ring *)aFilename searchPathState:(CDSearchPathState *)aSearchPathState; |
| 36 |
| 37 - (id)initWithData:(NSData *)someData offset:(NSUInteger)anOffset filename:(NSSt
ring *)aFilename searchPathState:(CDSearchPathState *)aSearchPathState; |
| 38 - (void)dealloc; |
| 39 |
| 40 - (NSString *)filename; |
| 41 |
| 42 - (NSData *)data; |
| 43 |
| 44 - (NSUInteger)offset; |
| 45 - (void)setOffset:(NSUInteger)newOffset; |
| 46 |
| 47 - (CDSearchPathState *)searchPathState; |
| 48 |
| 49 - (BOOL)bestMatchForLocalArch:(CDArch *)archPtr; |
| 50 - (CDMachOFile *)machOFileWithArch:(CDArch)arch; |
| 51 |
| 52 @end |
OLD | NEW |