[Lldb-commits] [lldb] r368496 - Detects whether RESOURCE_TYPE_IO is defined.

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


Author: hhb
Date: Fri Aug  9 15:47:46 2019
New Revision: 368496

URL: http://llvm.org/viewvc/llvm-project?rev=368496&view=rev
Log:
Detects whether RESOURCE_TYPE_IO is defined.

Summary: This fixes lldb build on macOS SDK prior to 10.12.

Reviewers: JDevlieghere

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D66034

Modified:
    lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp?rev=368496&r1=368495&r2=368496&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp Fri Aug  9 15:47:46 2019
@@ -313,6 +313,8 @@ const char *StopInfoMachException::GetDe
           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 @@ const char *StopInfoMachException::GetDe
           snprintf(subcode_desc_buf, sizeof(subcode_desc_buf), "%d MB",
             (int)EXC_RESOURCE_IO_OBSERVED(m_exc_subcode));;
           break;
+#endif
         }
       }
 #endif




More information about the lldb-commits mailing list