[Lldb-commits] [lldb] r161679 - /lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp

Sean Callanan scallanan at apple.com
Fri Aug 10 11:35:24 PDT 2012


Author: spyffe
Date: Fri Aug 10 13:35:24 2012
New Revision: 161679

URL: http://llvm.org/viewvc/llvm-project?rev=161679&view=rev
Log:
Fixed a potential crash where we attempt to read
an invalid register.

<rdar://problem/12065366>

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=161679&r1=161678&r2=161679&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Fri Aug 10 13:35:24 2012
@@ -896,6 +896,10 @@
     case UnwindLLDB::RegisterLocation::eRegisterInRegister:
         {
             const RegisterInfo *other_reg_info = GetRegisterInfoAtIndex(regloc.location.register_number);
+            
+            if (!other_reg_info)
+                return false;
+            
             if (IsFrameZero ()) 
             {
                 success = m_thread.GetRegisterContext()->ReadRegister (other_reg_info, value);





More information about the lldb-commits mailing list