[Lldb-commits] [PATCH] D151861: Don't emit a bunch of spurious "Unknown platform 0" warnings from debugserver
    Jim Ingham via Phabricator via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Thu Jun  1 10:24:15 PDT 2023
    
    
  
This revision was automatically updated to reflect the committed changes.
Closed by commit rG267a4cda8248: Prevent some spurious error messages in the debugserver logs. (authored by jingham).
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151861/new/
https://reviews.llvm.org/D151861
Files:
  lldb/tools/debugserver/source/DNB.cpp
Index: lldb/tools/debugserver/source/DNB.cpp
===================================================================
--- lldb/tools/debugserver/source/DNB.cpp
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151861.527485.patch
Type: text/x-patch
Size: 706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230601/e51feeb9/attachment.bin>
    
    
More information about the lldb-commits
mailing list