summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2019-08-09 22:47:46 +0000
committerHaibo Huang <hhb@google.com>2019-08-09 22:47:46 +0000
commita20a59d87ab6410eb4a4fb7eec04a561bb8f3f12 (patch)
tree2be8db5e6bbec05991e44efb4ca8b50dc31d1d02 /lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
parent0e497d1554a915ace538dc08f03f1661aab8bdf7 (diff)
downloadbcm5719-llvm-a20a59d87ab6410eb4a4fb7eec04a561bb8f3f12.tar.gz
bcm5719-llvm-a20a59d87ab6410eb4a4fb7eec04a561bb8f3f12.zip
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 llvm-svn: 368496
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index 588015a51ef..ea0aab4829b 100644
--- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -313,6 +313,8 @@ const char *StopInfoMachException::GetDescription() {
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::GetDescription() {
snprintf(subcode_desc_buf, sizeof(subcode_desc_buf), "%d MB",
(int)EXC_RESOURCE_IO_OBSERVED(m_exc_subcode));;
break;
+#endif
}
}
#endif
OpenPOWER on IntegriCloud