From ba0ae494b5cee3aeeb76c368a500963e4c426160 Mon Sep 17 00:00:00 2001 From: Guillermo Ignacio Enriquez Gutierrez Date: Sat, 25 Nov 2023 10:31:38 +0900 Subject: [PATCH] Remove comments from apple format --- .../Reporting/Filters/KSCrashReportFilterAppleFmt.m | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/KSCrash/Reporting/Filters/KSCrashReportFilterAppleFmt.m b/Source/KSCrash/Reporting/Filters/KSCrashReportFilterAppleFmt.m index 448fb63e..ca75acbf 100644 --- a/Source/KSCrash/Reporting/Filters/KSCrashReportFilterAppleFmt.m +++ b/Source/KSCrash/Reporting/Filters/KSCrashReportFilterAppleFmt.m @@ -265,11 +265,13 @@ - (NSString*) CPUType:(NSString*) CPUArch isSystemInfoHeader:(BOOL) isSystemInfo - (NSString*) CPUArchForMajor:(cpu_type_t) majorCode minor:(cpu_subtype_t) minorCode { - // In Apple platforms we can use this nice function to get the name of a particular architecture +#ifdef __APPLE__ + // In Apple platforms we can use this function to get the name of a particular architecture const NXArchInfo* info = NXGetArchInfoFromCpuType(majorCode, minorCode); if (info && info->name) { return [[NSString alloc] initWithUTF8String: info->name]; } +#endif switch(majorCode) { @@ -504,8 +506,6 @@ - (NSString*) binaryImagesStringForReport:(NSDictionary*) report NSMutableString* str = [NSMutableString string]; NSArray* binaryImages = [self binaryImagesReport:report]; - //NSDictionary* system = [self systemReport:report]; - //NSString* executablePath = [system objectForKey:@KSCrashField_ExecutablePath]; [str appendString:@"\nBinary Images:\n"]; if(binaryImages) @@ -530,13 +530,10 @@ - (NSString*) binaryImagesStringForReport:(NSDictionary*) report NSString* path = [image objectForKey:@KSCrashField_Name]; NSString* name = [path lastPathComponent]; NSString* uuid = [self toCompactUUID:[image objectForKey:@KSCrashField_UUID]]; - //NSString* isBaseImage = (path && [executablePath isEqualToString:path]) ? @"+" : @" "; - NSString* isBaseImage = @""; NSString* arch = [self CPUArchForMajor:cpuType minor:cpuSubtype]; - [str appendFormat:FMT_PTR_RJ @" - " FMT_PTR_RJ @" %@%@ %@ <%@> %@\n", + [str appendFormat:FMT_PTR_RJ @" - " FMT_PTR_RJ @" %@ %@ <%@> %@\n", imageAddr, imageAddr + imageSize - 1, - isBaseImage, name, arch, uuid,