Go to the documentation of this file.
24 Vote report_stop_vote,
Vote report_run_vote)
25 : m_process(*thread.GetProcess().get()), m_tid(thread.GetID()),
26 m_report_stop_vote(report_stop_vote), m_report_run_vote(report_run_vote),
27 m_takes_iteration_count(false), m_could_not_resolve_hw_bp(false),
28 m_thread(&thread), m_kind(kind), m_name(name), m_plan_complete_mutex(),
30 m_plan_private(false), m_okay_to_discard(true),
31 m_is_controlling_plan(false), m_plan_succeeded(true) {
86 LLDB_LOG(log,
"returning previous thread plan vote: {0}", prev_vote);
108 return (prev_plan ==
nullptr) ? false : prev_plan->
StopOthers();
130 "%s Thread #%u (0x%p): tid = 0x%4.4" PRIx64
", pc = 0x%8.8" PRIx64
131 ", sp = 0x%8.8" PRIx64
", fp = 0x%8.8" PRIx64
", "
132 "plan = '%s', state = %s, stop others = %d",
135 static_cast<uint64_t
>(
sp),
static_cast<uint64_t
>(
fp),
m_name.c_str(),
139 bool success =
DoWillResume(resume_state, current_plan);
148 return ++g_nextPlanID;
189 s->
PutCString(
"Null thread plan - thread has been destroyed.");
193 #ifdef LLDB_CONFIGURATION_DEBUG
195 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
196 ", ptid = 0x%" PRIx64
")",
201 log->
Error(
"%s called on thread that has been destroyed (tid = 0x%" PRIx64
202 ", ptid = 0x%" PRIx64
")",
209 #ifdef LLDB_CONFIGURATION_DEBUG
211 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
212 ", ptid = 0x%" PRIx64
")",
217 log->
Error(
"%s called on thread that has been destroyed (tid = 0x%" PRIx64
218 ", ptid = 0x%" PRIx64
")",
225 #ifdef LLDB_CONFIGURATION_DEBUG
227 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
228 ", ptid = 0x%" PRIx64
")",
233 log->
Error(
"%s called on thread that has been destroyed (tid = 0x%" PRIx64
234 ", ptid = 0x%" PRIx64
")",
241 #ifdef LLDB_CONFIGURATION_DEBUG
243 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
244 ", ptid = 0x%" PRIx64
")",
249 log->
Error(
"%s called on thread that has been destroyed (tid = 0x%" PRIx64
250 ", ptid = 0x%" PRIx64
")",
259 #ifdef LLDB_CONFIGURATION_DEBUG
261 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
262 ", ptid = 0x%" PRIx64
")",
267 log->
Error(
"%s called on thread that has been destroyed (tid = 0x%" PRIx64
268 ", ptid = 0x%" PRIx64
")",
276 #ifdef LLDB_CONFIGURATION_DEBUG
278 "error: %s called on thread that has been destroyed (tid = 0x%" PRIx64
279 ", ptid = 0x%" PRIx64
")",
284 log->
Error(
"%s called on thread that has been destroyed (tid = 0x%" PRIx64
285 ", ptid = 0x%" PRIx64
")",
Thread & GetThread()
Returns the Thread that is using this thread plan.
~ThreadPlanNull() override
@ eStopReasonThreadExiting
#define LLDB_LOGF(log,...)
virtual lldb::StateType GetPlanRunState()=0
ThreadList & GetThreadList()
Target & GetTarget()
Get the target object pointer for this module.
const char * StateAsCString(lldb::StateType state)
Converts a StateType to a C string.
StopReason
Thread stop reasons.
ThreadPlanNull(Thread &thread)
LazyBool m_cached_plan_explains_stop
void SetID(lldb::user_id_t uid)
Set accessor for the user ID.
void CachePlanExplainsStop(bool does_explain)
static llvm::raw_ostream & error(Stream &strm)
lldb::ThreadSP FindThreadByID(lldb::tid_t tid, bool can_update=true)
uint64_t GetPC(uint64_t fail_value=LLDB_INVALID_ADDRESS)
virtual bool MischiefManaged()
ThreadPlan * GetPreviousPlan()
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
@ eStopReasonInstrumentation
virtual bool DoPlanExplainsStop(Event *event_ptr)=0
static lldb::user_id_t GetNextID()
bool PlanExplainsStop(Event *event_ptr)
uint64_t GetFP(uint64_t fail_value=LLDB_INVALID_ADDRESS)
std::recursive_mutex m_plan_complete_mutex
uint64_t GetSP(uint64_t fail_value=LLDB_INVALID_ADDRESS)
virtual bool OkayToDiscard()
bool MischiefManaged() override
lldb::user_id_t GetID() const
Get accessor for the user ID.
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
void void Error(const char *fmt,...) __attribute__((format(printf
virtual bool StopOthers()
void SetPlanComplete(bool success=true)
@ eStopReasonExec
Program was re-exec'ed.
bool IsUsuallyUnexplainedStopReason(lldb::StopReason)
virtual bool DoWillResume(lldb::StateType resume_state, bool current_plan)
virtual void SetStopOthers(bool new_value)
Vote ShouldReportRun(Event *event_ptr)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
A class that represents a running process on the host machine.
lldb::StateType GetPlanRunState() override
bool WillResume(lldb::StateType resume_state, bool current_plan)
lldb::ThreadPlanTracerSP m_tracer_sp
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
virtual Vote ShouldReportStop(Event *event_ptr)
StateType
Process and Thread States.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
virtual lldb::RegisterContextSP GetRegisterContext()=0
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
void ClearThreadCache()
Clear the Thread* cache.
bool DoPlanExplainsStop(Event *event_ptr) override
lldb::StateType RunState()
@ eStateRunning
Process or thread is running and can't be examined.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
bool ShouldStop(Event *event_ptr) override