summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2018-11-10 00:25:45 +0000
committerJason Molenda <jmolenda@apple.com>2018-11-10 00:25:45 +0000
commitff6a4edc26b59dca90ec89a3ff5bd8c1ac1e22c7 (patch)
tree1d278122d499c2fd54a3d671adf657d45283e8b1 /lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
parent2ddb2652d9e80538217edf96ea2b03491063fb04 (diff)
downloadbcm5719-llvm-ff6a4edc26b59dca90ec89a3ff5bd8c1ac1e22c7.tar.gz
bcm5719-llvm-ff6a4edc26b59dca90ec89a3ff5bd8c1ac1e22c7.zip
Unbreak the linux bot from the previous commit. Fred needed to use
some of the macros from mach/exc_resource.h to decode EXC_RESOURCE, but that header doesn't exist on non-apple platforms and StopInfoMachException.cpp needs to build on those systems. EXC_RESOURCE won't be decoded when lldb is built on non-darwin systems. llvm-svn: 346573
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index c215519a8e8..49a468423e0 100644
--- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -10,7 +10,11 @@
#include "StopInfoMachException.h"
// C Includes
+
+#if defined(__APPLE__)
+// Needed for the EXC_RESOURCE interpretation macros
#include <kern/exc_resource.h>
+#endif
// C++ Includes
// Other libraries and framework includes
@@ -281,6 +285,7 @@ const char *StopInfoMachException::GetDescription() {
break;
case 11:
exc_desc = "EXC_RESOURCE";
+#if defined(__APPLE__)
{
int resource_type = EXC_RESOURCE_DECODE_RESOURCE_TYPE(m_exc_code);
@@ -320,6 +325,7 @@ const char *StopInfoMachException::GetDescription() {
break;
}
}
+#endif
break;
case 12:
exc_desc = "EXC_GUARD";
OpenPOWER on IntegriCloud