summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-06-20 21:36:52 +0000
committerJim Ingham <jingham@apple.com>2013-06-20 21:36:52 +0000
commitc575a37ac94e6a2d6a32b902cb428631a94a2273 (patch)
tree52d54a2b188fce795a160b2325a872c99ff59a19
parentdba725c0bef93923437d4c6d5ab75896d604c4ba (diff)
downloadbcm5719-llvm-c575a37ac94e6a2d6a32b902cb428631a94a2273.tar.gz
bcm5719-llvm-c575a37ac94e6a2d6a32b902cb428631a94a2273.zip
Don't go to the trouble of trying to figure out the implementation function for selectors sent
to nil objects, it won't work anyway. llvm-svn: 184474
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
index df88f3a011b..a76326eba19 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
@@ -917,6 +917,14 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto
bool success = abi->GetArgumentValues (thread, argument_values);
if (!success)
return ret_plan_sp;
+
+ lldb::addr_t obj_addr = argument_values.GetValueAtIndex(obj_index)->GetScalar().ULongLong();
+ if (obj_addr == 0x0)
+ {
+ if (log)
+ log->Printf("Asked to step to dispatch to nil object, returning empty plan.");
+ return ret_plan_sp;
+ }
ExecutionContext exe_ctx (thread.shared_from_this());
Process *process = exe_ctx.GetProcessPtr();
OpenPOWER on IntegriCloud