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;
14 - (id)initWithDataCursor:(CDMachOFileDataCursor *)cursor;
16 if ((self = [super initWithDataCursor:cursor])) {
17 _command.cmd = [cursor readInt32];
18 _command.cmdsize = [cursor readInt32];
20 uint32_t strOffset = [cursor readInt32];
21 NSParameterAssert(strOffset == 12);
23 NSUInteger length = _command.cmdsize - sizeof(_command);
24 //NSLog(@"expected length: %u", length);
26 _name = [cursor readStringOfLength:length encoding:NSASCIIStringEncoding];
27 //NSLog(@"name: %@", _name);
42 return _command.cmdsize;