[Lldb-commits] [lldb] r184474 - Don't go to the trouble of trying to figure out the implementation function for selectors sent

Jim Ingham jingham at apple.com
Thu Jun 20 14:36:52 PDT 2013


Author: jingham
Date: Thu Jun 20 16:36:52 2013
New Revision: 184474

URL: http://llvm.org/viewvc/llvm-project?rev=184474&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp?rev=184474&r1=184473&r2=184474&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp Thu Jun 20 16:36:52 2013
@@ -917,6 +917,14 @@ AppleObjCTrampolineHandler::GetStepThrou
         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();





More information about the lldb-commits mailing list