[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary:
A *.cpp file header in LLDB (and in LLDB) should like this:
```
//===-- TestUtilities.cpp -------------------------------------------------===//
```
However in LLDB most of our source files have arbitrary changes to this format and
these changes are spreading through LLDB as folks usually just use the existing
source files as templates for their new files (most notably the unnecessary
editor language indicator `-*- C++ -*-` is spreading and in every review
someone is pointing out that this is wrong, resulting in people pointing out that this
is done in the same way in other files).
This patch removes most of these inconsistencies including the editor language indicators,
all the different missing/additional '-' characters, files that center the file name, missing
trailing `===//` (mostly caused by clang-format breaking the line).
Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73258
2020-01-24 15:23:27 +08:00
|
|
|
//===-- ThreadPlanStepOverRange.cpp ---------------------------------------===//
|
2010-06-09 00:52:24 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2010-06-09 00:52:24 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2015-12-15 09:33:19 +08:00
|
|
|
#include "lldb/Target/ThreadPlanStepOverRange.h"
|
2012-09-01 09:02:41 +08:00
|
|
|
#include "lldb/Symbol/Block.h"
|
2012-11-06 09:14:52 +08:00
|
|
|
#include "lldb/Symbol/CompileUnit.h"
|
2012-09-01 09:02:41 +08:00
|
|
|
#include "lldb/Symbol/Function.h"
|
2012-11-06 09:14:52 +08:00
|
|
|
#include "lldb/Symbol/LineTable.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/Target/Process.h"
|
|
|
|
#include "lldb/Target/RegisterContext.h"
|
2011-02-16 05:59:32 +08:00
|
|
|
#include "lldb/Target/Target.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/Target/Thread.h"
|
|
|
|
#include "lldb/Target/ThreadPlanStepOut.h"
|
|
|
|
#include "lldb/Target/ThreadPlanStepThrough.h"
|
2017-03-04 04:56:28 +08:00
|
|
|
#include "lldb/Utility/Log.h"
|
2017-02-03 05:39:50 +08:00
|
|
|
#include "lldb/Utility/Stream.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
using namespace lldb_private;
|
2010-11-06 09:53:30 +08:00
|
|
|
using namespace lldb;
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2014-03-13 10:47:14 +08:00
|
|
|
uint32_t ThreadPlanStepOverRange::s_default_flag_values = 0;
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
// ThreadPlanStepOverRange: Step through a stack range, either stepping over or
|
2018-05-01 00:49:04 +08:00
|
|
|
// into based on the value of \a type.
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
ThreadPlanStepOverRange::ThreadPlanStepOverRange(
|
|
|
|
Thread &thread, const AddressRange &range,
|
|
|
|
const SymbolContext &addr_context, lldb::RunMode stop_others,
|
2014-03-13 10:47:14 +08:00
|
|
|
LazyBool step_out_avoids_code_without_debug_info)
|
2012-09-01 09:02:41 +08:00
|
|
|
: ThreadPlanStepRange(ThreadPlan::eKindStepOverRange,
|
|
|
|
"Step range stepping over", thread, range,
|
|
|
|
addr_context, stop_others),
|
2014-03-13 10:47:14 +08:00
|
|
|
ThreadPlanShouldStopHere(this), m_first_resume(true) {
|
|
|
|
SetFlagsToDefault();
|
|
|
|
SetupAvoidNoDebug(step_out_avoids_code_without_debug_info);
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
2015-12-15 09:33:19 +08:00
|
|
|
ThreadPlanStepOverRange::~ThreadPlanStepOverRange() = default;
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
void ThreadPlanStepOverRange::GetDescription(Stream *s,
|
|
|
|
lldb::DescriptionLevel level) {
|
2018-11-15 09:18:15 +08:00
|
|
|
auto PrintFailureIfAny = [&]() {
|
|
|
|
if (m_status.Success())
|
|
|
|
return;
|
|
|
|
s->Printf(" failed (%s)", m_status.AsCString());
|
|
|
|
};
|
|
|
|
|
2010-06-09 00:52:24 +08:00
|
|
|
if (level == lldb::eDescriptionLevelBrief) {
|
|
|
|
s->Printf("step over");
|
2018-11-15 09:18:15 +08:00
|
|
|
PrintFailureIfAny();
|
2014-09-30 07:17:18 +08:00
|
|
|
return;
|
|
|
|
}
|
2018-11-15 09:18:15 +08:00
|
|
|
|
2014-09-30 07:17:18 +08:00
|
|
|
s->Printf("Stepping over");
|
|
|
|
bool printed_line_info = false;
|
|
|
|
if (m_addr_context.line_entry.IsValid()) {
|
|
|
|
s->Printf(" line ");
|
|
|
|
m_addr_context.line_entry.DumpStopContext(s, false);
|
|
|
|
printed_line_info = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!printed_line_info || level == eDescriptionLevelVerbose) {
|
|
|
|
s->Printf(" using ranges: ");
|
|
|
|
DumpRanges(s);
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
2014-09-30 07:17:18 +08:00
|
|
|
|
2018-11-15 09:18:15 +08:00
|
|
|
PrintFailureIfAny();
|
|
|
|
|
2014-09-30 07:17:18 +08:00
|
|
|
s->PutChar('.');
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
2014-03-13 10:47:14 +08:00
|
|
|
void ThreadPlanStepOverRange::SetupAvoidNoDebug(
|
|
|
|
LazyBool step_out_avoids_code_without_debug_info) {
|
|
|
|
bool avoid_nodebug = true;
|
|
|
|
switch (step_out_avoids_code_without_debug_info) {
|
|
|
|
case eLazyBoolYes:
|
|
|
|
avoid_nodebug = true;
|
|
|
|
break;
|
|
|
|
case eLazyBoolNo:
|
|
|
|
avoid_nodebug = false;
|
|
|
|
break;
|
|
|
|
case eLazyBoolCalculate:
|
2020-03-11 05:03:53 +08:00
|
|
|
avoid_nodebug = GetThread().GetStepOutAvoidsNoDebug();
|
2014-03-13 10:47:14 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (avoid_nodebug)
|
|
|
|
GetFlags().Set(ThreadPlanShouldStopHere::eStepOutAvoidNoDebug);
|
|
|
|
else
|
|
|
|
GetFlags().Clear(ThreadPlanShouldStopHere::eStepOutAvoidNoDebug);
|
2014-08-06 09:49:59 +08:00
|
|
|
// Step Over plans should always avoid no-debug on step in. Seems like you
|
2018-05-01 00:49:04 +08:00
|
|
|
// shouldn't have to say this, but a tail call looks more like a step in that
|
|
|
|
// a step out, so we want to catch this case.
|
2014-08-06 09:49:59 +08:00
|
|
|
GetFlags().Set(ThreadPlanShouldStopHere::eStepInAvoidNoDebug);
|
2014-03-13 10:47:14 +08:00
|
|
|
}
|
|
|
|
|
2013-09-18 00:35:45 +08:00
|
|
|
bool ThreadPlanStepOverRange::IsEquivalentContext(
|
|
|
|
const SymbolContext &context) {
|
2018-05-01 00:49:04 +08:00
|
|
|
// Match as much as is specified in the m_addr_context: This is a fairly
|
|
|
|
// loose sanity check. Note, sometimes the target doesn't get filled in so I
|
|
|
|
// left out the target check. And sometimes the module comes in as the .o
|
|
|
|
// file from the inlined range, so I left that out too...
|
2013-09-18 00:35:45 +08:00
|
|
|
if (m_addr_context.comp_unit) {
|
2016-11-18 06:29:31 +08:00
|
|
|
if (m_addr_context.comp_unit != context.comp_unit)
|
|
|
|
return false;
|
|
|
|
if (m_addr_context.function) {
|
|
|
|
if (m_addr_context.function != context.function)
|
|
|
|
return false;
|
|
|
|
// It is okay to return to a different block of a straight function, we
|
2018-05-01 00:49:04 +08:00
|
|
|
// only have to be more careful if returning from one inlined block to
|
|
|
|
// another.
|
2016-11-18 06:29:31 +08:00
|
|
|
if (m_addr_context.block->GetInlinedFunctionInfo() == nullptr &&
|
|
|
|
context.block->GetInlinedFunctionInfo() == nullptr)
|
|
|
|
return true;
|
|
|
|
return m_addr_context.block == context.block;
|
2013-09-18 00:35:45 +08:00
|
|
|
}
|
2016-11-18 06:29:31 +08:00
|
|
|
}
|
|
|
|
// Fall back to symbol if we have no decision from comp_unit/function/block.
|
2018-12-15 08:15:33 +08:00
|
|
|
return m_addr_context.symbol && m_addr_context.symbol == context.symbol;
|
2013-09-18 00:35:45 +08:00
|
|
|
}
|
|
|
|
|
2010-06-09 00:52:24 +08:00
|
|
|
bool ThreadPlanStepOverRange::ShouldStop(Event *event_ptr) {
|
2013-03-28 07:08:40 +08:00
|
|
|
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
|
2020-03-11 05:03:53 +08:00
|
|
|
Thread &thread = GetThread();
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2010-06-09 00:52:24 +08:00
|
|
|
if (log) {
|
|
|
|
StreamString s;
|
2020-03-11 05:03:53 +08:00
|
|
|
DumpAddress(s.AsRawOstream(), thread.GetRegisterContext()->GetPC(),
|
|
|
|
GetTarget().GetArchitecture().GetAddressByteSize());
|
2019-07-25 01:56:10 +08:00
|
|
|
LLDB_LOGF(log, "ThreadPlanStepOverRange reached %s.", s.GetData());
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
|
|
|
|
2010-06-09 00:52:24 +08:00
|
|
|
// If we're out of the range but in the same frame or in our caller's frame
|
2018-05-01 00:49:04 +08:00
|
|
|
// then we should stop. When stepping out we only stop others if we are
|
|
|
|
// forcing running one thread.
|
2015-12-15 09:33:19 +08:00
|
|
|
bool stop_others = (m_stop_others == lldb::eOnlyThisThread);
|
2013-07-19 05:48:26 +08:00
|
|
|
ThreadPlanSP new_plan_sp;
|
2012-03-01 08:50:50 +08:00
|
|
|
FrameComparison frame_order = CompareCurrentFrameToStartFrame();
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2012-03-01 08:50:50 +08:00
|
|
|
if (frame_order == eFrameCompareOlder) {
|
2010-11-05 08:18:21 +08:00
|
|
|
// If we're in an older frame then we should stop.
|
2016-09-07 04:57:50 +08:00
|
|
|
//
|
2010-11-05 08:18:21 +08:00
|
|
|
// A caveat to this is if we think the frame is older but we're actually in
|
|
|
|
// a trampoline.
|
|
|
|
// I'm going to make the assumption that you wouldn't RETURN to a
|
2018-05-01 00:49:04 +08:00
|
|
|
// trampoline. So if we are in a trampoline we think the frame is older
|
|
|
|
// because the trampoline confused the backtracer. As below, we step
|
|
|
|
// through first, and then try to figure out how to get back out again.
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2020-03-11 05:03:53 +08:00
|
|
|
new_plan_sp = thread.QueueThreadPlanForStepThrough(m_stack_id, false,
|
|
|
|
stop_others, m_status);
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2013-07-19 05:48:26 +08:00
|
|
|
if (new_plan_sp && log)
|
2019-07-25 01:56:10 +08:00
|
|
|
LLDB_LOGF(log,
|
|
|
|
"Thought I stepped out, but in fact arrived at a trampoline.");
|
2012-03-01 08:50:50 +08:00
|
|
|
} else if (frame_order == eFrameCompareYounger) {
|
|
|
|
// Make sure we really are in a new frame. Do that by unwinding and seeing
|
2018-05-01 00:49:04 +08:00
|
|
|
// if the start function really is our start function...
|
2013-09-18 00:35:45 +08:00
|
|
|
for (uint32_t i = 1;; ++i) {
|
2020-03-11 05:03:53 +08:00
|
|
|
StackFrameSP older_frame_sp = thread.GetStackFrameAtIndex(i);
|
2013-09-18 00:35:45 +08:00
|
|
|
if (!older_frame_sp) {
|
|
|
|
// We can't unwind the next frame we should just get out of here &
|
|
|
|
// stop...
|
2016-09-07 04:57:50 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2013-09-18 00:35:45 +08:00
|
|
|
const SymbolContext &older_context =
|
|
|
|
older_frame_sp->GetSymbolContext(eSymbolContextEverything);
|
|
|
|
if (IsEquivalentContext(older_context)) {
|
Improve step over performance
Summary:
This patch improves step over performance for the case when we are
stepping over a call with a next-branch-breakpoint (see
https://reviews.llvm.org/D58678), and we encounter a stop during the
call. Currently, this causes the thread plan to step-out //each frame//
until it reaches the step-over range. This is a regression introduced by
https://reviews.llvm.org/D58678 (which did improve other things!). Prior
to that change, the step-over plan would always step-out just once.
With this patch, if we find ourselves stopped in a deeper stack frame
and we already have a next branch breakpoint, we simply return from the
step-over plan's ShouldStop handler without pushing the step out plan.
In my experiments this improved the time of stepping over a call that
loads 12 dlls from 14s to 5s. This was in remote debugging scenario with
10ms RTT, the call in question was Vulkan initialization
(vkCreateInstance), which loads various driver dlls. Loading those dlls
must stop on the rendezvous breakpoint, causing the perf problem
described above.
Reviewers: clayborg, labath, jingham
Reviewed By: jingham
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D76216
2020-03-20 18:39:30 +08:00
|
|
|
// If we have the next-branch-breakpoint in the range, we can just
|
|
|
|
// rely on that breakpoint to trigger once we return to the range.
|
|
|
|
if (m_next_branch_bp_sp)
|
|
|
|
return false;
|
2020-03-11 05:03:53 +08:00
|
|
|
new_plan_sp = thread.QueueThreadPlanForStepOutNoShouldStop(
|
2013-07-19 05:48:26 +08:00
|
|
|
false, nullptr, true, stop_others, eVoteNo, eVoteNoOpinion, 0,
|
2018-11-15 09:18:15 +08:00
|
|
|
m_status, true);
|
2016-09-07 04:57:50 +08:00
|
|
|
break;
|
|
|
|
} else {
|
2020-03-11 05:03:53 +08:00
|
|
|
new_plan_sp = thread.QueueThreadPlanForStepThrough(
|
2018-11-15 09:18:15 +08:00
|
|
|
m_stack_id, false, stop_others, m_status);
|
2014-08-05 09:59:20 +08:00
|
|
|
// If we found a way through, then we should stop recursing.
|
|
|
|
if (new_plan_sp)
|
2016-09-07 04:57:50 +08:00
|
|
|
break;
|
|
|
|
}
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
2010-11-05 08:18:21 +08:00
|
|
|
} else {
|
|
|
|
// If we're still in the range, keep going.
|
|
|
|
if (InRange()) {
|
2013-07-19 05:48:26 +08:00
|
|
|
SetNextBranchBreakpoint();
|
|
|
|
return false;
|
2010-11-05 08:18:21 +08:00
|
|
|
}
|
2013-09-18 00:35:45 +08:00
|
|
|
|
|
|
|
if (!InSymbol()) {
|
|
|
|
// This one is a little tricky. Sometimes we may be in a stub or
|
2018-05-01 00:49:04 +08:00
|
|
|
// something similar, in which case we need to get out of there. But if
|
|
|
|
// we are in a stub then it's likely going to be hard to get out from
|
|
|
|
// here. It is probably easiest to step into the stub, and then it will
|
|
|
|
// be straight-forward to step out.
|
2020-03-11 05:03:53 +08:00
|
|
|
new_plan_sp = thread.QueueThreadPlanForStepThrough(m_stack_id, false,
|
|
|
|
stop_others, m_status);
|
2016-09-07 04:57:50 +08:00
|
|
|
} else {
|
2018-05-01 00:49:04 +08:00
|
|
|
// The current clang (at least through 424) doesn't always get the
|
|
|
|
// address range for the DW_TAG_inlined_subroutines right, so that when
|
|
|
|
// you leave the inlined range the line table says you are still in the
|
|
|
|
// source file of the inlining function. This is bad, because now you
|
|
|
|
// are missing the stack frame for the function containing the inlining,
|
|
|
|
// and if you sensibly do "finish" to get out of this function you will
|
|
|
|
// instead exit the containing function. To work around this, we check
|
|
|
|
// whether we are still in the source file we started in, and if not
|
|
|
|
// assume it is an error, and push a plan to get us out of this line and
|
|
|
|
// back to the containing file.
|
2012-03-09 12:10:47 +08:00
|
|
|
|
|
|
|
if (m_addr_context.line_entry.IsValid()) {
|
|
|
|
SymbolContext sc;
|
2020-03-11 05:03:53 +08:00
|
|
|
StackFrameSP frame_sp = thread.GetStackFrameAtIndex(0);
|
2012-11-06 09:14:52 +08:00
|
|
|
sc = frame_sp->GetSymbolContext(eSymbolContextEverything);
|
|
|
|
if (sc.line_entry.IsValid()) {
|
2016-05-12 06:46:53 +08:00
|
|
|
if (sc.line_entry.original_file !=
|
2012-11-06 09:14:52 +08:00
|
|
|
m_addr_context.line_entry.original_file &&
|
2016-05-12 06:46:53 +08:00
|
|
|
sc.comp_unit == m_addr_context.comp_unit &&
|
2012-11-06 09:14:52 +08:00
|
|
|
sc.function == m_addr_context.function) {
|
2015-06-18 13:27:05 +08:00
|
|
|
// Okay, find the next occurrence of this file in the line table:
|
2012-11-06 09:14:52 +08:00
|
|
|
LineTable *line_table = m_addr_context.comp_unit->GetLineTable();
|
|
|
|
if (line_table) {
|
|
|
|
Address cur_address = frame_sp->GetFrameCodeAddress();
|
|
|
|
uint32_t entry_idx;
|
|
|
|
LineEntry line_entry;
|
|
|
|
if (line_table->FindLineEntryByAddress(cur_address, line_entry,
|
|
|
|
&entry_idx)) {
|
|
|
|
LineEntry next_line_entry;
|
|
|
|
bool step_past_remaining_inline = false;
|
|
|
|
if (entry_idx > 0) {
|
2015-06-18 13:27:05 +08:00
|
|
|
// We require the previous line entry and the current line
|
2018-05-01 00:49:04 +08:00
|
|
|
// entry come from the same file. The other requirement is
|
|
|
|
// that the previous line table entry be part of an inlined
|
|
|
|
// block, we don't want to step past cases where people have
|
|
|
|
// inlined some code fragment by using #include <source-
|
|
|
|
// fragment.c> directly.
|
2012-11-06 09:14:52 +08:00
|
|
|
LineEntry prev_line_entry;
|
|
|
|
if (line_table->GetLineEntryAtIndex(entry_idx - 1,
|
|
|
|
prev_line_entry) &&
|
|
|
|
prev_line_entry.original_file ==
|
|
|
|
line_entry.original_file) {
|
|
|
|
SymbolContext prev_sc;
|
|
|
|
Address prev_address =
|
|
|
|
prev_line_entry.range.GetBaseAddress();
|
|
|
|
prev_address.CalculateSymbolContext(&prev_sc);
|
|
|
|
if (prev_sc.block) {
|
|
|
|
Block *inlined_block =
|
2015-08-14 09:38:21 +08:00
|
|
|
prev_sc.block->GetContainingInlinedBlock();
|
|
|
|
if (inlined_block) {
|
|
|
|
AddressRange inline_range;
|
|
|
|
inlined_block->GetRangeContainingAddress(prev_address,
|
|
|
|
inline_range);
|
|
|
|
if (!inline_range.ContainsFileAddress(cur_address)) {
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2015-08-14 09:38:21 +08:00
|
|
|
step_past_remaining_inline = true;
|
2012-11-06 09:14:52 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2012-11-06 09:14:52 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2012-11-06 09:14:52 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2012-11-06 09:14:52 +08:00
|
|
|
if (step_past_remaining_inline) {
|
|
|
|
uint32_t look_ahead_step = 1;
|
|
|
|
while (line_table->GetLineEntryAtIndex(
|
|
|
|
entry_idx + look_ahead_step, next_line_entry)) {
|
|
|
|
// Make sure we haven't wandered out of the function we
|
|
|
|
// started from...
|
|
|
|
Address next_line_address =
|
|
|
|
next_line_entry.range.GetBaseAddress();
|
|
|
|
Function *next_line_function =
|
2015-07-09 06:32:23 +08:00
|
|
|
next_line_address.CalculateSymbolContextFunction();
|
2012-11-06 09:14:52 +08:00
|
|
|
if (next_line_function != m_addr_context.function)
|
2016-09-07 04:57:50 +08:00
|
|
|
break;
|
|
|
|
|
2016-05-12 06:46:53 +08:00
|
|
|
if (next_line_entry.original_file ==
|
|
|
|
m_addr_context.line_entry.original_file) {
|
2012-11-06 09:14:52 +08:00
|
|
|
const bool abort_other_plans = false;
|
2015-08-14 09:38:21 +08:00
|
|
|
const RunMode stop_other_threads = RunMode::eAllThreads;
|
2020-03-11 05:03:53 +08:00
|
|
|
lldb::addr_t cur_pc = thread.GetStackFrameAtIndex(0)
|
2012-09-01 09:02:41 +08:00
|
|
|
->GetRegisterContext()
|
|
|
|
->GetPC();
|
2012-11-06 09:14:52 +08:00
|
|
|
AddressRange step_range(
|
2016-09-07 04:57:50 +08:00
|
|
|
cur_pc,
|
2012-09-01 09:02:41 +08:00
|
|
|
next_line_address.GetLoadAddress(&GetTarget()) -
|
2016-09-07 04:57:50 +08:00
|
|
|
cur_pc);
|
|
|
|
|
2020-03-11 05:03:53 +08:00
|
|
|
new_plan_sp = thread.QueueThreadPlanForStepOverRange(
|
2018-11-15 09:18:15 +08:00
|
|
|
abort_other_plans, step_range, sc, stop_other_threads,
|
|
|
|
m_status);
|
2016-09-07 04:57:50 +08:00
|
|
|
break;
|
|
|
|
}
|
2012-11-06 09:14:52 +08:00
|
|
|
look_ahead_step++;
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-11-06 09:14:52 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2012-11-06 09:14:52 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2012-03-09 12:10:47 +08:00
|
|
|
// If we get to this point, we're not going to use a previously set "next
|
|
|
|
// branch" breakpoint, so delete it:
|
|
|
|
ClearNextBranchBreakpoint();
|
2014-09-30 07:17:18 +08:00
|
|
|
|
|
|
|
// If we haven't figured out something to do yet, then ask the ShouldStopHere
|
|
|
|
// callback:
|
|
|
|
if (!new_plan_sp) {
|
2018-11-15 09:18:15 +08:00
|
|
|
new_plan_sp = CheckShouldStopHereAndQueueStepOut(frame_order, m_status);
|
2014-09-30 07:17:18 +08:00
|
|
|
}
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2013-07-19 05:48:26 +08:00
|
|
|
if (!new_plan_sp)
|
2010-06-09 00:52:24 +08:00
|
|
|
m_no_more_plans = true;
|
|
|
|
else {
|
2014-09-30 07:17:18 +08:00
|
|
|
// Any new plan will be an implementation plan, so mark it private:
|
|
|
|
new_plan_sp->SetPrivate(true);
|
2010-06-09 00:52:24 +08:00
|
|
|
m_no_more_plans = false;
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
|
|
|
|
2013-07-19 05:48:26 +08:00
|
|
|
if (!new_plan_sp) {
|
2010-06-09 00:52:24 +08:00
|
|
|
// For efficiencies sake, we know we're done here so we don't have to do
|
2018-05-01 00:49:04 +08:00
|
|
|
// this calculation again in MischiefManaged.
|
2018-11-15 09:18:15 +08:00
|
|
|
SetPlanComplete(m_status.Success());
|
2010-06-09 00:52:24 +08:00
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
}
|
2012-05-02 02:38:37 +08:00
|
|
|
|
Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value. This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh! I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.
Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming. That allows
us to handle resuming in a more controlled fashion.
Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--
M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M include/lldb/Target/ThreadList.h
M include/lldb/Target/ThreadPlanStepOut.h
M include/lldb/Target/Thread.h
M include/lldb/Target/ThreadPlanBase.h
M include/lldb/Target/ThreadPlanStepThrough.h
M include/lldb/Target/ThreadPlanStepInstruction.h
M include/lldb/Target/ThreadPlanStepInRange.h
M include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M include/lldb/Target/ThreadPlanStepUntil.h
M include/lldb/Target/StopInfo.h
M include/lldb/Target/Process.h
M include/lldb/Target/ThreadPlanRunToAddress.h
M include/lldb/Target/ThreadPlan.h
M include/lldb/Target/ThreadPlanCallFunction.h
M include/lldb/Target/ThreadPlanStepOverRange.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M source/Target/StopInfo.cpp
M source/Target/Process.cpp
M source/Target/ThreadPlanRunToAddress.cpp
M source/Target/ThreadPlan.cpp
M source/Target/ThreadPlanCallFunction.cpp
M source/Target/ThreadPlanStepOverRange.cpp
M source/Target/ThreadList.cpp
M source/Target/ThreadPlanStepOut.cpp
M source/Target/Thread.cpp
M source/Target/ThreadPlanBase.cpp
M source/Target/ThreadPlanStepThrough.cpp
M source/Target/ThreadPlanStepInstruction.cpp
M source/Target/ThreadPlanStepInRange.cpp
M source/Target/ThreadPlanStepOverBreakpoint.cpp
M source/Target/ThreadPlanStepUntil.cpp
M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
llvm-svn: 181381
2013-05-08 08:35:16 +08:00
|
|
|
bool ThreadPlanStepOverRange::DoPlanExplainsStop(Event *event_ptr) {
|
2018-05-01 00:49:04 +08:00
|
|
|
// For crashes, breakpoint hits, signals, etc, let the base plan (or some
|
|
|
|
// plan above us) handle the stop. That way the user can see the stop, step
|
|
|
|
// around, and then when they are done, continue and have their step
|
|
|
|
// complete. The exception is if we've hit our "run to next branch"
|
|
|
|
// breakpoint. Note, unlike the step in range plan, we don't mark ourselves
|
|
|
|
// complete if we hit an unexplained breakpoint/crash.
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2013-03-28 07:08:40 +08:00
|
|
|
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
|
2013-06-04 09:40:51 +08:00
|
|
|
StopInfoSP stop_info_sp = GetPrivateStopInfo();
|
Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value. This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh! I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.
Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming. That allows
us to handle resuming in a more controlled fashion.
Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--
M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M include/lldb/Target/ThreadList.h
M include/lldb/Target/ThreadPlanStepOut.h
M include/lldb/Target/Thread.h
M include/lldb/Target/ThreadPlanBase.h
M include/lldb/Target/ThreadPlanStepThrough.h
M include/lldb/Target/ThreadPlanStepInstruction.h
M include/lldb/Target/ThreadPlanStepInRange.h
M include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M include/lldb/Target/ThreadPlanStepUntil.h
M include/lldb/Target/StopInfo.h
M include/lldb/Target/Process.h
M include/lldb/Target/ThreadPlanRunToAddress.h
M include/lldb/Target/ThreadPlan.h
M include/lldb/Target/ThreadPlanCallFunction.h
M include/lldb/Target/ThreadPlanStepOverRange.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M source/Target/StopInfo.cpp
M source/Target/Process.cpp
M source/Target/ThreadPlanRunToAddress.cpp
M source/Target/ThreadPlan.cpp
M source/Target/ThreadPlanCallFunction.cpp
M source/Target/ThreadPlanStepOverRange.cpp
M source/Target/ThreadList.cpp
M source/Target/ThreadPlanStepOut.cpp
M source/Target/Thread.cpp
M source/Target/ThreadPlanBase.cpp
M source/Target/ThreadPlanStepThrough.cpp
M source/Target/ThreadPlanStepInstruction.cpp
M source/Target/ThreadPlanStepInRange.cpp
M source/Target/ThreadPlanStepOverBreakpoint.cpp
M source/Target/ThreadPlanStepUntil.cpp
M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
llvm-svn: 181381
2013-05-08 08:35:16 +08:00
|
|
|
bool return_value;
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2012-05-02 02:38:37 +08:00
|
|
|
if (stop_info_sp) {
|
|
|
|
StopReason reason = stop_info_sp->GetStopReason();
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2015-07-24 03:55:02 +08:00
|
|
|
if (reason == eStopReasonTrace) {
|
Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value. This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh! I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.
Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming. That allows
us to handle resuming in a more controlled fashion.
Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--
M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M include/lldb/Target/ThreadList.h
M include/lldb/Target/ThreadPlanStepOut.h
M include/lldb/Target/Thread.h
M include/lldb/Target/ThreadPlanBase.h
M include/lldb/Target/ThreadPlanStepThrough.h
M include/lldb/Target/ThreadPlanStepInstruction.h
M include/lldb/Target/ThreadPlanStepInRange.h
M include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M include/lldb/Target/ThreadPlanStepUntil.h
M include/lldb/Target/StopInfo.h
M include/lldb/Target/Process.h
M include/lldb/Target/ThreadPlanRunToAddress.h
M include/lldb/Target/ThreadPlan.h
M include/lldb/Target/ThreadPlanCallFunction.h
M include/lldb/Target/ThreadPlanStepOverRange.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M source/Target/StopInfo.cpp
M source/Target/Process.cpp
M source/Target/ThreadPlanRunToAddress.cpp
M source/Target/ThreadPlan.cpp
M source/Target/ThreadPlanCallFunction.cpp
M source/Target/ThreadPlanStepOverRange.cpp
M source/Target/ThreadList.cpp
M source/Target/ThreadPlanStepOut.cpp
M source/Target/Thread.cpp
M source/Target/ThreadPlanBase.cpp
M source/Target/ThreadPlanStepThrough.cpp
M source/Target/ThreadPlanStepInstruction.cpp
M source/Target/ThreadPlanStepInRange.cpp
M source/Target/ThreadPlanStepOverBreakpoint.cpp
M source/Target/ThreadPlanStepUntil.cpp
M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
llvm-svn: 181381
2013-05-08 08:35:16 +08:00
|
|
|
return_value = true;
|
2015-07-24 03:55:02 +08:00
|
|
|
} else if (reason == eStopReasonBreakpoint) {
|
2015-12-15 09:33:19 +08:00
|
|
|
return_value = NextRangeBreakpointExplainsStop(stop_info_sp);
|
2015-07-24 03:55:02 +08:00
|
|
|
} else {
|
2012-05-02 02:38:37 +08:00
|
|
|
if (log)
|
|
|
|
log->PutCString("ThreadPlanStepInRange got asked if it explains the "
|
|
|
|
"stop for some reason other than step.");
|
Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value. This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh! I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.
Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming. That allows
us to handle resuming in a more controlled fashion.
Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--
M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M include/lldb/Target/ThreadList.h
M include/lldb/Target/ThreadPlanStepOut.h
M include/lldb/Target/Thread.h
M include/lldb/Target/ThreadPlanBase.h
M include/lldb/Target/ThreadPlanStepThrough.h
M include/lldb/Target/ThreadPlanStepInstruction.h
M include/lldb/Target/ThreadPlanStepInRange.h
M include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M include/lldb/Target/ThreadPlanStepUntil.h
M include/lldb/Target/StopInfo.h
M include/lldb/Target/Process.h
M include/lldb/Target/ThreadPlanRunToAddress.h
M include/lldb/Target/ThreadPlan.h
M include/lldb/Target/ThreadPlanCallFunction.h
M include/lldb/Target/ThreadPlanStepOverRange.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M source/Target/StopInfo.cpp
M source/Target/Process.cpp
M source/Target/ThreadPlanRunToAddress.cpp
M source/Target/ThreadPlan.cpp
M source/Target/ThreadPlanCallFunction.cpp
M source/Target/ThreadPlanStepOverRange.cpp
M source/Target/ThreadList.cpp
M source/Target/ThreadPlanStepOut.cpp
M source/Target/Thread.cpp
M source/Target/ThreadPlanBase.cpp
M source/Target/ThreadPlanStepThrough.cpp
M source/Target/ThreadPlanStepInstruction.cpp
M source/Target/ThreadPlanStepInRange.cpp
M source/Target/ThreadPlanStepOverBreakpoint.cpp
M source/Target/ThreadPlanStepUntil.cpp
M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
llvm-svn: 181381
2013-05-08 08:35:16 +08:00
|
|
|
return_value = false;
|
2012-05-02 02:38:37 +08:00
|
|
|
}
|
Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value. This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh! I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.
Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming. That allows
us to handle resuming in a more controlled fashion.
Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--
M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M include/lldb/Target/ThreadList.h
M include/lldb/Target/ThreadPlanStepOut.h
M include/lldb/Target/Thread.h
M include/lldb/Target/ThreadPlanBase.h
M include/lldb/Target/ThreadPlanStepThrough.h
M include/lldb/Target/ThreadPlanStepInstruction.h
M include/lldb/Target/ThreadPlanStepInRange.h
M include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M include/lldb/Target/ThreadPlanStepUntil.h
M include/lldb/Target/StopInfo.h
M include/lldb/Target/Process.h
M include/lldb/Target/ThreadPlanRunToAddress.h
M include/lldb/Target/ThreadPlan.h
M include/lldb/Target/ThreadPlanCallFunction.h
M include/lldb/Target/ThreadPlanStepOverRange.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M source/Target/StopInfo.cpp
M source/Target/Process.cpp
M source/Target/ThreadPlanRunToAddress.cpp
M source/Target/ThreadPlan.cpp
M source/Target/ThreadPlanCallFunction.cpp
M source/Target/ThreadPlanStepOverRange.cpp
M source/Target/ThreadList.cpp
M source/Target/ThreadPlanStepOut.cpp
M source/Target/Thread.cpp
M source/Target/ThreadPlanBase.cpp
M source/Target/ThreadPlanStepThrough.cpp
M source/Target/ThreadPlanStepInstruction.cpp
M source/Target/ThreadPlanStepInRange.cpp
M source/Target/ThreadPlanStepOverBreakpoint.cpp
M source/Target/ThreadPlanStepUntil.cpp
M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
llvm-svn: 181381
2013-05-08 08:35:16 +08:00
|
|
|
} else
|
|
|
|
return_value = true;
|
|
|
|
|
|
|
|
return return_value;
|
2012-05-02 02:38:37 +08:00
|
|
|
}
|
2012-09-01 09:02:41 +08:00
|
|
|
|
Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value. This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh! I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.
Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming. That allows
us to handle resuming in a more controlled fashion.
Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--
M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M include/lldb/Target/ThreadList.h
M include/lldb/Target/ThreadPlanStepOut.h
M include/lldb/Target/Thread.h
M include/lldb/Target/ThreadPlanBase.h
M include/lldb/Target/ThreadPlanStepThrough.h
M include/lldb/Target/ThreadPlanStepInstruction.h
M include/lldb/Target/ThreadPlanStepInRange.h
M include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M include/lldb/Target/ThreadPlanStepUntil.h
M include/lldb/Target/StopInfo.h
M include/lldb/Target/Process.h
M include/lldb/Target/ThreadPlanRunToAddress.h
M include/lldb/Target/ThreadPlan.h
M include/lldb/Target/ThreadPlanCallFunction.h
M include/lldb/Target/ThreadPlanStepOverRange.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M source/Target/StopInfo.cpp
M source/Target/Process.cpp
M source/Target/ThreadPlanRunToAddress.cpp
M source/Target/ThreadPlan.cpp
M source/Target/ThreadPlanCallFunction.cpp
M source/Target/ThreadPlanStepOverRange.cpp
M source/Target/ThreadList.cpp
M source/Target/ThreadPlanStepOut.cpp
M source/Target/Thread.cpp
M source/Target/ThreadPlanBase.cpp
M source/Target/ThreadPlanStepThrough.cpp
M source/Target/ThreadPlanStepInstruction.cpp
M source/Target/ThreadPlanStepInRange.cpp
M source/Target/ThreadPlanStepOverBreakpoint.cpp
M source/Target/ThreadPlanStepUntil.cpp
M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
llvm-svn: 181381
2013-05-08 08:35:16 +08:00
|
|
|
bool ThreadPlanStepOverRange::DoWillResume(lldb::StateType resume_state,
|
|
|
|
bool current_plan) {
|
2012-09-01 09:02:41 +08:00
|
|
|
if (resume_state != eStateSuspended && m_first_resume) {
|
|
|
|
m_first_resume = false;
|
|
|
|
if (resume_state == eStateStepping && current_plan) {
|
2020-03-11 05:03:53 +08:00
|
|
|
Thread &thread = GetThread();
|
2012-09-01 09:02:41 +08:00
|
|
|
// See if we are about to step over an inlined call in the middle of the
|
2018-05-01 00:49:04 +08:00
|
|
|
// inlined stack, if so figure out its extents and reset our range to
|
|
|
|
// step over that.
|
2020-03-11 05:03:53 +08:00
|
|
|
bool in_inlined_stack = thread.DecrementCurrentInlinedDepth();
|
2012-09-01 09:02:41 +08:00
|
|
|
if (in_inlined_stack) {
|
2013-03-28 07:08:40 +08:00
|
|
|
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
|
2019-07-25 01:56:10 +08:00
|
|
|
LLDB_LOGF(log,
|
|
|
|
"ThreadPlanStepInRange::DoWillResume: adjusting range to "
|
|
|
|
"the frame at inlined depth %d.",
|
2020-03-11 05:03:53 +08:00
|
|
|
thread.GetCurrentInlinedDepth());
|
|
|
|
StackFrameSP stack_sp = thread.GetStackFrameAtIndex(0);
|
2012-09-01 09:02:41 +08:00
|
|
|
if (stack_sp) {
|
|
|
|
Block *frame_block = stack_sp->GetFrameBlock();
|
2020-03-11 05:03:53 +08:00
|
|
|
lldb::addr_t curr_pc = thread.GetRegisterContext()->GetPC();
|
2012-09-01 09:02:41 +08:00
|
|
|
AddressRange my_range;
|
|
|
|
if (frame_block->GetRangeContainingLoadAddress(
|
2020-03-11 05:03:53 +08:00
|
|
|
curr_pc, m_process.GetTarget(), my_range)) {
|
2012-09-01 09:02:41 +08:00
|
|
|
m_address_ranges.clear();
|
|
|
|
m_address_ranges.push_back(my_range);
|
|
|
|
if (log) {
|
|
|
|
StreamString s;
|
|
|
|
const InlineFunctionInfo *inline_info =
|
|
|
|
frame_block->GetInlinedFunctionInfo();
|
|
|
|
const char *name;
|
|
|
|
if (inline_info)
|
2020-01-31 13:55:18 +08:00
|
|
|
name = inline_info->GetName().AsCString();
|
2012-09-01 09:02:41 +08:00
|
|
|
else
|
|
|
|
name = "<unknown-notinlined>";
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2012-09-01 09:02:41 +08:00
|
|
|
s.Printf(
|
|
|
|
"Stepping over inlined function \"%s\" in inlined stack: ",
|
|
|
|
name);
|
|
|
|
DumpRanges(&s);
|
2016-11-17 05:15:24 +08:00
|
|
|
log->PutString(s.GetString());
|
2012-09-01 09:02:41 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2012-09-01 09:02:41 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2012-09-01 09:02:41 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
|
|
|
|
Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value. This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh! I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.
Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming. That allows
us to handle resuming in a more controlled fashion.
Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--
M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M include/lldb/Target/ThreadList.h
M include/lldb/Target/ThreadPlanStepOut.h
M include/lldb/Target/Thread.h
M include/lldb/Target/ThreadPlanBase.h
M include/lldb/Target/ThreadPlanStepThrough.h
M include/lldb/Target/ThreadPlanStepInstruction.h
M include/lldb/Target/ThreadPlanStepInRange.h
M include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M include/lldb/Target/ThreadPlanStepUntil.h
M include/lldb/Target/StopInfo.h
M include/lldb/Target/Process.h
M include/lldb/Target/ThreadPlanRunToAddress.h
M include/lldb/Target/ThreadPlan.h
M include/lldb/Target/ThreadPlanCallFunction.h
M include/lldb/Target/ThreadPlanStepOverRange.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M source/Target/StopInfo.cpp
M source/Target/Process.cpp
M source/Target/ThreadPlanRunToAddress.cpp
M source/Target/ThreadPlan.cpp
M source/Target/ThreadPlanCallFunction.cpp
M source/Target/ThreadPlanStepOverRange.cpp
M source/Target/ThreadList.cpp
M source/Target/ThreadPlanStepOut.cpp
M source/Target/Thread.cpp
M source/Target/ThreadPlanBase.cpp
M source/Target/ThreadPlanStepThrough.cpp
M source/Target/ThreadPlanStepInstruction.cpp
M source/Target/ThreadPlanStepInRange.cpp
M source/Target/ThreadPlanStepOverBreakpoint.cpp
M source/Target/ThreadPlanStepUntil.cpp
M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
llvm-svn: 181381
2013-05-08 08:35:16 +08:00
|
|
|
return true;
|
2012-09-01 09:02:41 +08:00
|
|
|
}
|