summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-01-24 23:33:19 +0000
committerJim Ingham <jingham@apple.com>2013-01-24 23:33:19 +0000
commitd30df9e24c89aad7cfb21508213e15d79bb7a6e3 (patch)
tree2756a6805a374fc9cd332cc0fb4b02794916d2b7
parent53616ad42da8da74e0104e23965f37261f7ebd3c (diff)
downloadbcm5719-llvm-d30df9e24c89aad7cfb21508213e15d79bb7a6e3.tar.gz
bcm5719-llvm-d30df9e24c89aad7cfb21508213e15d79bb7a6e3.zip
Don't listen for EXC_RESOURCE exceptions, those should really be handled by the system
handler. Also put in string translations for a couple of exceptions we were missing. llvm-svn: 173390
-rw-r--r--lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp6
-rw-r--r--lldb/tools/debugserver/source/MacOSX/MachException.cpp13
2 files changed, 18 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index 5999e13fb70..60570b5b97d 100644
--- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -210,6 +210,12 @@ StopInfoMachException::GetDescription ()
case 10:
exc_desc = "EXC_CRASH";
break;
+ case 11:
+ exc_desc = "EXC_RESOURCE";
+ break;
+ case 12:
+ exc_desc = "EXC_GUARD";
+ break;
}
StreamString strm;
diff --git a/lldb/tools/debugserver/source/MacOSX/MachException.cpp b/lldb/tools/debugserver/source/MacOSX/MachException.cpp
index fd65104ddf2..1af92fb9921 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachException.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachException.cpp
@@ -480,6 +480,17 @@ MachException::Data::Dump() const
EXC_MASK_RPC_ALERT | \
EXC_MASK_MACHINE)
+// Don't listen for EXC_RESOURCE, it should really get handled by the system handler.
+
+#ifndef EXC_RESOURCE
+#define EXC_RESOURCE 11
+#endif
+
+#ifndef EXC_MASK_RESOURCE
+#define EXC_MASK_RESOURCE (1 << EXC_RESOURCE)
+#endif
+
+#define LLDB_EXC_MASK (EXC_MASK_ALL & ~EXC_MASK_RESOURCE)
kern_return_t
MachException::PortInfo::Save (task_t task)
@@ -490,7 +501,7 @@ MachException::PortInfo::Save (task_t task)
// and back off to just what is supported on the current system
DNBError err;
- mask = EXC_MASK_ALL;
+ mask = LLDB_EXC_MASK;
count = (sizeof (ports) / sizeof (ports[0]));
err = ::task_get_exception_ports (task, mask, masks, &count, ports, behaviors, flavors);
OpenPOWER on IntegriCloud