diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -1456,9 +1456,13 @@ major_version = info.major_version; minor_version = info.minor_version; patch_version = info.patch_version; + // MachProcess::DeploymentInfo has a bool operator to tell whether we have + // set the platform. If that's not true, don't report out the platform: + if (!info) + return {}; return procSP->GetPlatformString(info.platform); } - return nullptr; + return {}; } // Get the current shared library information for a process. Only return