[lldb-dev] avoid crash in unwinder if abi wasn't set

Carlo Kok ck at remobjects.com
Wed Oct 2 07:11:19 PDT 2013


I was trying to see how far I could get debugging with arm64 (not far 
yet) but the code in attach patch catch the abi not existing yet, 
instead of crashing in GetSourceName() it just logs that there's no 
unwind frame. If oke I'll commit.
-- 
Carlo Kok
RemObjects Software
-------------- next part --------------
Index: C:/Projects/oxygene-nougat-llvm/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
===================================================================
--- C:/Projects/oxygene-nougat-llvm/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp	(revision 191382)
+++ C:/Projects/oxygene-nougat-llvm/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp	(working copy)
@@ -759,7 +759,10 @@
     }
 
     // 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());
+    else 
+      UnwindLogMsgVerbose ("no unwind plan for frame! in GetFullUnwindPlanForFrame()");
     return arch_default_unwind_plan_sp;
 }
 


More information about the lldb-dev mailing list