This is an archive of the discontinued LLVM Phabricator instance.

Don't emit a bunch of spurious "Unknown platform 0" warnings from debugserver
ClosedPublic

Authored by jingham on May 31 2023, 5:40 PM.

Details

Summary

The code that was trying to get the platform string was passing the MachProcess::DeploymentInfo.platform to GetPlatformString w/o checking first whether that load command actually provided a platform number. DeploymentInfo already had a bool operator that checked if the platform had been set, so just check that first before calling GetPlatformString. NFC except a little less spam in the debugserver log output.

Diff Detail

Event Timeline

jingham created this revision.May 31 2023, 5:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 5:40 PM
jingham requested review of this revision.May 31 2023, 5:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2023, 5:40 PM
jasonmolenda accepted this revision.May 31 2023, 5:40 PM

Ah good catch, thanks.

This revision is now accepted and ready to land.May 31 2023, 5:40 PM