Skip to content

Commit eda8f5c

Browse files
committed
Getting rid of speedyDelivery, profiling shows that it is no longer needed
1 parent b488587 commit eda8f5c

23 files changed

+505
-1137
lines changed

otx.xcodeproj/project.pbxproj

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 44;
6+
objectVersion = 46;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -98,10 +98,8 @@
9898
2578336E0D4C61EA00E05A06 /* List64Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = List64Utils.h; path = source/Categories/List64Utils.h; sourceTree = "<group>"; };
9999
257833750D4C62FD00E05A06 /* Arch64Specifics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Arch64Specifics.m; path = source/Categories/Arch64Specifics.m; sourceTree = "<group>"; };
100100
257833760D4C62FD00E05A06 /* Arch64Specifics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Arch64Specifics.h; path = source/Categories/Arch64Specifics.h; sourceTree = "<group>"; };
101-
2578337C0D4C649500E05A06 /* Optimizations64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Optimizations64.h; path = source/Optimizations64.h; sourceTree = "<group>"; };
102101
25924A880D4D670C0050AA16 /* Exe32Processor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Exe32Processor.m; path = source/Processors/Exe32Processor.m; sourceTree = "<group>"; };
103102
25924A890D4D670C0050AA16 /* Exe32Processor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Exe32Processor.h; path = source/Processors/Exe32Processor.h; sourceTree = "<group>"; };
104-
25924B380D4D71620050AA16 /* Optimizations32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Optimizations32.h; path = source/Optimizations32.h; sourceTree = "<group>"; };
105103
25924BF90D4D88C90050AA16 /* Searchers64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Searchers64.m; path = source/Categories/Searchers64.m; sourceTree = "<group>"; };
106104
25924BFA0D4D88C90050AA16 /* Searchers64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Searchers64.h; path = source/Categories/Searchers64.h; sourceTree = "<group>"; };
107105
25A62EFA0C38A7C500B08D38 /* Prefs Output Icon.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "Prefs Output Icon.tif"; path = "images/Prefs Output Icon.tif"; sourceTree = "<group>"; };
@@ -120,7 +118,6 @@
120118
E13539900A68185500CBDDE5 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = source/AppController.h; sourceTree = "<group>"; };
121119
E145F6D10B437F5900615A16 /* SmoothViewAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SmoothViewAnimation.h; path = source/SmoothViewAnimation.h; sourceTree = "<group>"; };
122120
E145F6D20B437F5900615A16 /* SmoothViewAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SmoothViewAnimation.m; path = source/SmoothViewAnimation.m; sourceTree = "<group>"; };
123-
E16222240A4F80F4007ECB26 /* Optimizations.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Optimizations.h; path = source/Optimizations.h; sourceTree = "<group>"; };
124121
E182007009AE4CD800584B07 /* AppController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = AppController.m; path = source/AppController.m; sourceTree = "<group>"; wrapsLines = 0; };
125122
E1978C6B0AC603A40096EE62 /* English */ = {isa = PBXFileReference; lastKnownFileType = folder; name = English; path = English.lproj/Help; sourceTree = "<group>"; };
126123
E1AD98A40B57311B00E56D96 /* DropBox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = DropBox.h; path = source/DropBox.h; sourceTree = "<group>"; };
@@ -251,9 +248,6 @@
251248
children = (
252249
2524F42F0E94A8ED008C1C42 /* ObjcSwap.h */,
253250
E13539820A6817C700CBDDE5 /* ObjcSwap.c */,
254-
E16222240A4F80F4007ECB26 /* Optimizations.h */,
255-
25924B380D4D71620050AA16 /* Optimizations32.h */,
256-
2578337C0D4C649500E05A06 /* Optimizations64.h */,
257251
E1F483530B38DB4200CECE18 /* SharedDefs.h */,
258252
E1167F1C09C8086900E7398D /* StolenDefs.h */,
259253
E13539810A68178D00CBDDE5 /* SyscallStrings.h */,
@@ -398,8 +392,11 @@
398392
/* Begin PBXProject section */
399393
29B97313FDCFA39411CA2CEA /* Project object */ = {
400394
isa = PBXProject;
395+
attributes = {
396+
LastUpgradeCheck = 0420;
397+
};
401398
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "otx" */;
402-
compatibilityVersion = "Xcode 3.0";
399+
compatibilityVersion = "Xcode 3.2";
403400
developmentRegion = English;
404401
hasScannedForEncodings = 1;
405402
knownRegions = (
@@ -532,7 +529,6 @@
532529
"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
533530
);
534531
GCC_DYNAMIC_NO_PIC = NO;
535-
GCC_ENABLE_FIX_AND_CONTINUE = NO;
536532
GCC_MODEL_TUNING = G5;
537533
GCC_PREFIX_HEADER = otx_Prefix.pch;
538534
INFOPLIST_FILE = Info.plist;
@@ -564,7 +560,7 @@
564560
isa = XCBuildConfiguration;
565561
buildSettings = {
566562
ALWAYS_SEARCH_USER_PATHS = YES;
567-
ARCHS = "$(NATIVE_ARCH)";
563+
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
568564
GCC_CW_ASM_SYNTAX = NO;
569565
GCC_C_LANGUAGE_STANDARD = c99;
570566
GCC_DYNAMIC_NO_PIC = YES;
@@ -584,8 +580,7 @@
584580
GCC_WARN_UNUSED_VARIABLE = YES;
585581
MACOSX_DEPLOYMENT_TARGET = 10.4;
586582
OTHER_CFLAGS = "-falign-loops=16";
587-
PREBINDING = NO;
588-
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
583+
SDKROOT = macosx;
589584
WARNING_CFLAGS = "-wall";
590585
};
591586
name = Debug;
@@ -594,10 +589,7 @@
594589
isa = XCBuildConfiguration;
595590
buildSettings = {
596591
ALWAYS_SEARCH_USER_PATHS = YES;
597-
ARCHS = (
598-
ppc,
599-
i386,
600-
);
592+
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
601593
GCC_CW_ASM_SYNTAX = NO;
602594
GCC_C_LANGUAGE_STANDARD = c99;
603595
GCC_DYNAMIC_NO_PIC = YES;
@@ -616,8 +608,7 @@
616608
GCC_WARN_UNUSED_VARIABLE = YES;
617609
MACOSX_DEPLOYMENT_TARGET = 10.4;
618610
OTHER_CFLAGS = "-falign-loops=16";
619-
PREBINDING = NO;
620-
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
611+
SDKROOT = macosx;
621612
};
622613
name = Release;
623614
};
@@ -626,7 +617,6 @@
626617
buildSettings = {
627618
COPY_PHASE_STRIP = NO;
628619
GCC_DYNAMIC_NO_PIC = YES;
629-
GCC_ENABLE_FIX_AND_CONTINUE = NO;
630620
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
631621
GCC_MODEL_TUNING = G5;
632622
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -637,7 +627,6 @@
637627
);
638628
INSTALL_PATH = "$(HOME)/bin";
639629
OTHER_CFLAGS = "-falign-loops=16";
640-
PREBINDING = NO;
641630
PRODUCT_NAME = otx;
642631
};
643632
name = Debug;
@@ -647,15 +636,13 @@
647636
buildSettings = {
648637
COPY_PHASE_STRIP = YES;
649638
GCC_DYNAMIC_NO_PIC = YES;
650-
GCC_ENABLE_FIX_AND_CONTINUE = NO;
651639
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
652640
GCC_MODEL_TUNING = G5;
653641
GCC_PRECOMPILE_PREFIX_HEADER = YES;
654642
GCC_PREFIX_HEADER = otx_Prefix.pch;
655643
GCC_PREPROCESSOR_DEFINITIONS = OTX_CLI;
656644
INSTALL_PATH = "$(HOME)/bin";
657645
OTHER_CFLAGS = "-falign-loops=16";
658-
PREBINDING = NO;
659646
PRODUCT_NAME = otx;
660647
};
661648
name = Release;

