diff options
author | Sean Callanan <scallanan@apple.com> | 2012-08-10 18:35:24 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-08-10 18:35:24 +0000 |
commit | d2a5a901486881b4ecf767f7f763ab00d7585acf (patch) | |
tree | 15599c2fde23620b03a5feb37801f189d8705f37 /lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp | |
parent | c52863cd368ae7a5cb59988811333784151b4ef2 (diff) | |
download | bcm5719-llvm-d2a5a901486881b4ecf767f7f763ab00d7585acf.tar.gz bcm5719-llvm-d2a5a901486881b4ecf767f7f763ab00d7585acf.zip |
Fixed a potential crash where we attempt to read
an invalid register.
<rdar://problem/12065366>
llvm-svn: 161679
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp index 7c35a4ff97d..f023a6a70a0 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -896,6 +896,10 @@ RegisterContextLLDB::ReadRegisterValueFromRegisterLocation (lldb_private::Unwind 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); |