29 Vote report_stop_vote,
Vote report_run_vote)
91 LLDB_LOG(log,
"returning previous thread plan vote: {0}", prev_vote);
113 return (prev_plan ==
nullptr) ? false : prev_plan->
StopOthers();
135 "%s Thread #%u (0x%p): tid = 0x%4.4" PRIx64
", pc = 0x%8.8" PRIx64
136 ", sp = 0x%8.8" PRIx64
", fp = 0x%8.8" PRIx64
", "
137 "plan = '%s', state = %s, stop others = %d",
140 static_cast<uint64_t
>(
sp),
static_cast<uint64_t
>(
fp),
m_name.c_str(),
144 bool success =
DoWillResume(resume_state, current_plan);
152 static std::atomic<uint32_t> g_nextPlanID{0};
153 return ++g_nextPlanID;
198 s->
PutCString(
"Null thread plan - thread has been destroyed.");
202#ifdef LLDB_CONFIGURATION_DEBUG
204 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
205 ", ptid = 0x%" PRIx64
")",
210 "error: %s called on thread that has been destroyed "
211 "(tid = 0x%" PRIx64
", ptid = 0x%" PRIx64
")",
218#ifdef LLDB_CONFIGURATION_DEBUG
220 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
221 ", ptid = 0x%" PRIx64
")",
226 "error: %s called on thread that has been destroyed "
227 "(tid = 0x%" PRIx64
", ptid = 0x%" PRIx64
")",
234#ifdef LLDB_CONFIGURATION_DEBUG
236 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
237 ", ptid = 0x%" PRIx64
")",
242 "error: %s called on thread that has been destroyed "
243 "(tid = 0x%" PRIx64
", ptid = 0x%" PRIx64
")",
250#ifdef LLDB_CONFIGURATION_DEBUG
252 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
253 ", ptid = 0x%" PRIx64
")",
258 "error: %s called on thread that has been destroyed "
259 "(tid = 0x%" PRIx64
", ptid = 0x%" PRIx64
")",
268#ifdef LLDB_CONFIGURATION_DEBUG
270 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
271 ", ptid = 0x%" PRIx64
")",
276 "error: %s called on thread that has been destroyed "
277 "(tid = 0x%" PRIx64
", ptid = 0x%" PRIx64
")",
285#ifdef LLDB_CONFIGURATION_DEBUG
287 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
288 ", ptid = 0x%" PRIx64
")",
293 "error: %s called on thread that has been destroyed "
294 "(tid = 0x%" PRIx64
", ptid = 0x%" PRIx64
")",
302 llvm::ArrayRef<addr_t> requested_addresses) {
307 return llvm::createStringError(
"null target from StepUntil frame");
309 return llvm::createStringError(
"frame has no function debug information");
311 std::vector<addr_t> until_addrs;
312 auto add_if_in_scope = [&](
const Address &addr) {
313 addr_t load_addr = addr.GetLoadAddress(target_sp.get());
315 until_addrs.push_back(load_addr);
318 bool found_some_line_table_entry =
false;
319 for (uint32_t line : lines) {
322 0, line, &file,
false, &line_entry);
325 found_some_line_table_entry =
true;
326 const uint32_t actual_line = line_entry.
line;
334 for (
addr_t address : requested_addresses) {
336 if (target_sp->ResolveLoadAddress(address, addr))
337 add_if_in_scope(addr);
340 if (!until_addrs.empty())
344 if (requested_addresses.empty() && !found_some_line_table_entry)
345 return llvm::createStringError(
"No line entries matching until target");
346 return llvm::createStringError(
347 "Until target outside of the current function");
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
#define LLDB_LOGF(log,...)
Address & GetBaseAddress()
Get accessor for the base address of the range.
A section + offset based address class.
uint32_t FindLineEntry(uint32_t start_idx, uint32_t line, const FileSpec *file_spec_ptr, bool exact, LineEntry *line_entry)
Find the line entry by line and optional inlined file spec.
uint64_t GetPC(uint64_t fail_value=LLDB_INVALID_ADDRESS)
uint64_t GetSP(uint64_t fail_value=LLDB_INVALID_ADDRESS)
uint64_t GetFP(uint64_t fail_value=LLDB_INVALID_ADDRESS)
This base class provides an interface to stack frames.
bool IsAddressInFrameScope(const Address &addr)
Let F be this frame's function.
virtual const SymbolContext & GetSymbolContext(lldb::SymbolContextItem resolve_scope)
Provide a SymbolContext for this StackFrame's current pc value.
lldb::TargetSP CalculateTarget() override
A stream class that can stream formatted output to a file.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function for a given query.
CompileUnit * comp_unit
The CompileUnit for a given query.
bool MischiefManaged() override
lldb::StateType GetPlanRunState() override
ThreadPlanNull(Thread &thread)
~ThreadPlanNull() override
bool DoPlanExplainsStop(Event *event_ptr) override
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
bool ShouldStop(Event *event_ptr) override
virtual Vote ShouldReportStop(Event *event_ptr)
virtual bool DoPlanExplainsStop(Event *event_ptr)=0
virtual bool OkayToDiscard()
ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread, Vote report_stop_vote, Vote report_run_vote)
virtual bool DoWillResume(lldb::StateType resume_state, bool current_plan)
virtual lldb::StateType GetPlanRunState()=0
Vote ShouldReportRun(Event *event_ptr)
bool IsUsuallyUnexplainedStopReason(lldb::StopReason)
LazyBool m_cached_plan_explains_stop
void SetPlanComplete(bool success=true)
Thread & GetThread()
Returns the Thread that is using this thread plan.
bool PlanExplainsStop(Event *event_ptr)
virtual bool StopOthers()
static lldb::user_id_t GetNextID()
bool m_takes_iteration_count
ThreadPlan * GetPreviousPlan()
void ClearThreadCache()
Clear the Thread* cache.
bool WillResume(lldb::StateType resume_state, bool current_plan)
virtual bool MischiefManaged()
bool m_could_not_resolve_hw_bp
lldb::ThreadPlanTracerSP m_tracer_sp
lldb::StateType RunState()
virtual void SetStopOthers(bool new_value)
bool m_is_controlling_plan
void CachePlanExplainsStop(bool does_explain)
std::recursive_mutex m_plan_complete_mutex
virtual lldb::RegisterContextSP GetRegisterContext()=0
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
llvm::Expected< std::vector< lldb::addr_t > > GetStepUntilAddresses(StackFrame &frame, const FileSpec &file, llvm::ArrayRef< uint32_t > lines, llvm::ArrayRef< lldb::addr_t > requested_addresses)
Returns the load addresses of the line table entries for lines in file, and of addresses,...
const char * StateAsCString(lldb::StateType state)
Converts a StateType to a C string.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::Thread > ThreadSP
StateType
Process and Thread States.
@ eStateRunning
Process or thread is running and can't be examined.
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
StopReason
Thread stop reasons.
@ eStopReasonInstrumentation
@ eStopReasonExec
Program was re-exec'ed.
@ eStopReasonInterrupt
Thread requested interrupt.
@ eStopReasonThreadExiting
std::shared_ptr< lldb_private::Target > TargetSP
A line table entry class.
AddressRange range
The section offset address range for this line entry.
uint32_t line
The source line number, or LLDB_INVALID_LINE_NUMBER if there is no line number information.
lldb::user_id_t GetID() const
Get accessor for the user ID.
void SetID(lldb::user_id_t uid)
Set accessor for the user ID.