source/Categories/Objc64Accessors.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212

1313
@interface Exe64Processor(ObjcAccessors)
1414

15-
- (BOOL)getObjcClassPtr: (objc2_class_t**)outClass
15+
- (BOOL)getObjcClassPtr: (objc2_64_class_t**)outClass
1616
fromMethod: (UInt64)inAddress;
1717
- (BOOL)getObjcMethod: (Method64Info**)outMI
1818
fromAddress: (UInt64)inAddress;
19-
- (BOOL)getObjcMethodList: (objc2_method_list_t*)outList
20-
methods: (objc2_method_t**)outMethods
19+
- (BOOL)getObjcMethodList: (objc2_64_method_list_t*)outList
20+
methods: (objc2_64_method_t**)outMethods
2121
fromAddress: (UInt64)inAddress;
2222
- (BOOL)getObjcDescription: (char**)outDescription
2323
fromObject: (const char*)inObject
2424
type: (UInt8)inType;
25-
- (BOOL)getObjcClass: (objc2_class_t*)outClass
25+
- (BOOL)getObjcClass: (objc2_64_class_t*)outClass
2626
fromName: (const char*)inName;
27-
- (BOOL)getObjcClassPtr: (objc2_class_t**)outClassPtr
27+
- (BOOL)getObjcClassPtr: (objc2_64_class_t**)outClassPtr
2828
fromName: (const char*)inName;
29-
- (BOOL)getObjcMetaClass: (objc2_class_t*)outClass
30-
fromClass: (objc2_class_t*)inClass;
29+
- (BOOL)getObjcMetaClass: (objc2_64_class_t*)outClass
30+
fromClass: (objc2_64_class_t*)inClass;
3131

