Add placeholder for types that start with A, for _Atomic() types.
[class-dump.git] / Source / CDLCSubFramework.m
blobb408962fbf3eff7eb5644a9e8bd445137f502372
1 // -*- mode: ObjC -*-
3 //  This file is part of class-dump, a utility for examining the Objective-C segment of Mach-O files.
4 //  Copyright (C) 1997-2019 Steve Nygard.
6 #import "CDLCSubFramework.h"
8 @implementation CDLCSubFramework
10     struct sub_framework_command _command;
11     NSString *_name;
14 - (id)initWithDataCursor:(CDMachOFileDataCursor *)cursor;
16     if ((self = [super initWithDataCursor:cursor])) {
17         _command.cmd     = [cursor readInt32];
18         _command.cmdsize = [cursor readInt32];
19         
20         uint32_t strOffset = [cursor readInt32];
21         NSParameterAssert(strOffset == 12);
22         
23         NSUInteger length = _command.cmdsize - sizeof(_command);
24         //NSLog(@"expected length: %u", length);
25         
26         _name = [cursor readStringOfLength:length encoding:NSASCIIStringEncoding];
27         //NSLog(@"name: %@", _name);
28     }
30     return self;
33 #pragma mark -
35 - (uint32_t)cmd;
37     return _command.cmd;
40 - (uint32_t)cmdsize;
42     return _command.cmdsize;
45 @end