[Lldb-commits] [lldb] r230236 - Add null RegisterContext assertions
Ed Maste
emaste at freebsd.org
Mon Feb 23 10:12:21 PST 2015
Author: emaste
Date: Mon Feb 23 12:12:20 2015
New Revision: 230236
URL: http://llvm.org/viewvc/llvm-project?rev=230236&view=rev
Log:
Add null RegisterContext assertions
This makes these failures slightly more obvious, avoiding the need to
run LLDB under a debugger or rely on a LLDB core. I encountered these
while bringing up a new OS/arch combination.
Modified:
lldb/trunk/source/Target/StackFrameList.cpp
lldb/trunk/source/Target/ThreadPlan.cpp
Modified: lldb/trunk/source/Target/StackFrameList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrameList.cpp?rev=230236&r1=230235&r2=230236&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrameList.cpp (original)
+++ lldb/trunk/source/Target/StackFrameList.cpp Mon Feb 23 12:12:20 2015
@@ -343,6 +343,7 @@ StackFrameList::GetFramesUpTo(uint32_t e
m_frames.push_back (unwind_frame_sp);
}
+ assert(unwind_frame_sp);
SymbolContext unwind_sc = unwind_frame_sp->GetSymbolContext (eSymbolContextBlock | eSymbolContextFunction);
Block *unwind_block = unwind_sc.block;
if (unwind_block)
Modified: lldb/trunk/source/Target/ThreadPlan.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlan.cpp?rev=230236&r1=230235&r2=230236&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlan.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlan.cpp Mon Feb 23 12:12:20 2015
@@ -156,6 +156,7 @@ ThreadPlan::WillResume (StateType resume
if (log)
{
RegisterContext *reg_ctx = m_thread.GetRegisterContext().get();
+ assert (reg_ctx);
addr_t pc = reg_ctx->GetPC();
addr_t sp = reg_ctx->GetSP();
addr_t fp = reg_ctx->GetFP();
More information about the lldb-commits
mailing list