summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/IRDynamicChecks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/IRDynamicChecks.cpp')
-rw-r--r--lldb/source/Expression/IRDynamicChecks.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/source/Expression/IRDynamicChecks.cpp b/lldb/source/Expression/IRDynamicChecks.cpp
index 17a91ee8897..1d6637dd033 100644
--- a/lldb/source/Expression/IRDynamicChecks.cpp
+++ b/lldb/source/Expression/IRDynamicChecks.cpp
@@ -74,6 +74,25 @@ DynamicCheckerFunctions::Install(Stream &error_stream,
return true;
}
+bool
+DynamicCheckerFunctions::DoCheckersExplainStop (lldb::addr_t addr, Stream &message)
+{
+ // FIXME: We have to get the checkers to know why they scotched the call in more detail,
+ // so we can print a better message here.
+ if (m_valid_pointer_check.get() != NULL && m_valid_pointer_check->ContainsAddress(addr))
+ {
+ message.Printf ("Attempted to dereference an invalid pointer.");
+ return true;
+ }
+ else if (m_objc_object_check.get() != NULL && m_objc_object_check->ContainsAddress(addr))
+ {
+ message.Printf ("Attempted to dereference an invalid ObjC Object or send it an unrecognized selector");
+ return true;
+ }
+ return false;
+}
+
+
static std::string
PrintValue(llvm::Value *V, bool truncate = false)
{
OpenPOWER on IntegriCloud