New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KSCrashReportFilterAppleFmt now shows correct architecture in header and libraries list (arm64e) #415
Conversation
@kstenerud Could you review this please? |
@kstenerud @nickh-apadmi Could you take a look at this please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @nacho4d, thanks for your PR. Sorry for a delay. If possible, could you address several comments I left?
//NSString* isBaseImage = (path && [executablePath isEqualToString:path]) ? @"+" : @" "; | ||
NSString* isBaseImage = @""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this argument from format instead of using ""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will fix this!
NSDictionary* system = [self systemReport:report]; | ||
NSString* executablePath = [system objectForKey:@KSCrashField_ExecutablePath]; | ||
//NSDictionary* system = [self systemReport:report]; | ||
//NSString* executablePath = [system objectForKey:@KSCrashField_ExecutablePath]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove it instead of commenting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will fix this!
// In Apple platforms we can use this nice function to get the name of a particular architecture | ||
const NXArchInfo* info = NXGetArchInfoFromCpuType(majorCode, minorCode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should #ifdef __APPLE__
be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will fix this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for looking at my PR. I agree on all comments. I will try to fix this this week.
// In Apple platforms we can use this nice function to get the name of a particular architecture | ||
const NXArchInfo* info = NXGetArchInfoFromCpuType(majorCode, minorCode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will fix this!
NSDictionary* system = [self systemReport:report]; | ||
NSString* executablePath = [system objectForKey:@KSCrashField_ExecutablePath]; | ||
//NSDictionary* system = [self systemReport:report]; | ||
//NSString* executablePath = [system objectForKey:@KSCrashField_ExecutablePath]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will fix this!
//NSString* isBaseImage = (path && [executablePath isEqualToString:path]) ? @"+" : @" "; | ||
NSString* isBaseImage = @""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will fix this!
…. Various minor aesthetics changes to resemble better Apple crash reports as Xcode12.
@bamx23 I have fixed all comments! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the comments and for the contribution!
List of changes:
Fixes AppleFormatReport binary Images arch is wrong? #403 architecture name in header and list of loaded libraries are now correct. See I am fixing method
-[KSCrashReportFilterAppleFmt CPUType:isSystemInfoHeader:]
and-[KSCrashReportFilterAppleFmt CPUArchForMajor: minor:].
In one case I use NXGetArchInfoFromCpuType as that is the reliable way to get architecture names from major and minor cpu types.Removed various #ifdef CPU_TYPE_ARM64 because now a days that is always defined in system frameworks. It improves source readability.
Various minor aesthetic fixes to resemble better Apple crash reports:
After this fix you can see there very few differences between KSCrash report and Apple crash report (Xcode12.5.1)