diff options
| author | Ed Maste <emaste@freebsd.org> | 2015-02-23 18:12:20 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@freebsd.org> | 2015-02-23 18:12:20 +0000 |
| commit | ff1b5c4244bd325104c40b7aba6b2d4d0749cbad (patch) | |
| tree | d9e38e92e7eeba2a2e4272fae943ce730c16298f /lldb/source/Target | |
| parent | afe27c7d278a4a36331c5d18be3af901bea378b6 (diff) | |
| download | bcm5719-llvm-ff1b5c4244bd325104c40b7aba6b2d4d0749cbad.tar.gz bcm5719-llvm-ff1b5c4244bd325104c40b7aba6b2d4d0749cbad.zip | |
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.
llvm-svn: 230236
Diffstat (limited to 'lldb/source/Target')
| -rw-r--r-- | lldb/source/Target/StackFrameList.cpp | 1 | ||||
| -rw-r--r-- | lldb/source/Target/ThreadPlan.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp index 9a132618288..43a4b5b122f 100644 --- a/lldb/source/Target/StackFrameList.cpp +++ b/lldb/source/Target/StackFrameList.cpp @@ -343,6 +343,7 @@ StackFrameList::GetFramesUpTo(uint32_t end_idx) 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) diff --git a/lldb/source/Target/ThreadPlan.cpp b/lldb/source/Target/ThreadPlan.cpp index 2c9b7fce7c2..f2d7a187db5 100644 --- a/lldb/source/Target/ThreadPlan.cpp +++ b/lldb/source/Target/ThreadPlan.cpp @@ -156,6 +156,7 @@ ThreadPlan::WillResume (StateType resume_state, bool current_plan) 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(); |

