diff options
author | Boris Ulasevich <boris.ulasevich@gmail.com> | 2017-02-15 11:42:47 +0000 |
---|---|---|
committer | Boris Ulasevich <boris.ulasevich@gmail.com> | 2017-02-15 11:42:47 +0000 |
commit | 86aaa8a28d3faa928f471c74e74cc7e1689face9 (patch) | |
tree | a1047b0d900acb4777494dac1d7a013b22eafc46 /lldb/source/Target/ThreadPlanStepInstruction.cpp | |
parent | 216bb2df3687b7972f91db4a009545a87cb5475c (diff) | |
download | bcm5719-llvm-86aaa8a28d3faa928f471c74e74cc7e1689face9.tar.gz bcm5719-llvm-86aaa8a28d3faa928f471c74e74cc7e1689face9.zip |
Bug 30863 - Step doesn't stop with conditional breakpoint on the next line
Differential Revisions:
https://reviews.llvm.org/D26497 (committed r290168, temporary reverted r290197)
https://reviews.llvm.org/D28945 (fix for Ubuntu tests fail)
https://reviews.llvm.org/D29909 (fix for TestCallThatThrows test fail)
llvm-svn: 295168
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepInstruction.cpp')
-rw-r--r-- | lldb/source/Target/ThreadPlanStepInstruction.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Target/ThreadPlanStepInstruction.cpp b/lldb/source/Target/ThreadPlanStepInstruction.cpp index ff11ec02ece..c3ee0b27e82 100644 --- a/lldb/source/Target/ThreadPlanStepInstruction.cpp +++ b/lldb/source/Target/ThreadPlanStepInstruction.cpp @@ -94,6 +94,15 @@ bool ThreadPlanStepInstruction::IsPlanStale() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP)); StackID cur_frame_id = m_thread.GetStackFrameAtIndex(0)->GetStackID(); if (cur_frame_id == m_stack_id) { + // Set plan Complete when we reach next instruction + uint64_t pc = m_thread.GetRegisterContext()->GetPC(0); + uint32_t max_opcode_size = m_thread.CalculateTarget() + ->GetArchitecture().GetMaximumOpcodeByteSize(); + bool next_instruction_reached = (pc > m_instruction_addr) && + (pc <= m_instruction_addr + max_opcode_size); + if (next_instruction_reached) { + SetPlanComplete(); + } return (m_thread.GetRegisterContext()->GetPC(0) != m_instruction_addr); } else if (cur_frame_id < m_stack_id) { // If the current frame is younger than the start frame and we are stepping |