[Lldb-commits] [lldb] r274743 - Try to fix the OSX build with old SDK after r274725

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 7 03:38:06 PDT 2016


Author: tberghammer
Date: Thu Jul  7 05:38:05 2016
New Revision: 274743

URL: http://llvm.org/viewvc/llvm-project?rev=274743&view=rev
Log:
Try to fix the OSX build with old SDK after r274725

Modified:
    lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm?rev=274743&r1=274742&r2=274743&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm Thu Jul  7 05:38:05 2016
@@ -631,8 +631,14 @@ MachProcess::GetMachOInformationFromMemo
             if (ReadMemory (load_cmds_p, sizeof (struct uuid_command), &uuidcmd) == sizeof (struct uuid_command))
                 uuid_copy (inf.uuid, uuidcmd.uuid);
         }
-        if (lc.cmd == LC_VERSION_MIN_IPHONEOS || lc.cmd == LC_VERSION_MIN_MACOSX 
-            || lc.cmd == LC_VERSION_MIN_WATCHOS || lc.cmd == LC_VERSION_MIN_TVOS)
+        bool lc_cmd_known = lc.cmd == LC_VERSION_MIN_IPHONEOS || lc.cmd == LC_VERSION_MIN_MACOSX;
+#if defined(LC_VERSION_MIN_TVOS)
+        lc_cmd_known |= lc.cmd == LC_VERSION_MIN_TVOS;
+#endif
+#if defined(LC_VERSION_MIN_WATCHOS)
+        lc_cmd_known |= lc.cmd == LC_VERSION_MIN_WATCHOS;
+#endif
+        if (lc_cmd_known)
         {
             struct version_min_command vers_cmd;
             if (ReadMemory (load_cmds_p, sizeof (struct version_min_command), &vers_cmd) != sizeof (struct version_min_command))
@@ -647,12 +653,16 @@ MachProcess::GetMachOInformationFromMemo
                 case LC_VERSION_MIN_MACOSX:
                     inf.min_version_os_name = "macosx";
                     break;
+#if defined(LC_VERSION_MIN_TVOS)
                 case LC_VERSION_MIN_TVOS:
                     inf.min_version_os_name = "tvos";
                     break;
+#endif
+#if defined(LC_VERSION_MIN_WATCHOS)
                 case LC_VERSION_MIN_WATCHOS:
                     inf.min_version_os_name = "watchos";
                     break;
+#endif
                 default:
                     return false;
             }




More information about the lldb-commits mailing list