3232
@end

source/Categories/Objc64Accessors.m

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import <Cocoa/Cocoa.h>
1010

1111
#import "Objc64Accessors.h"
12+
#import "Searchers64.h"
1213

1314
@implementation Exe64Processor(Objc64Accessors)
1415

@@ -18,14 +19,13 @@ @implementation Exe64Processor(Objc64Accessors)
1819
// is called each time a new function is detected. If that function is known
1920
// to be an Obj-C method, it's class is returned. Otherwise this returns NULL.
2021

21-
- (BOOL)getObjcClassPtr: (objc2_class_t**)outClass
22+
- (BOOL)getObjcClassPtr: (objc2_64_class_t**)outClass
2223
fromMethod: (UInt64)inAddress;
2324
{
2425
*outClass = NULL;
2526

2627
Method64Info* theInfo = NULL;
27-
28-
FindClassMethodByAddress(&theInfo, inAddress);
28+
[self findClassMethod:&theInfo byAddress:inAddress];
2929

3030
if (theInfo)
3131
*outClass = &theInfo->oc_class;
@@ -41,13 +41,12 @@ - (BOOL)getObjcMethod: (Method64Info**)outMI
4141
fromAddress: (UInt64)inAddress;
4242
{
4343
*outMI = NULL;
44-
45-
FindClassMethodByAddress(outMI, inAddress);
44+
[self findClassMethod:outMI byAddress:inAddress];
4645

4746
/* if (*outMI)
4847
return YES;
4948
50-
FindCatMethodByAddress(outMI, inAddress);*/
49+
[self findCatMethod:outMI byAddress:inAddress];*/
5150

5251
return (*outMI != NULL);
5352
}
@@ -56,8 +55,8 @@ - (BOOL)getObjcMethod: (Method64Info**)outMI
5655
// ----------------------------------------------------------------------------
5756
// Removed the truncation flag. 'left' is no longer used by the caller.
5857

59-
- (BOOL)getObjcMethodList: (objc2_method_list_t*)outList
60-
methods: (objc2_method_t**)outMethods
58+
- (BOOL)getObjcMethodList: (objc2_64_method_list_t*)outList
59+
methods: (objc2_64_method_t**)outMethods
6160
fromAddress: (UInt64)inAddress;
6261
{
6362
/* uint32_t left, i;
@@ -131,7 +130,7 @@ - (BOOL)getObjcDescription: (char**)outDescription
131130

132131
case OCStrObjectType:
133132
{
134-
objc2_string_object ocString = *(objc2_string_object*)inObject;
133+
objc2_64_string_object ocString = *(objc2_64_string_object*)inObject;
135134

136135
if (ocString.length == 0)
137136
break;
@@ -154,7 +153,7 @@ - (BOOL)getObjcDescription: (char**)outDescription
154153
if (iSwapped)
155154
theValue = OSSwapInt64(theValue);
156155

157-
*outDescription = GetPointer(theValue, NULL);
156+
*outDescription = [self getPointer:theValue type:NULL];
158157

159158
return (*outDescription != NULL);
160159
}
@@ -165,54 +164,54 @@ - (BOOL)getObjcDescription: (char**)outDescription
165164
// categories to classes. We have 2 pointers to the same name, so pointer
166165
// equality is sufficient.
167166

168-
- (BOOL)getObjcClass: (objc2_class_t*)outClass
167+
- (BOOL)getObjcClass: (objc2_64_class_t*)outClass
169168
fromName: (const char*)inName;
170169
{
171170
uint32_t i;
172171
UInt64 namePtr;
173172

174173
for (i = 0; i < iNumClassMethodInfos; i++)
175174
{
176-
objc2_class_ro_t* roData = (objc2_class_ro_t*)(iDataSect.contents +
175+
objc2_64_class_ro_t* roData = (objc2_64_class_ro_t*)(iDataSect.contents +
177176
(uintptr_t)(iClassMethodInfos[i].oc_class.data - iDataSect.s.addr));
178177

179178
namePtr = roData->name;
180179

181180
if (iSwapped)
182181
namePtr = OSSwapInt64(namePtr);
183182

184-
if (GetPointer(namePtr, NULL) == inName)
183+
if ([self getPointer:namePtr type:NULL] == inName)
185184
{
186185
*outClass = iClassMethodInfos[i].oc_class;
187186
return YES;
188187
}
189188
}
190189

191-
*outClass = (objc2_class_t){0};
190+
*outClass = (objc2_64_class_t){0};
192191
return NO;
193192
}
194193

195194
// getObjcClassPtr:fromName:
196195
// ----------------------------------------------------------------------------
197196
// Same as above, but returns a pointer.
198197

199-
- (BOOL)getObjcClassPtr: (objc2_class_t**)outClassPtr
198+
- (BOOL)getObjcClassPtr: (objc2_64_class_t**)outClassPtr
200199
fromName: (const char*)inName;
201200
{
202201
uint32_t i;
203202
UInt64 namePtr;
204203

205204
for (i = 0; i < iNumClassMethodInfos; i++)
206205
{
207-
objc2_class_ro_t* roData = (objc2_class_ro_t*)(iDataSect.contents +
206+
objc2_64_class_ro_t* roData = (objc2_64_class_ro_t*)(iDataSect.contents +
208207
(uintptr_t)(iClassMethodInfos[i].oc_class.data - iDataSect.s.addr));
209208

210209
namePtr = roData->name;
211210

212211
if (iSwapped)
213212
namePtr = OSSwapInt64(namePtr);
214213

215-
if (GetPointer(namePtr, NULL) == inName)
214+
if ([self getPointer:namePtr type:NULL] == inName)
216215
{
217216
*outClassPtr = &iClassMethodInfos[i].oc_class;
218217
return YES;
@@ -226,8 +225,8 @@ - (BOOL)getObjcClassPtr: (objc2_class_t**)outClassPtr
226225
// getObjcMetaClass:fromClass:
227226
// ----------------------------------------------------------------------------
228227

229-
- (BOOL)getObjcMetaClass: (objc2_class_t*)outClass
230-
fromClass: (objc2_class_t*)inClass;
228+
- (BOOL)getObjcMetaClass: (objc2_64_class_t*)outClass
229+
fromClass: (objc2_64_class_t*)inClass;
231230
{
232231
/* if ((uint32_t)inClass->isa >= iMetaClassSect.s.addr &&
233232
(uint32_t)inClass->isa < iMetaClassSect.s.addr + iMetaClassSect.s.size)

source/Categories/ObjcAccessors.m

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import <Cocoa/Cocoa.h>
1010

1111
#import "ObjcAccessors.h"
12+
#import "Searchers.h"
1213

1314
@implementation Exe32Processor(ObjcAccessors)
1415

@@ -24,8 +25,7 @@ - (BOOL)getObjcClassPtr: (objc_class**)outClass
2425
*outClass = NULL;
2526

2627
MethodInfo* theInfo = NULL;
27-
28-
FindClassMethodByAddress(&theInfo, inAddress);
28+
[self findClassMethod:&theInfo byAddress:inAddress];
2929

3030
if (theInfo)
3131
*outClass = &theInfo->oc_class;
@@ -43,8 +43,7 @@ - (BOOL)getObjcCatPtr: (objc_category**)outCat
4343
*outCat = NULL;
4444

4545
MethodInfo* theInfo = NULL;
46-
47-
FindCatMethodByAddress(&theInfo, inAddress);
46+
[self findCatMethod:&theInfo byAddress:inAddress];
4847

4948
if (theInfo)
5049
*outCat = &theInfo->oc_cat;
@@ -61,12 +60,12 @@ - (BOOL)getObjcMethod: (MethodInfo**)outMI
6160
{
6261
*outMI = NULL;
6362

64-
FindClassMethodByAddress(outMI, inAddress);
63+
[self findClassMethod:outMI byAddress:inAddress];
6564

6665
if (*outMI)
6766
return YES;
6867

69-
FindCatMethodByAddress(outMI, inAddress);
68+
[self findCatMethod:outMI byAddress:inAddress];
7069

7170
return (*outMI != NULL);
7271
}
@@ -172,7 +171,7 @@ - (BOOL)getObjcDescription: (char**)outDescription
172171
if (iSwapped)
173172
theValue = OSSwapInt32(theValue);
174173

175-
*outDescription = GetPointer(theValue, NULL);
174+
*outDescription = [self getPointer:theValue type:NULL];
176175

177176
return (*outDescription != NULL);
178177
}
@@ -288,7 +287,7 @@ - (BOOL)getObjcClass: (objc_class*)outClass
288287
if (iSwapped)
289288
namePtr = OSSwapInt32(namePtr);
290289

291-
if (GetPointer(namePtr, NULL) == inName)
290+
if ([self getPointer:namePtr type:NULL] == inName)
292291
{
293292
*outClass = iClassMethodInfos[i].oc_class;
294293
return YES;
@@ -316,7 +315,7 @@ - (BOOL)getObjcClassPtr: (objc_class**)outClassPtr
316315
if (iSwapped)
317316
namePtr = OSSwapInt32(namePtr);
318317

319-
if (GetPointer(namePtr, NULL) == inName)
318+
if ([self getPointer:namePtr type:NULL] == inName)
320319
{
321320
*outClassPtr = &iClassMethodInfos[i].oc_class;
322321
return YES;

0 commit comments

Comments
 (0)