[Lldb-commits] [PATCH] D66034: Detects whether RESOURCE_TYPE_IO is defined.

Haibo Huang via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 9 15:29:17 PDT 2019


hhb created this revision.
hhb added a reviewer: JDevlieghere.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
hhb added a subscriber: kongyi.

This fixes lldb build on macOS SDK prior to 10.12.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D66034

Files:
  lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp


Index: lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
===================================================================
--- lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -313,6 +313,8 @@
           subcode_desc = nullptr;
           subcode_label = "unused";
           break;
+#if defined(RESOURCE_TYPE_IO)
+       // RESOURCE_TYPE_IO is introduced in macOS SDK 10.12.
         case RESOURCE_TYPE_IO:
           exc_desc = "EXC_RESOURCE RESOURCE_TYPE_IO";
           snprintf(code_desc_buf, sizeof(code_desc_buf), "%d MB",
@@ -320,6 +322,7 @@
           snprintf(subcode_desc_buf, sizeof(subcode_desc_buf), "%d MB",
             (int)EXC_RESOURCE_IO_OBSERVED(m_exc_subcode));;
           break;
+#endif
         }
       }
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66034.214465.patch
Type: text/x-patch
Size: 834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190809/d5040ad5/attachment.bin>


More information about the lldb-commits mailing list