39 m_stop_id(thread.GetProcess()->GetStopID()),
47 return thread_sp->GetProcess()->GetStopID() ==
m_stop_id;
54 m_stop_id = thread_sp->GetProcess()->GetStopID();
55 m_resume_id = thread_sp->GetProcess()->GetResumeID();
75 uint32_t curr_resume_id = thread_sp->GetProcess()->GetResumeID();
76 uint32_t last_user_expression_id =
77 thread_sp->GetProcess()->GetLastUserExpressionResumeID();
80 }
else if (curr_resume_id > last_user_expression_id) {
94 std::array<uint8_t, 4> bytes_at_pc = {0, 0, 0, 0};
95 auto reg_ctx_sp =
GetThread()->GetRegisterContext();
96 auto process_sp =
GetThread()->GetProcess();
98 if (!process_sp->ReadMemory(
pc, bytes_at_pc.data(), bytes_at_pc.size(),
101 LLDB_LOG(log,
"failed to read program bytes at pc address {}, error {}",
pc,
106 auto &target = process_sp->GetTarget();
107 auto platform_sp = target.GetPlatform();
109 platform_sp->GetTrapOpcodeSizeHint(target,
Address(
pc), bytes_at_pc);
110 llvm::ArrayRef<uint8_t> platform_opcode =
111 platform_sp->SoftwareTrapOpcodeBytes(target.GetArchitecture(), size_hint);
113 Architecture *arch_plugin = target.GetArchitecturePlugin();
114 llvm::ArrayRef<uint8_t> inst_bytes(bytes_at_pc.data(), bytes_at_pc.size());
117 LLDB_LOG(log,
"stepping over breakpoint in inferior to new pc: {}",
118 pc + platform_opcode.size());
119 reg_ctx_sp->SetPC(
pc + platform_opcode.size());
156 uint32_t num_constituents = bp_site_sp->GetNumberOfConstituents();
157 if (num_constituents == 1) {
160 Breakpoint & bkpt = bp_loc_sp->GetBreakpoint();
167 for (uint32_t i = 0; i < num_constituents; i++) {
168 if (!bp_site_sp->GetConstituentAtIndex(i)
176 m_address = bp_site_sp->GetLoadAddress();
182 ProcessSP process_sp(thread.GetProcess());
186 return bp_site_sp->ValidForThisThread(thread);
206 bp_site_sp->BumpHitCounts();
213 "Process::%s could not find breakpoint site id: %" PRId64
240 if (bp_site_sp->IsInternal()) {
241 size_t num_constituents = bp_site_sp->GetNumberOfConstituents();
242 for (
size_t idx = 0; idx < num_constituents; idx++) {
243 const char *kind = bp_site_sp->GetConstituentAtIndex(idx)
245 .GetBreakpointKind();
246 if (kind !=
nullptr) {
253 strm.
Printf(
"breakpoint ");
260 thread_sp->GetProcess()->GetTarget().GetBreakpointByID(
263 if (break_sp->IsInternal()) {
264 const char *kind = break_sp->GetBreakpointKind();
276 strm.
Printf(
"breakpoint %d which has been deleted.",
280 strm.
Printf(
"breakpoint site %" PRIi64
281 " which has been deleted - unknown address",
284 strm.
Printf(
"breakpoint site %" PRIi64
285 " which has been deleted - was at 0x%" PRIx64,
298 if (num_async_locs > 0)
299 return num_async_locs * 2;
304 return bp_site_sp->GetNumberOfConstituents() * 2;
309 uint32_t bp_index = idx / 2;
313 if (num_async_locs > 0) {
319 loc_to_report_sp = bp_site_sp->GetConstituentAtIndex(bp_index);
321 if (loc_to_report_sp) {
324 return loc_to_report_sp->GetID();
327 return loc_to_report_sp->GetBreakpoint().GetID();
333 std::optional<uint32_t>
345 return bp_site_sp->GetSuggestedStackFrameIndex();
365 bool all_stopping_locs_internal =
true;
372 if (!thread_sp->IsValid()) {
374 LLDB_LOGF(log,
"PerformAction got called with an invalid thread.");
381 std::unordered_set<break_id_t> precondition_breakpoints;
388 bool actually_hit_any_locations =
false;
396 if (num_constituents == 0) {
398 actually_hit_any_locations =
true;
424 bool async_should_stop =
false;
427 bool actually_said_continue =
false;
459 if (thread_sp->CompletedPlanOverridesBreakpoint()) {
461 thread_sp->ResetStopInfo();
465 LLDB_LOGF(log,
"StopInfoBreakpoint::PerformAction - Hit a "
466 "breakpoint while running an expression,"
467 " not running commands to avoid recursion.");
468 bool ignoring_breakpoints =
476 "StopInfoBreakpoint::PerformAction - in expression, "
480 "hit breakpoint while running function, skipping commands "
481 "and conditions to prevent recursion",
501 std::vector<lldb::BreakpointSP> location_constituents;
504 for (
size_t j = 0; j < num_constituents; j++) {
506 if (loc_sp->IsValid()) {
507 location_constituents.push_back(
508 loc_sp->GetBreakpoint().shared_from_this());
509 valid_locs.
Add(loc_sp);
513 size_t num_valid_locs = valid_locs.
GetSize();
514 for (
size_t j = 0; j < num_valid_locs; j++) {
522 if (!bp_loc_sp->IsEnabled() ||
523 !bp_loc_sp->GetBreakpoint().IsEnabled())
529 if (!bp_loc_sp->ValidForThisThread(*thread_sp)) {
531 "Breakpoint %s hit on thread 0x%llx but it was not "
532 "for this thread, continuing.",
534 static_cast<unsigned long long>(thread_sp->GetID()));
540 std::pair<std::unordered_set<break_id_t>::iterator,
bool> result =
541 precondition_breakpoints.insert(
542 bp_loc_sp->GetBreakpoint().GetID());
546 bool precondition_result =
547 bp_loc_sp->GetBreakpoint().EvaluatePrecondition(context);
548 if (!precondition_result) {
549 actually_said_continue =
true;
556 if (!bp_loc_sp->GetCondition())
557 actually_hit_any_locations =
true;
560 bool condition_says_stop =
561 bp_loc_sp->ConditionSaysStop(exe_ctx, condition_error);
563 if (!condition_error.
Success()) {
566 actually_hit_any_locations =
true;
567 const char *err_str =
568 condition_error.
AsCString(
"<unknown error>");
569 LLDB_LOGF(log,
"Error evaluating condition: \"%s\"\n", err_str);
572 strm <<
"stopped due to an error evaluating condition of "
575 strm <<
": \"" << bp_loc_sp->GetCondition().GetText() <<
"\"\n";
583 "Condition evaluated for breakpoint %s on thread "
584 "0x%llx condition_says_stop: %i.",
586 static_cast<unsigned long long>(thread_sp->GetID()),
587 condition_says_stop);
588 if (condition_says_stop)
589 actually_hit_any_locations =
true;
594 bp_loc_sp->UndoBumpHitCount();
595 actually_said_continue =
true;
605 if (!bp_loc_sp->IgnoreCountShouldStop()) {
606 actually_said_continue =
true;
616 bool auto_continue_says_stop =
true;
617 if (bp_loc_sp->IsAutoContinue())
620 "Continuing breakpoint %s as AutoContinue was set.",
624 if (!bp_loc_sp->GetBreakpoint().IsInternal())
625 thread_sp->SetShouldReportStop(
eVoteYes);
626 auto_continue_says_stop =
false;
629 bool callback_says_stop =
true;
639 if (!bp_loc_sp->IsCallbackSynchronous()) {
640 Debugger &debugger = thread_sp->CalculateTarget()->GetDebugger();
644 callback_says_stop = bp_loc_sp->InvokeCallback(&context);
648 if (callback_says_stop && auto_continue_says_stop)
651 actually_said_continue =
true;
654 if (
m_should_stop && !bp_loc_sp->GetBreakpoint().IsInternal())
655 all_stopping_locs_internal =
false;
659 if (callback_says_stop && bp_loc_sp &&
660 bp_loc_sp->GetBreakpoint().IsOneShot()) {
661 thread_sp->GetProcess()->GetTarget().RemoveBreakpointByID(
662 bp_loc_sp->GetBreakpoint().GetID());
669 actually_said_continue =
true;
685 actually_hit_any_locations =
true;
689 "Process::%s could not find breakpoint site id: %" PRId64
695 thread_sp->CompletedPlanOverridesBreakpoint()) {
704 thread_sp->CalculatePublicStopInfo();
705 }
else if (!actually_hit_any_locations) {
709 LLDB_LOGF(log,
"Process::%s all locations failed condition checks.",
714 "Process::%s returning from action with m_should_stop: %d.",
727 ProcessSP process_sp = thread_sp->GetProcess();
731 return process_sp->GetBreakpointSiteList().FindByID(
m_value);
765 const bool notify =
false;
774 bool was_disabled =
watchpoint_sp->IsDisabledDuringEphemeralMode();
776 const bool notify =
false;
845 bool current_plan)
override {
925 LLDB_LOG(log,
"We didn't run but stopped with a StopInfoWatchpoint, we "
926 "have already handled this one, don't do it again.");
933 thread_sp->CalculateTarget()->GetWatchpointList().FindByID(
GetValue()));
938 "Process::%s could not find watchpoint location id: %" PRId64
966 bool wp_triggers_after = process_sp->GetWatchpointReportedAfter();
968 if (!wp_triggers_after) {
971 = std::static_pointer_cast<StopInfoWatchpoint>(shared_from_this());
973 std::make_shared<ThreadPlanStepOverWatchpoint>(*(thread_sp.get()),
974 me_as_siwp_sp, wp_sp);
977 step_over_wp_sp->SetIsControllingPlan(
true);
978 step_over_wp_sp->SetOkayToDiscard(
false);
981 error = thread_sp->QueueThreadPlan(step_over_wp_sp,
false);
983 if (!
error.Success()) {
984 LLDB_LOGF(log,
"Could not push our step over watchpoint plan: %s",
993 thread_sp->SetShouldRunBeforePublicStop(
true);
1021 LLDB_LOGF(log,
"StopInfoWatchpoint::PerformAction - Hit a "
1022 "watchpoint while running an expression,"
1023 " not running commands to avoid recursion.");
1037 thread_sp->CalculateTarget()->GetWatchpointList().FindByID(
1050 wp_sp->UndoHitCount();
1053 if (wp_sp->GetHitCount() <= wp_sp->GetIgnoreCount()) {
1060 if (
m_should_stop && wp_sp->GetConditionText() !=
nullptr) {
1070 exe_ctx, expr_options, wp_sp->GetConditionText(),
1071 llvm::StringRef(), result_value_sp);
1074 if (result_value_sp) {
1076 if (result_value_sp->ResolveValue(scalar_value)) {
1080 wp_sp->UndoHitCount();
1085 "Condition successfully evaluated, result is %s.\n",
1091 "Failed to get an integer result from the expression.");
1095 const char *err_str =
"<unknown error>";
1096 if (result_value_sp)
1097 err_str = result_value_sp->GetError().AsCString();
1099 LLDB_LOGF(log,
"Error evaluating condition: \"%s\"\n", err_str);
1102 strm <<
"stopped due to an error evaluating condition of "
1105 strm <<
": \"" << wp_sp->GetConditionText() <<
"\"\n";
1126 bool stop_requested = wp_sp->InvokeCallback(&context);
1143 if (
m_should_stop && !wp_sp->WatchedValueReportable(exe_ctx)) {
1144 wp_sp->UndoHitCount();
1150 wp_sp->CaptureWatchedValue(exe_ctx);
1154 if (wp_sp->DumpSnapshots(output_up.get()))
1162 "Process::%s could not find watchpoint id: %" PRId64
"...",
1166 "Process::%s returning from action with m_should_stop: %d.",
1201 std::optional<int> code)
1213 return thread_sp->GetProcess()->GetUnixSignals()->GetShouldStop(
m_value);
1229 bool should_notify =
1230 thread_sp->GetProcess()->GetUnixSignals()->GetShouldNotify(
m_value);
1231 if (should_notify) {
1234 "thread {0:d} received signal: {1}", thread_sp->GetIndexID(),
1235 thread_sp->GetProcess()->GetUnixSignals()->GetSignalAsStringRef(
1240 return should_notify;
1248 if (!thread_sp->GetProcess()->GetUnixSignals()->GetShouldSuppress(
1250 thread_sp->SetResumeSignal(
m_value);
1258 UnixSignalsSP unix_signals = thread_sp->GetProcess()->GetUnixSignals();
1262 std::string signal_name =
1264 if (signal_name.size())
1265 strm << signal_name;
1290 return thread_sp->GetProcess()->GetUnixSignals()->GetShouldStop(
m_value);
1343 std::optional<uint32_t>
1350 StackFrameSP frame_0_sp = thread_sp->GetStackFrameAtIndex(0);
1353 if (!frame_0_sp->IsInlined())
1355 Block *block_ptr = frame_0_sp->GetFrameBlock();
1358 Address pc_address = frame_0_sp->GetFrameCodeAddress();
1364 int num_inlined_functions = 0;
1367 container_ptr !=
nullptr;
1369 if (!container_ptr->GetRangeContainingAddress(pc_address,
1375 num_inlined_functions++;
1377 inlined_stack =
true;
1378 return num_inlined_functions + 1;
1429 return "processor trace event";
1453 return "history boundary";
1490 return m_plan_sp->ShouldStop(event_ptr);
1512 return thread_sp->GetProcess()->GetStopOnExec();
1528 thread_sp->GetProcess()->DidExec();
1556 ProcessSP process_sp = thread_sp->GetProcess();
1557 if (process_sp && process_sp->GetModIDRef().IsRunningExpression() &&
1558 thread_sp->IsRunningCallFunctionPlan())
1584 bool is_expression_fork =
1585 thread_sp->GetProcess()->GetModIDRef().IsRunningExpression() &&
1586 thread_sp->IsRunningCallFunctionPlan();
1588 is_expression_fork);
1612 ProcessSP process_sp = thread_sp->GetProcess();
1613 if (process_sp && process_sp->GetModIDRef().IsRunningExpression() &&
1614 thread_sp->IsRunningCallFunctionPlan())
1639 bool is_expression_fork =
1640 thread_sp->GetProcess()->GetModIDRef().IsRunningExpression() &&
1641 thread_sp->IsRunningCallFunctionPlan();
1643 is_expression_fork);
1665 ProcessSP process_sp = thread_sp->GetProcess();
1666 if (process_sp && process_sp->GetModIDRef().IsRunningExpression() &&
1667 thread_sp->IsRunningCallFunctionPlan())
1685 thread_sp->GetProcess()->DidVForkDone();
1695 thread.SetThreadHitBreakpointSite();
1697 return std::make_shared<StopInfoBreakpoint>(thread, break_id);
1703 return std::make_shared<StopInfoBreakpoint>(thread, break_id, should_stop);
1710 bool silently_continue) {
1711 return std::make_shared<StopInfoWatchpoint>(thread, watch_id,
1716 const char *description,
1717 std::optional<int> code) {
1718 thread.GetProcess()->GetUnixSignals()->IncrementSignalHitCount(signo);
1719 return std::make_shared<StopInfoUnixSignal>(thread, signo, description, code);
1723 const char *description) {
1724 return std::make_shared<StopInfoInterrupt>(thread, signo, description);
1728 return std::make_shared<StopInfoTrace>(thread);
1734 return std::make_shared<StopInfoThreadPlan>(plan_sp, return_valobj_sp,
1735 expression_variable_sp);
1739 const char *description) {
1740 return std::make_shared<StopInfoException>(thread, description);
1744 const char *description) {
1745 return std::make_shared<StopInfoProcessorTrace>(thread, description);
1749 const char *description) {
1750 return std::make_shared<StopInfoHistoryBoundary>(thread, description);
1754 return std::make_shared<StopInfoExec>(thread);
1760 return std::make_shared<StopInfoFork>(thread, child_pid, child_tid);
1767 return std::make_shared<StopInfoVFork>(thread, child_pid, child_tid);
1771 return std::make_shared<StopInfoVForkDone>(thread);
1797 if (!stop_info_sp) {
1801 const char *description = stop_info_sp->GetDescription();
1806 ThreadSP thread_sp = stop_info_sp->GetThread();
1818 const char address_string[] =
"address=";
1820 const char *address_loc = strstr(description, address_string);
1825 address_loc += (
sizeof(address_string) - 1);
1827 uint64_t address = strtoull(address_loc,
nullptr, 0);
1828 if (crashing_address) {
1829 *crashing_address = address;
1832 return frame_sp->GuessValueForAddress(address);
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,...)
A section + offset based address range class.
Address & GetBaseAddress()
Get accessor for the base address of the range.
A section + offset based address class.
virtual bool IsValidTrapInstruction(llvm::ArrayRef< uint8_t > reference, llvm::ArrayRef< uint8_t > observed) const
Returns whether a given byte sequence is a valid trap instruction for the architecture.
A class that describes a single lexical block.
bool GetRangeContainingAddress(const Address &addr, AddressRange &range)
Block * GetInlinedParent()
Get the inlined parent block for this block.
lldb::BreakpointLocationSP GetByIndex(size_t i)
Returns a shared pointer to the breakpoint location with index i.
void Add(const lldb::BreakpointLocationSP &bp_loc_sp)
Add the breakpoint bp_loc_sp to the list.
size_t GetSize() const
Returns the number of elements in this breakpoint location list.
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
bool IsOneShot() const
Check the OneShot state.
bool IsInternal() const
Tell whether this breakpoint is an "internal" breakpoint.
A class to manage flag bits.
void SetAsyncExecution(bool async)
static void ReportWarning(std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr)
Report warning events.
static void ReportError(std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr)
Report error events.
lldb::StreamUP GetAsyncOutputStream()
void SetUnwindOnError(bool unwind=false)
void SetIgnoreBreakpoints(bool ignore=false)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
const lldb::ProcessSP & GetProcessSP() const
Get accessor to get the process shared pointer.
Target & GetTargetRef() const
Returns a reference to the target object.
Process * GetProcessPtr() const
Returns a pointer to the process object.
RAII guard that pushes a policy on construction and pops on destruction.
static PolicyStack & Get()
bool IsRunningExpression() const
bool GetIgnoreBreakpointsInExpressions() const
static void AddRestartedReason(Event *event_ptr, const char *reason)
A plug-in interface definition class for debugging a process.
const ProcessModID & GetModIDRef() const
Target & GetTarget()
Get the target object pointer for this module.
unsigned long long ULongLong(unsigned long long fail_value=0) const
const char * AsCString(const char *default_error_str="unknown error") const
Get the error string associated with the current error.
bool Success() const
Test for success condition.
void PerformAction(Event *event_ptr) override
BreakpointSiteSP GetBreakpointSiteSP() const
std::optional< uint32_t > GetSuggestedStackFrameIndex(bool inlined_stack) override
This gives the StopInfo a chance to suggest a stack frame to select.
const char * GetDescription() override
bool ShouldStopSynchronous(Event *event_ptr) override
bool IsValidForOperatingSystemThread(Thread &thread) override
bool DoShouldNotify(Event *event_ptr) override
bool ShouldShow() const override
Returns true if this is a stop reason that should be shown to a user when viewing the thread with thi...
uint32_t GetStopReasonDataCount() const override
~StopInfoBreakpoint() override=default
bool ShouldSelect() const override
Returns true if this is a stop reason that should cause a thread to be selected when stopping.
StopInfoBreakpoint(Thread &thread, break_id_t break_id, bool should_stop)
bool m_should_perform_action
lldb::break_id_t m_break_id
StopInfoBreakpoint(Thread &thread, break_id_t break_id)
BreakpointLocationCollection m_async_stopped_locs
The StopInfoBreakpoint lives after the stop, and could get queried at any time so we need to make sur...
bool ShouldStop(Event *event_ptr) override
uint64_t GetStopReasonDataAtIndex(uint32_t idx) override
bool m_should_stop_is_valid
StopReason GetStopReason() const override
uint64_t GetStopReasonDataAtIndex(uint32_t idx) override
const char * GetDescription() override
uint32_t GetStopReasonDataCount() const override
~StopInfoException() override=default
StopInfoException(Thread &thread, const char *description)
StopReason GetStopReason() const override
~StopInfoExec() override=default
StopInfoExec(Thread &thread)
const char * GetDescription() override
StopReason GetStopReason() const override
void PerformAction(Event *event_ptr) override
bool ShouldStop(Event *event_ptr) override
uint32_t GetStopReasonDataCount() const override
void PerformAction(Event *event_ptr) override
bool ShouldStop(Event *event_ptr) override
StopReason GetStopReason() const override
uint64_t GetStopReasonDataAtIndex(uint32_t idx) override
StopInfoFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
~StopInfoFork() override=default
const char * GetDescription() override
StopReason GetStopReason() const override
const char * GetDescription() override
~StopInfoHistoryBoundary() override=default
StopInfoHistoryBoundary(Thread &thread, const char *description)
uint32_t GetStopReasonDataCount() const override
StopInfoInterrupt(Thread &thread, int signo, const char *description)
const char * GetDescription() override
StopReason GetStopReason() const override
uint64_t GetStopReasonDataAtIndex(uint32_t idx) override
~StopInfoInterrupt() override=default
StopInfoProcessorTrace(Thread &thread, const char *description)
~StopInfoProcessorTrace() override=default
const char * GetDescription() override
StopReason GetStopReason() const override
ValueObjectSP m_return_valobj_sp
bool ShouldStop(Event *event_ptr) override
~StopInfoThreadPlan() override=default
ExpressionVariableSP m_expression_variable_sp
ExpressionVariableSP GetExpressionVariable()
const char * GetDescription() override
StopReason GetStopReason() const override
ValueObjectSP GetReturnValueObject()
StopInfoThreadPlan(ThreadPlanSP &plan_sp, ValueObjectSP &return_valobj_sp, ExpressionVariableSP &expression_variable_sp)
const char * GetDescription() override
~StopInfoTrace() override=default
StopReason GetStopReason() const override
StopInfoTrace(Thread &thread)
std::optional< uint32_t > GetSuggestedStackFrameIndex(bool inlined_stack) override
This gives the StopInfo a chance to suggest a stack frame to select.
bool IsShouldStopSignal() const
StopInfoUnixSignal(Thread &thread, int signo, const char *description, std::optional< int > code)
void WillResume(lldb::StateType resume_state) override
bool DoShouldNotify(Event *event_ptr) override
~StopInfoUnixSignal() override=default
const char * GetDescription() override
std::optional< int > m_code
bool ShouldStopSynchronous(Event *event_ptr) override
uint32_t GetStopReasonDataCount() const override
bool ShouldStop(Event *event_ptr) override
StopReason GetStopReason() const override
uint64_t GetStopReasonDataAtIndex(uint32_t idx) override
bool ShouldSelect() const override
Returns true if this is a stop reason that should cause a thread to be selected when stopping.
void PerformAction(Event *event_ptr) override
const char * GetDescription() override
~StopInfoVForkDone() override=default
bool ShouldStop(Event *event_ptr) override
StopInfoVForkDone(Thread &thread)
StopReason GetStopReason() const override
void PerformAction(Event *event_ptr) override
bool ShouldStop(Event *event_ptr) override
uint64_t GetStopReasonDataAtIndex(uint32_t idx) override
StopReason GetStopReason() const override
void PerformAction(Event *event_ptr) override
~StopInfoVFork() override=default
StopInfoVFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
const char * GetDescription() override
uint32_t GetStopReasonDataCount() const override
ThreadPlanStepOverWatchpoint(Thread &thread, StopInfoWatchpointSP stop_info_sp, WatchpointSP watch_sp)
StopInfoWatchpointSP m_stop_info_sp
bool DoPlanExplainsStop(Event *event_ptr) override
bool ShouldStop(Event *event_ptr) override
bool ShouldRunBeforePublicStop() override
bool DoWillResume(lldb::StateType resume_state, bool current_plan) override
WatchpointSP watchpoint_sp
WatchpointSentry(ProcessSP p_sp, WatchpointSP w_sp)
static bool SentryPreResumeAction(void *sentry_void)
~StopInfoWatchpoint() override=default
std::shared_ptr< StopInfoWatchpoint > StopInfoWatchpointSP
StopInfoWatchpoint(Thread &thread, break_id_t watch_id, bool silently_skip_wp)
uint32_t GetStopReasonDataCount() const override
const char * GetDescription() override
void PerformAction(Event *event_ptr) override
void SetStepOverPlanComplete()
bool ShouldStop(Event *event_ptr) override
bool m_using_step_over_plan
bool m_should_stop_is_valid
bool ShouldStopSynchronous(Event *event_ptr) override
bool m_step_over_plan_complete
uint64_t GetStopReasonDataAtIndex(uint32_t idx) override
StopReason GetStopReason() const override
std::string m_description
static lldb::StopInfoSP CreateStopReasonWithPlan(lldb::ThreadPlanSP &plan, lldb::ValueObjectSP return_valobj_sp, lldb::ExpressionVariableSP expression_variable_sp)
uint64_t GetValue() const
static lldb::ExpressionVariableSP GetExpressionVariable(lldb::StopInfoSP &stop_info_sp)
static lldb::ValueObjectSP GetReturnValueObject(lldb::StopInfoSP &stop_info_sp)
static lldb::StopInfoSP CreateStopReasonToTrace(Thread &thread)
static lldb::StopInfoSP CreateStopReasonVFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
static lldb::StopInfoSP CreateStopReasonWithInterrupt(Thread &thread, int signo, const char *description)
StructuredData::ObjectSP m_extended_info
static lldb::StopInfoSP CreateStopReasonWithSignal(Thread &thread, int signo, const char *description=nullptr, std::optional< int > code=std::nullopt)
lldb::ThreadSP GetThread() const
static lldb::StopInfoSP CreateStopReasonFork(Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
static lldb::StopInfoSP CreateStopReasonVForkDone(Thread &thread)
static lldb::StopInfoSP CreateStopReasonWithWatchpointID(Thread &thread, lldb::break_id_t watch_id, bool silently_continue=false)
virtual void SetDescription(const char *desc_cstr)
static lldb::StopInfoSP CreateStopReasonWithException(Thread &thread, const char *description)
static lldb::StopInfoSP CreateStopReasonWithBreakpointSiteID(Thread &thread, lldb::break_id_t break_id)
static lldb::StopInfoSP CreateStopReasonHistoryBoundary(Thread &thread, const char *description)
static lldb::ValueObjectSP GetCrashingDereference(lldb::StopInfoSP &stop_info_sp, lldb::addr_t *crashing_address=nullptr)
LazyBool m_override_should_notify
static lldb::StopInfoSP CreateStopReasonProcessorTrace(Thread &thread, const char *description)
static lldb::StopInfoSP CreateStopReasonWithExec(Thread &thread)
bool HasTargetRunSinceMe()
StopInfo(Thread &thread, uint64_t value)
lldb::ThreadWP m_thread_wp
LazyBool m_override_should_stop
void SkipOverTrapInstruction()
virtual bool ShouldStop(Event *event_ptr)
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
lldb::break_id_t GetID() const
const char * GetData() const
llvm::StringRef GetString() const
void Format(const char *format, Args &&... args)
Forwards the arguments to llvm::formatv and writes to the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Debugger & GetDebugger() const
bool DoPlanExplainsStop(Event *event_ptr) override
ThreadPlanStepInstruction(Thread &thread, bool step_over, bool stop_others, Vote report_stop_vote, Vote report_run_vote)
bool MischiefManaged() override
bool ShouldStop(Event *event_ptr) override
Thread & GetThread()
Returns the Thread that is using this thread plan.
virtual lldb::StopInfoSP GetPrivateStopInfo(bool calculate=true)
void SetStopInfo(const lldb::StopInfoSP &stop_info_sp)
lldb::ProcessSP GetProcess() const
static lldb::ExpressionResults Evaluate(ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options, llvm::StringRef expr_cstr, llvm::StringRef expr_prefix, lldb::ValueObjectSP &result_valobj_sp, std::string *fixed_expression=nullptr, ValueObject *ctx_obj=nullptr)
Evaluate one expression in the scratch context of the target passed in the exe_ctx and return its res...
#define LLDB_INVALID_BREAK_ID
#define LLDB_INVALID_ADDRESS
@ DoNoSelectMostRelevantFrame
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.
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::BreakpointSite > BreakpointSiteSP
std::shared_ptr< lldb_private::BreakpointLocation > BreakpointLocationSP
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::ExpressionVariable > ExpressionVariableSP
std::shared_ptr< lldb_private::UnixSignals > UnixSignalsSP
StateType
Process and Thread States.
@ eStateStopped
Process or thread is stopped and can be examined.
@ eStateSuspended
Process or thread is in a suspended state as far as the debugger is concerned while other processes o...
@ eStateRunning
Process or thread is running and can't be examined.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
ExpressionResults
The results of expression evaluation.
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Watchpoint > WatchpointSP
std::shared_ptr< lldb_private::StopInfo > StopInfoSP
StopReason
Thread stop reasons.
@ eStopReasonPlanComplete
@ eStopReasonHistoryBoundary
@ eStopReasonExec
Program was re-exec'ed.
@ eStopReasonInterrupt
Thread requested interrupt.
@ eStopReasonProcessorTrace
std::unique_ptr< lldb_private::Stream > StreamUP
bool can_run_breakpoint_actions
Describes what view of the process a thread should see and what operations it is allowed to perform.
Capabilities capabilities
static Policy PrivateState()
lldb::user_id_t GetID() const
Get accessor for the user ID.