Author: emaste
Date: Wed Oct  2 10:52:33 2013
New Revision: 191837

URL: http://llvm.org/viewvc/llvm-project?rev=191837&view=rev
Log:
Avoid crash in unwinder if ABI isn't available

Modified:
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=191837&r1=191836&r2=191837&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Wed Oct  
2 10:52:33 2013
@@ -620,6 +620,10 @@ RegisterContextLLDB::GetFullUnwindPlanFo
         arch_default_unwind_plan_sp.reset (new UnwindPlan 
(lldb::eRegisterKindGeneric));
         abi->CreateDefaultUnwindPlan(*arch_default_unwind_plan_sp);
     }
+    else
+    {
+        UnwindLogMsgVerbose ("unable to get ABI for default UnwindPlan");
+    }
 
     bool behaves_like_zeroth_frame = false;
     if (IsFrameZero ()
@@ -759,7 +763,8 @@ RegisterContextLLDB::GetFullUnwindPlanFo
     }
 
     // If nothing else, use the architectural default UnwindPlan and hope that 
does the job.
-    UnwindLogMsgVerbose ("frame uses %s for full UnwindPlan", 
arch_default_unwind_plan_sp->GetSourceName().GetCString());
+    if (arch_default_unwind_plan_sp)
+        UnwindLogMsgVerbose ("frame uses %s for full UnwindPlan", 
arch_default_unwind_plan_sp->GetSourceName().GetCString());
     return arch_default_unwind_plan_sp;
 }
 


_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to