[Lldb-commits] [lldb] r152477 - /lldb/trunk/source/Expression/DWARFExpression.cpp
Sean Callanan
scallanan at apple.com
Fri Mar 9 19:03:46 PST 2012
Author: spyffe
Date: Fri Mar 9 21:03:46 2012
New Revision: 152477
URL: http://llvm.org/viewvc/llvm-project?rev=152477&view=rev
Log:
Hardened the process of reading the program counter
on behalf of a DWARF expression.
Modified:
lldb/trunk/source/Expression/DWARFExpression.cpp
Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=152477&r1=152476&r2=152477&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Fri Mar 9 21:03:46 2012
@@ -1219,7 +1219,12 @@
else
{
frame = exe_ctx->GetFramePtr();
- pc = frame->GetRegisterContext()->GetPC();
+ if (!frame)
+ return false;
+ RegisterContextSP reg_ctx_sp = frame->GetRegisterContext();
+ if (!reg_ctx_sp)
+ return false;
+ pc = reg_ctx_sp->GetPC();
}
if (loclist_base_load_addr != LLDB_INVALID_ADDRESS)
More information about the lldb-commits
mailing list