diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Core/Disassembler.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Target/Process.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepRange.cpp | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp index 74f66b5d479..af7cf82d470 100644 --- a/lldb/source/Core/Disassembler.cpp +++ b/lldb/source/Core/Disassembler.cpp @@ -1087,13 +1087,16 @@ void InstructionList::Append(lldb::InstructionSP &inst_sp) { uint32_t InstructionList::GetIndexOfNextBranchInstruction(uint32_t start, - Target &target) const { + Target &target, + bool ignore_calls) const { size_t num_instructions = m_instructions.size(); uint32_t next_branch = UINT32_MAX; size_t i; for (i = start; i < num_instructions; i++) { if (m_instructions[i]->DoesBranch()) { + if (ignore_calls && m_instructions[i]->IsCall()) + continue; next_branch = i; break; } diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 75566150320..6156abe6353 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -5832,7 +5832,8 @@ Process::AdvanceAddressToNextBranchInstruction(Address default_stop_addr, } uint32_t branch_index = - insn_list->GetIndexOfNextBranchInstruction(insn_offset, target); + insn_list->GetIndexOfNextBranchInstruction(insn_offset, target, + false /* ignore_calls*/); if (branch_index == UINT32_MAX) { return retval; } diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp index e5b3eee5cfb..49c72dbf091 100644 --- a/lldb/source/Target/ThreadPlanStepRange.cpp +++ b/lldb/source/Target/ThreadPlanStepRange.cpp @@ -315,9 +315,10 @@ bool ThreadPlanStepRange::SetNextBranchBreakpoint() { return false; else { Target &target = GetThread().GetProcess()->GetTarget(); - uint32_t branch_index; - branch_index = - instructions->GetIndexOfNextBranchInstruction(pc_index, target); + const bool ignore_calls = GetKind() == eKindStepOverRange; + uint32_t branch_index = + instructions->GetIndexOfNextBranchInstruction(pc_index, target, + ignore_calls); Address run_to_address; |