60#include "llvm/Support/MathExtras.h"
72 return *g_settings_ptr;
75#define LLDB_PROPERTIES_thread
76#include "TargetProperties.inc"
79#define LLDB_PROPERTIES_thread
80#include "TargetPropertiesEnum.inc"
84 :
public Cloneable<ThreadOptionValueProperties, OptionValueProperties> {
99 thread->GetValueProperties().get());
100 if (
this != instance_properties)
110 m_collection_sp = std::make_shared<ThreadOptionValueProperties>(
"thread");
120 const uint32_t idx = ePropertyStepAvoidRegex;
125 const uint32_t idx = ePropertyStepAvoidLibraries;
130 const uint32_t idx = ePropertyEnableThreadTrace;
132 idx, g_thread_properties[idx].default_uint_value != 0);
136 const uint32_t idx = ePropertyStepInAvoidsNoDebug;
138 idx, g_thread_properties[idx].default_uint_value != 0);
142 const uint32_t idx = ePropertyStepOutAvoidsNoDebug;
144 idx, g_thread_properties[idx].default_uint_value != 0);
148 const uint32_t idx = ePropertyMaxBacktraceDepth;
150 idx, g_thread_properties[idx].default_uint_value);
154 const uint32_t idx = ePropertySingleThreadPlanTimeout;
156 idx, g_thread_properties[idx].default_uint_value);
162 return "Thread::ThreadEventData";
212 frame_sp = thread_sp->GetStackFrameList()->GetFrameWithStackID(
222 static constexpr llvm::StringLiteral class_name(
"lldb.thread");
228 Broadcaster(process.GetTarget().GetDebugger().GetBroadcasterManager(),
235 : process.GetNextThreadIndexID(tid)),
244 LLDB_LOGF(log,
"%p Thread::Thread(tid = 0x%4.4" PRIx64
")",
245 static_cast<void *
>(
this),
GetID());
252 LLDB_LOGF(log,
"%p Thread::~Thread(tid = 0x%4.4" PRIx64
")",
253 static_cast<void *
>(
this),
GetID());
282 std::make_shared<ThreadEventData>(shared_from_this(), new_frame_id);
290 StackFrameSP frame_sp = stack_frame_list_sp->GetFrameAtIndex(
291 stack_frame_list_sp->GetSelectedFrameIndex(select_most_relevant));
319 const bool broadcast =
true;
324 bool already_shown =
false;
326 frame_sp->GetSymbolContext(eSymbolContextLineEntry));
334 "OpenFileInExternalEditor failed: {0}");
336 already_shown =
true;
340 bool show_frame_info =
true;
341 bool show_source = !already_shown;
343 return frame_sp->GetStatus(output_stream, show_frame_info, show_source);
356 GetProcess()->GetWarningsUnsupportedLanguage())) {
360 GetProcess()->PrintWarningUnsupportedLanguage(sc);
370 const uint32_t stop_id = process_sp ? process_sp->GetStopID() :
UINT32_MAX;
380 bool have_valid_completed_plan = completed_plan_sp && completed_plan_sp->PlanSucceeded();
381 bool plan_failed = completed_plan_sp && !completed_plan_sp->PlanSucceeded();
382 bool plan_overrides_trace =
383 have_valid_stop_info && have_valid_completed_plan
386 if (have_valid_stop_info && !plan_overrides_trace && !plan_failed) {
388 }
else if (completed_plan_sp) {
411 const uint32_t process_stop_id = process_sp->GetStopID();
444 process_sp->GetTarget().GetArchitecturePlugin())
445 arch->OverrideStopInfo(*
this);
461 return stop_info_sp->GetStopReason();
496 LLDB_LOGF(log,
"%p: tid = 0x%" PRIx64
": stop info = %s (stop_id = %u)",
497 static_cast<void *
>(
this),
GetID(),
498 stop_info_sp ? stop_info_sp->GetDescription() :
"<NULL>",
529 if (reg_checkpoint_sp) {
531 if (reg_ctx_sp && reg_ctx_sp->ReadAllRegisterValues(*reg_checkpoint_sp))
562 reg_ctx_sp->InvalidateIfNeeded(
true);
601 auto recognized_frame_sp = frame_sp->GetRecognizedFrame();
603 if (!recognized_frame_sp)
606 std::string recognized_stop_description =
607 recognized_frame_sp->GetStopDescription();
609 if (!recognized_stop_description.empty())
610 return recognized_stop_description;
617 std::string raw_stop_description;
618 if (stop_info_sp && stop_info_sp->IsValid()) {
619 raw_stop_description = stop_info_sp->GetDescription();
620 assert((!raw_stop_description.empty() ||
622 "StopInfo returned an empty description.");
624 return raw_stop_description;
655 if (reg_ctx_sp && process_sp && direction ==
eRunForward) {
656 const addr_t thread_pc = reg_ctx_sp->GetPC();
658 process_sp->GetBreakpointSiteList().FindByAddress(thread_pc);
673 bool push_step_over_bp_plan =
false;
678 push_step_over_bp_plan =
true;
680 push_step_over_bp_plan =
true;
682 if (push_step_over_bp_plan) {
684 if (step_bp_plan_sp) {
685 step_bp_plan_sp->SetPrivate(
true);
690 step_bp_plan_sp.get());
713 if (backing_thread_sp)
714 backing_thread_sp->SetTemporaryResumeState(resume_state);
726 const uint32_t process_stop_id =
GetProcess()->GetStopID();
730 stop_info_sp->WillResume(resume_state);
738 bool need_to_resume =
false;
741 need_to_resume = plan_ptr->
WillResume(resume_state,
true);
755 if (need_to_resume) {
771 return need_to_resume;
785 bool should_stop =
true;
791 "Thread::%s for tid = 0x%4.4" PRIx64
" 0x%4.4" PRIx64
792 ", should_stop = 0 (ignore since thread was suspended)",
799 "Thread::%s for tid = 0x%4.4" PRIx64
" 0x%4.4" PRIx64
800 ", should_stop = 0 (ignore since thread was suspended)",
810 "Thread::%s for tid = 0x%4.4" PRIx64
" 0x%4.4" PRIx64
811 ", pc = 0x%16.16" PRIx64
812 ", should_stop = 0 (ignore since no stop reason)",
824 "Thread::%s(%p) for tid = 0x%4.4" PRIx64
" 0x%4.4" PRIx64
825 ", pc = 0x%16.16" PRIx64,
829 LLDB_LOGF(log,
"^^^^^^^^ Thread::ShouldStop Begin ^^^^^^^^");
846 if (private_stop_info &&
847 !private_stop_info->ShouldStopSynchronous(event_ptr)) {
848 LLDB_LOGF(log,
"StopInfo::ShouldStop async callback says we should not "
849 "stop, returning ShouldStop of false.");
868 bool done_processing_current_plan =
false;
871 done_processing_current_plan =
true;
887 should_stop = plan_ptr->
ShouldStop(event_ptr);
906 done_processing_current_plan =
910 if (should_force_run) {
914 done_processing_current_plan =
true;
922 if (!done_processing_current_plan) {
923 bool override_stop =
false;
927 should_stop = current_plan->
ShouldStop(event_ptr);
928 LLDB_LOGF(log,
"Base plan says should stop: %i.", should_stop);
937 should_stop = current_plan->
ShouldStop(event_ptr);
945 override_stop =
true;
946 LLDB_LOGF(log,
"Plan %s auto-continue: true.",
963 if (current_plan ==
nullptr) {
995 "Plan %s being discarded in cleanup, it says it is already done.",
1018 LLDB_LOGF(log,
"vvvvvvvv Thread::ShouldStop End (returning %i) vvvvvvvv",
1032 "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
1033 ": returning vote %i (state was suspended or invalid)",
1041 "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
1042 ": returning vote %i (temporary state was suspended or invalid)",
1049 "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
1050 ": returning vote %i (thread didn't stop for a reason.)",
1055 if (
GetPlans().AnyCompletedPlans()) {
1059 "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
1060 ": returning vote for complete stack's back plan",
1077 "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
1078 ": returning vote %i for current plan",
1079 GetID(), thread_vote);
1093 if (
GetPlans().AnyCompletedPlans()) {
1099 "Current Plan for thread %d(%p) (0x%4.4" PRIx64
1100 ", %s): %s being asked whether we should report run.",
1104 return plan->ShouldReportRun(event_ptr);
1107 "Current Plan for thread %d(%p) (0x%4.4" PRIx64
1108 ", %s): %s being asked whether we should report run.",
1138 assert(thread_plan_sp &&
"Don't push an empty thread plan.");
1144 LLDB_LOGF(log,
"Thread::PushPlan(0x%p): \"%s\", tid = 0x%4.4" PRIx64
".",
1145 static_cast<void *
>(
this), s.
GetData(),
1146 thread_plan_sp->GetThread().GetID());
1155 LLDB_LOGF(log,
"Popping plan: \"%s\", tid = 0x%4.4" PRIx64
".",
1156 popped_plan_sp->GetName(), popped_plan_sp->GetThread().GetID());
1163 LLDB_LOGF(log,
"Discarding plan: \"%s\", tid = 0x%4.4" PRIx64
".",
1164 discarded_plan_sp->GetName(),
1165 discarded_plan_sp->GetThread().GetID());
1226 bool abort_other_plans) {
1229 if (!thread_plan_sp->ValidatePlan(&s)) {
1231 thread_plan_sp.reset();
1235 if (abort_other_plans)
1244 if (!thread_plan_sp->ValidatePlan(&s)) {
1246 thread_plan_sp.reset();
1258 if (up_to_plan_ptr ==
nullptr)
1272 "Discarding thread plans for thread tid = 0x%4.4" PRIx64
1274 GetID(),
static_cast<void *
>(up_to_plan_ptr));
1281 "Discarding thread plans for thread (tid = 0x%4.4" PRIx64
1295 if (!innermost_expr_plan) {
1297 "No expressions currently active on this thread");
1307 return thread_plan_sp;
1311 bool step_over,
bool abort_other_plans,
bool stop_other_threads,
1316 return thread_plan_sp;
1322 Status &status,
LazyBool step_out_avoids_code_withoug_debug_info) {
1324 thread_plan_sp = std::make_shared<ThreadPlanStepOverRange>(
1325 *
this, range, addr_context, stop_other_threads,
1326 step_out_avoids_code_withoug_debug_info);
1329 return thread_plan_sp;
1335 bool abort_other_plans,
const LineEntry &line_entry,
1337 Status &status,
LazyBool step_out_avoids_code_withoug_debug_info) {
1338 const bool include_inlined_functions =
true;
1339 auto address_range =
1342 abort_other_plans, address_range, addr_context, stop_other_threads,
1343 status, step_out_avoids_code_withoug_debug_info);
1348 const SymbolContext &addr_context, llvm::StringRef step_in_target,
1350 LazyBool step_in_avoids_code_without_debug_info,
1351 LazyBool step_out_avoids_code_without_debug_info) {
1353 *
this, range, addr_context, step_in_target.str(), stop_other_threads,
1354 step_in_avoids_code_without_debug_info,
1355 step_out_avoids_code_without_debug_info));
1357 return thread_plan_sp;
1362 bool abort_other_plans,
const LineEntry &line_entry,
1363 const SymbolContext &addr_context, llvm::StringRef step_in_target,
1365 LazyBool step_in_avoids_code_without_debug_info,
1366 LazyBool step_out_avoids_code_without_debug_info) {
1367 const bool include_inlined_functions =
false;
1371 addr_context, step_in_target, stop_other_threads, status,
1372 step_in_avoids_code_without_debug_info,
1373 step_out_avoids_code_without_debug_info);
1377 bool abort_other_plans,
SymbolContext *addr_context,
bool first_insn,
1378 bool stop_other_threads,
Vote report_stop_vote,
Vote report_run_vote,
1379 uint32_t frame_idx,
Status &status,
1380 LazyBool step_out_avoids_code_without_debug_info) {
1382 *
this, addr_context, first_insn, stop_other_threads, report_stop_vote,
1383 report_run_vote, frame_idx, step_out_avoids_code_without_debug_info));
1386 return thread_plan_sp;
1390 bool abort_other_plans,
SymbolContext *addr_context,
bool first_insn,
1391 bool stop_other_threads,
Vote report_stop_vote,
Vote report_run_vote,
1392 uint32_t frame_idx,
Status &status,
bool continue_to_next_branch) {
1393 const bool calculate_return_value =
1396 *
this, stop_other_threads, report_stop_vote, report_run_vote, frame_idx,
1397 continue_to_next_branch, calculate_return_value));
1404 return thread_plan_sp;
1408 bool abort_other_plans,
1409 bool stop_other_threads,
1413 if (!thread_plan_sp || !thread_plan_sp->ValidatePlan(
nullptr))
1417 return thread_plan_sp;
1422 bool stop_other_threads,
1428 return thread_plan_sp;
1432 bool abort_other_plans, llvm::ArrayRef<addr_t> address_list,
1433 bool stop_other_threads, uint32_t frame_idx,
Status &status) {
1434 ThreadPlanSP thread_plan_sp = std::make_shared<ThreadPlanStepUntil>(
1435 *
this, address_list, stop_other_threads, frame_idx);
1438 return thread_plan_sp;
1443 bool stop_other_threads,
Status &status) {
1446 thread_plan_sp->SetStopOthers(stop_other_threads);
1448 return thread_plan_sp;
1457 target_sp = process_sp->CalculateTarget();
1476 "Thread::PushProviderFrameList: tid = {0:x}, depth = {1} -> {2}",
1477 GetID(), stack.size(), stack.size() + 1);
1478 stack.push_back(std::move(frames));
1485 size_t pre_pop_depth =
1488 "Thread::PopProviderFrameList: tid = {0:x}, depth = {1} -> {2}",
1489 GetID(), pre_pop_depth, pre_pop_depth ? pre_pop_depth - 1 : 0);
1493 it->second.pop_back();
1494 if (it->second.empty())
1557 return it->second.back();
1582 Target &target = process_sp->GetTarget();
1586 std::vector<const ScriptedFrameProviderDescriptor *> thread_descriptors;
1587 for (
const auto &entry : descriptors) {
1590 thread_descriptors.push_back(&descriptor);
1601 return priority_a < priority_b;
1605 for (
const auto *descriptor : thread_descriptors) {
1608 "Failed to load scripted frame provider: {0}");
1628 "Missing frame provider (id = {0}) in Thread #{1:x}", last_id,
1659 auto sp = it->second.lock();
1661 "GetFrameListByIdentifier({0}): found={1}, locked={2}",
id,
true,
1685 return llvm::createStringError(
"previous frame provider not found");
1688 input_frames = std::make_shared<SyntheticStackFrameList>(
1695 "Registered intermediate frame list for provider id={0}, "
1697 last_id, input_frames.use_count());
1706 auto provider_or_err =
1709 if (!provider_or_err)
1710 return provider_or_err.takeError();
1719 return llvm::Error::success();
1722llvm::Expected<ScriptedFrameProviderDescriptor>
1728 auto it = llvm::find_if(
1732 return provider_id_pair.second == id;
1736 return llvm::createStringError(
1737 "Couldn't find ScriptedFrameProviderDescriptor for id = %u.",
id);
1806 "Could not find frame with index %d in thread 0x%" PRIx64
".",
1807 frame_idx,
GetID());
1820 return return_error;
1823 Thread *thread = frame_sp->GetThread().get();
1824 uint32_t older_frame_idx = frame_sp->GetFrameIndex() + 1;
1825 StackFrameSP older_frame_sp = thread->GetStackFrameAtIndex(older_frame_idx);
1826 if (!older_frame_sp) {
1828 return return_error;
1831 if (return_value_sp) {
1836 return return_error;
1838 SymbolContext sc = frame_sp->GetSymbolContext(eSymbolContextFunction);
1843 if ( (
false) && sc.
function !=
nullptr) {
1845 if (function_type) {
1851 ValueObjectSP cast_value_sp = return_value_sp->Cast(return_type);
1852 if (cast_value_sp) {
1854 return_value_sp = cast_value_sp;
1860 return_error = abi->SetReturnValueObject(older_frame_sp, return_value_sp);
1862 return return_error;
1869 StackFrameSP youngest_frame_sp = thread->GetStackFrameAtIndex(0);
1870 if (youngest_frame_sp) {
1873 bool copy_success = reg_ctx_sp->CopyFromRegisterContext(
1874 older_frame_sp->GetRegisterContext());
1876 thread->DiscardThreadPlans(
true);
1877 thread->ClearStackFrames();
1879 auto data_sp = std::make_shared<ThreadEventData>(shared_from_this());
1892 return return_error;
1897 for (
size_t n = 0; n < list.size(); n++) {
1906 bool can_leave_function, std::string *warnings) {
1915 std::vector<Address> candidates, within_function, outside_function;
1917 within_function, outside_function);
1924 if (!within_function.empty())
1925 candidates = within_function;
1926 else if (outside_function.size() == 1 && can_leave_function)
1927 candidates = outside_function;
1930 if (candidates.empty()) {
1931 if (outside_function.empty()) {
1933 "Cannot locate an address for {0}:{1}.", file.
GetFilename(), line);
1934 }
else if (outside_function.size() == 1) {
1936 "{0}:{1} is outside the current function.", file.
GetFilename(), line);
1941 "{0}:{1} has multiple candidate locations:\n{2}", file.
GetFilename(),
1948 if (warnings && candidates.size() > 1) {
1951 "{0}:{1} appears multiple times in this function, selecting the "
1952 "first location:\n",
1955 *warnings = std::string(sstr.
GetString().trim(
'\n'));
1958 if (!reg_ctx->
SetPC(dest))
1968 if (!process || !format)
1977 frame_sc = frame_sp->GetSymbolContext(eSymbolContextEverything);
1982 nullptr,
false,
false)
1994 thread_format = &format_entry;
1997 thread_format = &format_entry;
2000 assert(thread_format);
2056 return "breakpoint";
2058 return "watchpoint";
2070 return "vfork done";
2072 return "plan complete";
2074 return "thread exiting";
2076 return "instrumentation break";
2078 return "processor trace";
2080 return "async interrupt";
2082 return "history boundary";
2085 return "StopReason = " + std::to_string(reason);
2091 return "only this thread";
2093 return "all threads";
2095 return "only during stepping";
2098 return "RunMode = " + std::to_string(mode);
2102 uint32_t num_frames, uint32_t num_frames_with_source,
2103 bool stop_format,
bool show_hidden,
bool only_stacks) {
2110 bool is_selected =
false;
2115 strm.
Printf(
"%c ", is_selected ?
'*' :
' ');
2120 frame_sp->GetSymbolContext(eSymbolContextLineEntry));
2126 "OpenFileInExternalEditor failed: {0}");
2135 size_t num_frames_shown = 0;
2136 if (num_frames > 0) {
2139 const bool show_frame_info =
true;
2140 const bool show_frame_unique = only_stacks;
2141 bool show_selected_frame =
false;
2142 if (num_frames == 1 || only_stacks ||
2146 show_selected_frame =
true;
2148 bool show_hidden_marker =
2151 strm, start_frame, num_frames, show_frame_info, num_frames_with_source,
2152 show_frame_unique, show_hidden, show_hidden_marker,
2153 show_selected_frame);
2154 if (num_frames == 1)
2158 return num_frames_shown;
2162 bool print_json_thread,
bool print_json_stopinfo) {
2163 const bool stop_format =
false;
2169 if (print_json_thread || print_json_stopinfo) {
2170 if (thread_info && print_json_thread) {
2171 thread_info->Dump(strm);
2178 stop_info->Dump(strm);
2188 thread_info->GetObjectForDotSeparatedPath(
"activity");
2190 thread_info->GetObjectForDotSeparatedPath(
"breadcrumb");
2192 thread_info->GetObjectForDotSeparatedPath(
"trace_messages");
2194 bool printed_activity =
false;
2201 strm.
Format(
" Activity '{0}', {1:x}\n",
2202 name->GetAsString()->GetValue(),
2203 id->GetUnsignedIntegerValue());
2205 printed_activity =
true;
2207 bool printed_breadcrumb =
false;
2209 if (printed_activity)
2212 breadcrumb->GetAsDictionary();
2215 if (breadcrumb_text &&
2217 strm.
Format(
" Current Breadcrumb: {0}\n",
2218 breadcrumb_text->GetAsString()->GetValue());
2220 printed_breadcrumb =
true;
2223 if (printed_breadcrumb)
2226 const size_t msg_count = messages_array->
GetSize();
2227 if (msg_count > 0) {
2228 strm.
Printf(
" %zu trace messages:\n", msg_count);
2229 for (
size_t i = 0; i < msg_count; i++) {
2233 message->GetAsDictionary();
2238 strm.
Format(
" {0}\n", message_text->GetAsString()->GetValue());
2250 uint32_t num_frames,
bool show_frame_info,
2251 uint32_t num_frames_with_source,
2255 bool show_hidden_marker =
2258 strm, first_frame, num_frames, show_frame_info, num_frames_with_source,
2259 false, show_hidden, show_hidden_marker);
2286 GetProcess()->GetBreakpointSiteList().FindByAddress(
pc);
2287 if (bp_site_sp &&
static_cast<break_id_t>(value) == bp_site_sp->GetID())
2296 LazyBool step_in_avoids_code_without_debug_info,
2297 LazyBool step_out_avoids_code_without_debug_info)
2306 const bool abort_other_plans =
false;
2308 if (source_step && frame_sp && frame_sp->HasDebugInformation()) {
2309 SymbolContext sc(frame_sp->GetSymbolContext(eSymbolContextEverything));
2311 abort_other_plans, sc.
line_entry, sc, llvm::StringRef(), run_mode,
2312 error, step_in_avoids_code_without_debug_info,
2313 step_out_avoids_code_without_debug_info);
2316 false, abort_other_plans, run_mode,
error);
2319 new_plan_sp->SetIsControllingPlan(
true);
2320 new_plan_sp->SetOkayToDiscard(
false);
2332 LazyBool step_out_avoids_code_without_debug_info) {
2340 const bool abort_other_plans =
false;
2342 if (source_step && frame_sp && frame_sp->HasDebugInformation()) {
2343 SymbolContext sc(frame_sp->GetSymbolContext(eSymbolContextEverything));
2346 step_out_avoids_code_without_debug_info);
2349 true, abort_other_plans, run_mode,
error);
2352 new_plan_sp->SetIsControllingPlan(
true);
2353 new_plan_sp->SetOkayToDiscard(
false);
2368 const bool first_instruction =
false;
2369 const bool stop_other_threads =
false;
2370 const bool abort_other_plans =
false;
2373 abort_other_plans,
nullptr, first_instruction, stop_other_threads,
2376 new_plan_sp->SetIsControllingPlan(
true);
2377 new_plan_sp->SetOkayToDiscard(
false);
2390 if (
auto recognized_frame = frame_sp->GetRecognizedFrame())
2391 if (
auto e = recognized_frame->GetExceptionObject())
2397 if (
auto e = runtime->GetExceptionObjectForThread(shared_from_this()))
2412 if (
auto bt = runtime->GetBacktraceThreadFromException(exception))
2422 Target &target = process_sp->GetTarget();
2424 assert(platform_sp);
2432 auto type_size_or_err = type.
GetByteSize(
nullptr);
2433 if (!type_size_or_err)
2437 llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>> data =
2443 DataExtractor data_extractor{data.get()->getBufferStart(), data.get()->getBufferSize(),
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,...)
#define LLDB_LOG_ERROR(log, error,...)
static void DumpAddressList(Stream &s, const std::vector< Address > &list, ExecutionContextScope *exe_scope)
ThreadOptionValueProperties(llvm::StringRef name)
const Property * GetPropertyAtIndex(size_t idx, const ExecutionContext *exe_ctx) const override
A section + offset based address range class.
A section + offset based address class.
@ DumpStyleSectionNameOffset
Display as the section name + offset.
@ DumpStyleResolvedDescription
Display the details about what an address resolves to.
An architecture specification class.
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
llvm::Triple & GetTriple()
Architecture triple accessor.
bool EventTypeHasListeners(uint32_t event_type)
Broadcaster(lldb::BroadcasterManagerSP manager_sp, std::string name)
Construct with a broadcaster with a name.
void BroadcastEvent(lldb::EventSP &event_sp)
Broadcast an event which has no associated data.
void CheckInWithManager()
A class that implements CRTP-based "virtual constructor" idiom.
Generic representation of a type in a programming language.
llvm::Expected< uint64_t > GetByteSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bytes.
CompilerType GetFunctionReturnType() const
void DumpTypeDescription(lldb::DescriptionLevel level=lldb::eDescriptionLevelFull) const
Dump to stdout.
"lldb/Utility/ArgCompletionRequest.h"
void TryCompleteCurrentArg(llvm::StringRef completion, llvm::StringRef description="")
Adds a possible completion string if the completion would complete the current argument.
A uniqued constant string class.
A class to manage flag bits.
bool GetUseExternalEditor() const
FormatEntity::Entry GetThreadStopFormat() const
llvm::StringRef GetExternalEditor() const
FormatEntity::Entry GetThreadFormat() const
bool GetMarkHiddenFrames() const
A plug-in interface definition class for dynamic loaders.
virtual lldb::addr_t GetThreadLocalData(const lldb::ModuleSP module, const lldb::ThreadSP thread, lldb::addr_t tls_file_addr)
Retrieves the per-module TLS block for a given thread.
virtual bool IsFullyInitialized()
Return whether the dynamic loader is fully initialized and it's safe to call its APIs.
virtual llvm::StringRef GetFlavor() const =0
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void SetFrameSP(const lldb::StackFrameSP &frame_sp)
Set accessor to set only the frame shared pointer.
const lldb::TargetSP & GetTargetSP() const
Get accessor to get the target shared pointer.
StackFrame * GetFramePtr() const
Returns a pointer to the frame object.
void SetContext(const lldb::TargetSP &target_sp, bool get_process)
Target * GetTargetPtr() const
Returns a pointer to the target object.
Target & GetTargetRef() const
Returns a reference to the target object.
Process * GetProcessPtr() const
Returns a pointer to the process object.
RegisterContext * GetRegisterContext() const
Thread * GetThreadPtr() const
Returns a pointer to the thread object.
llvm::StringRef GetFilename() const
Filename string const get accessor.
CompilerType GetCompilerType()
Type * GetType()
Get accessor for the type that describes the function return value type, and parameter types.
static llvm::Error OpenFileInExternalEditor(llvm::StringRef editor, const FileSpec &file_spec, uint32_t line_no, bool foreground=false)
static lldb::thread_t GetCurrentThread()
Get the thread token (the one returned by ThreadCreate when the thread was created) for the calling t...
void FindAddressesForLine(const lldb::TargetSP target_sp, const FileSpec &file, uint32_t line, Function *function, std::vector< Address > &output_local, std::vector< Address > &output_extern)
Find addresses by file/line.
Property * ProtectedGetPropertyAtIndex(size_t idx)
static lldb::OptionValuePropertiesSP CreateLocalCopy(const Properties &global_properties)
static PolicyStack & Get()
static bool GetRestartedFromEvent(const Event *event_ptr)
A plug-in interface definition class for debugging a process.
ThreadList & GetThreadList()
Status Resume()
Resumes all of a process's threads as configured using the Thread run control functions.
virtual SystemRuntime * GetSystemRuntime()
Get the system runtime plug-in for this process.
lldb::StateType GetState()
Get accessor for the current process state.
lldb::OptionValuePropertiesSP m_collection_sp
T GetPropertyAtIndexAs(uint32_t idx, T default_value, const ExecutionContext *exe_ctx=nullptr) const
This base class provides an interface to stack frames.
virtual StackID & GetStackID()
virtual const SymbolContext & GetSymbolContext(lldb::SymbolContextItem resolve_scope)
Provide a SymbolContext for this StackFrame's current pc value.
virtual bool HasDebugInformation()
Determine whether this StackFrame has debug information available or not.
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
bool Success() const
Test for success condition.
static lldb::StopInfoSP CreateStopReasonWithPlan(lldb::ThreadPlanSP &plan, lldb::ValueObjectSP return_valobj_sp, lldb::ExpressionVariableSP expression_variable_sp)
static lldb::StopInfoSP CreateStopReasonWithSignal(Thread &thread, int signo, const char *description=nullptr, std::optional< int > code=std::nullopt)
const char * GetData() const
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
void Format(const char *format, Args &&... args)
Forwards the arguments to llvm::formatv and writes to the stream.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
void IndentMore(unsigned amount=2)
Increment the current indentation level.
ObjectSP GetItemAtIndex(size_t idx) const
ObjectSP GetValueForKey(llvm::StringRef key) const
std::shared_ptr< Object > ObjectSP
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function for a given query.
LineEntry line_entry
The LineEntry for a given query.
static llvm::Expected< lldb::SyntheticFrameProviderSP > CreateInstance(lldb::StackFrameListSP input_frames, const ScriptedFrameProviderDescriptor &descriptor)
Try to create a SyntheticFrameProvider instance for the given input frames and descriptor.
A plug-in interface definition class for system runtimes.
virtual bool SafeToCallFunctionsOnThisThread(lldb::ThreadSP thread_sp)
Determine whether it is safe to run an expression on a given thread.
const llvm::MapVector< uint32_t, ScriptedFrameProviderDescriptor > & GetScriptedFrameProviderDescriptors() const
Get all scripted frame provider descriptors for this target.
Debugger & GetDebugger() const
lldb::PlatformSP GetPlatform()
const ModuleList & GetImages() const
Get accessor for the images for this process.
const ArchSpec & GetArchitecture() const
lldb::ThreadSP GetSelectedThread()
bool SetSelectedThreadByID(lldb::tid_t tid, bool notify=false)
void ClearShouldStopHereCallbacks()
void DiscardPlansUpToPlan(ThreadPlan *up_to_plan_ptr)
lldb::ThreadPlanSP PopPlan()
bool AnyCompletedPlans() const
lldb::ThreadPlanSP GetCompletedPlan(bool skip_private=true) const
lldb::ExpressionVariableSP GetExpressionVariable() const
bool IsPlanDone(ThreadPlan *plan) const
void RestoreCompletedPlanCheckpoint(size_t checkpoint)
lldb::ThreadPlanSP GetPlanByIndex(uint32_t plan_idx, bool skip_private=true) const
lldb::ValueObjectSP GetReturnValueObject() const
void PushPlan(lldb::ThreadPlanSP new_plan_sp)
void DiscardConsultingControllingPlans()
lldb::ThreadPlanSP DiscardPlan()
bool WasPlanDiscarded(ThreadPlan *plan) const
size_t CheckpointCompletedPlans()
ThreadPlan * GetInnermostExpression() const
lldb::ThreadPlanSP GetCurrentPlan() const
ThreadPlan * GetPreviousPlan(ThreadPlan *current_plan) const
lldb::addr_t GetBreakpointLoadAddress() const
void SetAutoContinue(bool do_it)
virtual bool IsLeafPlan()
virtual Vote ShouldReportStop(Event *event_ptr)
virtual bool OkayToDiscard()
virtual bool ShouldAutoContinue(Event *event_ptr)
Returns whether this thread plan overrides the ShouldStop of subsequently processed plans.
Vote ShouldReportRun(Event *event_ptr)
const char * GetName() const
Returns the name of this thread plan.
ThreadPlanKind GetKind() const
virtual bool ShouldRunBeforePublicStop()
bool PlanExplainsStop(Event *event_ptr)
@ eKindStepOverBreakpoint
bool TracerExplainsStop()
bool WillResume(lldb::StateType resume_state, bool current_plan)
virtual bool MischiefManaged()
virtual bool IsPlanStale()
virtual bool WillStop()=0
virtual bool ShouldStop(Event *event_ptr)=0
virtual bool IsBasePlan()
bool GetStepInAvoidsNoDebug() const
~ThreadProperties() override
const RegularExpression * GetSymbolsToAvoidRegexp()
The regular expression returned determines symbols that this thread won't stop in during "step-in" op...
bool GetTraceEnabledState() const
ThreadProperties(bool is_global)
uint64_t GetMaxBacktraceDepth() const
FileSpecList GetLibrariesToAvoid() const
bool GetStepOutAvoidsNoDebug() const
uint64_t GetSingleThreadPlanTimeout() const
bool ThreadPassesBasicTests(Thread &thread) const
~ThreadEventData() override
static const ThreadEventData * GetEventDataFromEvent(const Event *event_ptr)
static lldb::ThreadSP GetThreadFromEvent(const Event *event_ptr)
void Dump(Stream *s) const override
static lldb::StackFrameSP GetStackFrameFromEvent(const Event *event_ptr)
static llvm::StringRef GetFlavorString()
StackID GetStackID() const
ThreadEventData(const lldb::ThreadSP thread_sp)
lldb::ThreadSP GetThread() const
lldb::ThreadSP m_thread_sp
static StackID GetStackIDFromEvent(const Event *event_ptr)
virtual lldb::ThreadPlanSP QueueThreadPlanForStepOut(bool abort_other_plans, SymbolContext *addr_context, bool first_insn, bool stop_other_threads, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, Status &status, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate)
Queue the plan used to step out of the function at the current PC of thread.
bool IsThreadPlanDone(ThreadPlan *plan) const
Checks whether the given plan is in the completed plans for this stop.
virtual lldb::user_id_t GetProtocolID() const
lldb::ThreadSP GetCurrentExceptionBacktrace()
std::optional< lldb::addr_t > GetPreviousFrameZeroPC()
Request the pc value the thread had when previously stopped.
void BroadcastSelectedFrameChange(StackID &new_frame_id)
@ eBroadcastBitSelectedFrameChanged
@ eBroadcastBitStackChanged
Status UnwindInnermostExpression()
Unwinds the thread stack for the innermost expression plan currently on the thread plan stack.
llvm::Expected< ScriptedFrameProviderDescriptor > GetScriptedFrameProviderDescriptorForID(lldb::frame_list_id_t id) const
const uint32_t m_index_id
A unique 1 based index assigned to each thread for easy UI/command line access.
void SetShouldRunBeforePublicStop(bool newval)
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
bool CompletedPlanOverridesBreakpoint() const
Check if we have completed plan to override breakpoint stop reason.
lldb::StackFrameListSP m_curr_frames_sp
The stack frames that get lazily populated after a thread stops.
virtual bool SafeToCallFunctions()
Check whether this thread is safe to run functions.
void RestoreThreadStateFromCheckpoint(ThreadStateCheckpoint &saved_state)
Status QueueThreadPlan(lldb::ThreadPlanSP &plan_sp, bool abort_other_plans)
Queues a generic thread plan.
bool WasThreadPlanDiscarded(ThreadPlan *plan) const
Checks whether the given plan is in the discarded plans for this stop.
virtual lldb::RegisterContextSP GetRegisterContext()=0
virtual lldb::addr_t GetThreadPointer()
Retrieves the per-thread data area.
virtual bool RestoreRegisterStateFromCheckpoint(ThreadStateCheckpoint &saved_state)
bool SetupToStepOverBreakpointIfNeeded(lldb::RunDirection direction)
uint32_t m_stop_info_stop_id
void AutoCompleteThreadPlans(CompletionRequest &request) const
Format the thread plan information for auto completion.
std::recursive_mutex m_frame_mutex
Multithreaded protection for m_state.
static void SettingsInitialize()
void SetShouldReportStop(Vote vote)
virtual lldb::StopInfoSP GetPrivateStopInfo(bool calculate=true)
uint32_t GetIndexID() const
std::optional< lldb::addr_t > m_prev_framezero_pc
Frame 0's PC the last time this thread was stopped.
Status ReturnFromFrame(lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return_value_sp, bool broadcast=false)
void CalculateExecutionContext(ExecutionContext &exe_ctx) override
Reconstruct the object's execution context into sc.
void DiscardThreadPlans(bool force)
Discards the plans queued on the plan stack of the current thread.
void SetStopInfo(const lldb::StopInfoSP &stop_info_sp)
bool GetDescription(Stream &s, lldb::DescriptionLevel level, bool print_json_thread, bool print_json_stopinfo)
static std::string RunModeAsString(lldb::RunMode mode)
void PushProviderFrameList(lldb::StackFrameListSP frames)
Push/pop provider input frames for the current host thread.
void SetTemporaryResumeState(lldb::StateType new_state)
virtual bool MatchesSpec(const ThreadSpec *spec)
lldb::ProcessSP CalculateProcess() override
StructuredData::ObjectSP GetExtendedInfo()
Retrieve a dictionary of information about this thread.
virtual lldb::addr_t GetThreadLocalData(const lldb::ModuleSP module, lldb::addr_t tls_file_addr)
Retrieves the per-module TLS block for a thread.
void SetStopInfoToNothing()
virtual void DestroyThread()
virtual lldb::ThreadPlanSP QueueThreadPlanForRunToAddress(bool abort_other_plans, Address &target_addr, bool stop_other_threads, Status &status)
Gets the plan used to continue from the current PC.
virtual lldb::ThreadPlanSP QueueThreadPlanForStepThrough(StackID &return_stack_id, bool abort_other_plans, bool stop_other_threads, Status &status)
Gets the plan used to step through the code that steps from a function call site at the current PC in...
lldb::StackFrameSP GetSelectedFrame(SelectMostRelevant select_most_relevant)
virtual bool IsStillAtLastBreakpointHit()
std::recursive_mutex m_state_mutex
Multithreaded protection for m_state.
void PopProviderFrameList()
ThreadPlan * GetPreviousPlan(ThreadPlan *plan) const
virtual const char * GetName()
void PushPlan(lldb::ThreadPlanSP plan_sp)
lldb::StackFrameListSP m_prev_frames_sp
The previous stack frames from the last time this thread stopped.
virtual void ClearStackFrames()
ThreadPlan * GetCurrentPlan() const
Gets the plan which will execute next on the plan stack.
virtual Unwind & GetUnwinder()
static llvm::StringRef GetStaticBroadcasterClass()
void SetResumeSignal(int signal)
bool IsAnyProviderActive()
Returns true if any host thread is currently inside a provider.
lldb::ValueObjectSP GetReturnValueObject() const
Gets the outer-most return value from the completed plans.
virtual lldb::ThreadSP GetBackingThread() const
bool IsRunningCallFunctionPlan() const
Returns true if this thread has a ThreadPlanCallFunction on its plan stack, indicating it is running ...
lldb::ExpressionVariableSP GetExpressionVariable() const
Gets the outer-most expression variable from the completed plans.
Vote ShouldReportRun(Event *event_ptr)
lldb::TargetSP CalculateTarget() override
static std::string StopReasonAsString(lldb::StopReason reason)
lldb::StackFrameListSP GetFrameListByIdentifier(lldb::frame_list_id_t id)
Get a frame list by its unique identifier.
virtual void WillResume(lldb::StateType resume_state)
Thread(Process &process, lldb::tid_t tid, bool use_invalid_index_id=false)
Constructor.
lldb::addr_t m_stopped_at_unexecuted_bp
bool ThreadStoppedForAReason()
size_t GetStackFrameStatus(Stream &strm, uint32_t first_frame, uint32_t num_frames, bool show_frame_info, uint32_t num_frames_with_source, bool show_hidden)
std::string GetStopDescriptionRaw()
void ClearScriptedFrameProvider()
bool DiscardUserThreadPlansUpToIndex(uint32_t thread_index)
Discards the plans queued on the plan stack of the current thread up to and including the plan in tha...
virtual Status StepOver(bool source_step, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate)
Default implementation for stepping over.
bool ShouldResume(lldb::StateType resume_state)
std::unique_ptr< lldb_private::Unwind > m_unwinder_up
It gets set in Thread::ShouldResume.
std::unique_ptr< ThreadPlanStack > m_null_plan_stack_up
lldb::StateType GetTemporaryResumeState() const
virtual bool CheckpointThreadState(ThreadStateCheckpoint &saved_state)
void SetState(lldb::StateType state)
llvm::Error LoadScriptedFrameProvider(const ScriptedFrameProviderDescriptor &descriptor)
lldb::ProcessSP GetProcess() const
lldb::StackFrameSP CalculateStackFrame() override
lldb::StateType GetResumeState() const
Gets the USER resume state for this thread.
uint32_t SetSelectedFrame(lldb_private::StackFrame *frame, bool broadcast=false)
virtual lldb::ThreadPlanSP QueueThreadPlanForStepUntil(bool abort_other_plans, llvm::ArrayRef< lldb::addr_t > address_list, bool stop_others, uint32_t frame_idx, Status &status)
lldb::StopInfoSP m_stop_info_sp
The private stop reason for this thread.
std::mutex m_provider_frames_mutex
Per-host-thread stack of active provider input frames.
lldb::ProcessWP m_process_wp
The process that owns this thread.
lldb::StackFrameListSP m_prev_unwinder_frames_sp
The unwinder frame list from the last time this thread stopped.
void DumpUsingSettingsFormat(Stream &strm, uint32_t frame_idx, bool stop_format)
LazyBool m_override_should_notify
lldb::ThreadSP CalculateThread() override
Status ReturnFromFrameWithIndex(uint32_t frame_idx, lldb::ValueObjectSP return_value_sp, bool broadcast=false)
virtual Status StepOut(uint32_t frame_idx=0)
Default implementation for stepping out.
virtual llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > GetSiginfo(size_t max_size) const
lldb::StateType GetState() const
lldb::StateType m_state
The state of our process.
bool m_extended_info_fetched
void CalculatePublicStopInfo()
static void SettingsTerminate()
bool SetSelectedFrameByIndex(uint32_t frame_idx, bool broadcast=false)
lldb::StopReason GetStopReason()
ThreadPlanStack & GetPlans() const
lldb::ValueObjectSP GetSiginfoValue()
virtual lldb::ThreadPlanSP QueueThreadPlanForStepSingleInstruction(bool step_over, bool abort_other_plans, bool stop_other_threads, Status &status)
Queues the plan used to step one instruction from the current PC of thread.
uint32_t m_stop_info_override_stop_id
int m_resume_signal
The signal that should be used when continuing this thread.
bool StopInfoIsUpToDate() const
lldb::StackFrameSP GetStackFrameSPForStackFramePtr(StackFrame *stack_frame_ptr)
llvm::DenseMap< lldb::frame_list_id_t, lldb::SyntheticFrameProviderSP > m_frame_providers
Map from frame list ID to its frame provider.
lldb::ThreadPlanSP GetCompletedPlan() const
Gets the outer-most plan that was popped off the plan stack in the most recent stop.
lldb::ValueObjectSP GetCurrentException()
virtual lldb::ThreadPlanSP QueueThreadPlanForStepOutNoShouldStop(bool abort_other_plans, SymbolContext *addr_context, bool first_insn, bool stop_other_threads, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, Status &status, bool continue_to_next_branch=false)
Queue the plan used to step out of the function at the current PC of a thread.
virtual lldb::StackFrameSP GetFrameWithConcreteFrameIndex(uint32_t unwind_idx)
bool ShouldStop(Event *event_ptr)
Status JumpToLine(const FileSpec &file, uint32_t line, bool can_leave_function, std::string *warnings=nullptr)
bool DumpUsingFormat(Stream &strm, uint32_t frame_idx, const FormatEntity::Entry *format)
Print a description of this thread using the provided thread format.
void DiscardThreadPlansUpToPlan(lldb::ThreadPlanSP &up_to_plan_sp)
Discards the plans queued on the plan stack of the current thread up to and including up_to_plan_sp.
void FrameSelectedCallback(lldb_private::StackFrame *frame)
lldb::ThreadPlanSP QueueBasePlan(bool abort_other_plans)
Queues the base plan for a thread.
static ThreadProperties & GetGlobalProperties()
uint32_t GetCurrentInlinedDepth()
llvm::DenseMap< HostThread, std::vector< lldb::StackFrameListSP > > m_active_frame_providers_by_thread
virtual lldb::ThreadPlanSP QueueThreadPlanForStepOverRange(bool abort_other_plans, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_other_threads, Status &status, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate)
Queues the plan used to step through an address range, stepping over function calls.
std::string GetStopDescription()
virtual lldb::ThreadPlanSP QueueThreadPlanForStepScripted(bool abort_other_plans, const ScriptedMetadata &scripted_metadata, bool stop_other_threads, Status &status)
StructuredData::ObjectSP m_extended_info
lldb::StopInfoSP GetStopInfo()
virtual lldb::ThreadPlanSP QueueThreadPlanForStepInRange(bool abort_other_plans, const AddressRange &range, const SymbolContext &addr_context, llvm::StringRef step_in_target, lldb::RunMode stop_other_threads, Status &status, LazyBool step_in_avoids_code_without_debug_info=eLazyBoolCalculate, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate)
Queues the plan used to step through an address range, stepping into functions.
llvm::DenseMap< lldb::frame_list_id_t, lldb::StackFrameListWP > m_frame_lists_by_id
Map from frame list identifier to frame list weak pointer.
lldb::StateType m_temporary_resume_state
This state records what the thread was told to do by the thread plan logic for the current resume.
lldb::StackFrameListSP GetStackFrameList()
bool m_should_run_before_public_stop
Vote ShouldReportStop(Event *event_ptr)
bool SetSelectedFrameByIndexNoisily(uint32_t frame_idx, Stream &output_stream)
virtual bool CalculateStopInfo()=0
Ask the thread subclass to set its stop info.
std::vector< std::pair< ScriptedFrameProviderDescriptor, lldb::frame_list_id_t > > m_provider_chain_ids
Ordered chain of provider IDs.
lldb::StateType m_resume_state
This state is used to force a thread to be suspended from outside the ThreadPlan logic.
virtual Status StepIn(bool source_step, LazyBool step_in_avoids_code_without_debug_info=eLazyBoolCalculate, LazyBool step_out_avoids_code_without_debug_info=eLazyBoolCalculate)
Default implementation for stepping into.
size_t GetStatus(Stream &strm, uint32_t start_frame, uint32_t num_frames, uint32_t num_frames_with_source, bool stop_format, bool show_hidden, bool only_stacks=false)
lldb::RegisterContextSP m_reg_context_sp
The register context for this thread's current register state.
lldb::StackFrameListSP m_unwinder_frames_sp
The unwinder frame list (ID 0).
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size, lldb::addr_t address=LLDB_INVALID_ADDRESS, ValueObjectManager *manager=nullptr)
These routines create ValueObjectConstResult ValueObjects from various data sources.
#define LLDB_INVALID_SIGNAL_NUMBER
#define LLDB_INVALID_INDEX32
#define LLDB_INVALID_ADDRESS
#define LLDB_UNWINDER_FRAME_LIST_ID
#define LLDB_INVALID_FRAME_ID
@ 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.
bool StateIsStoppedState(lldb::StateType state, bool must_exist)
Check if a state represents a state where the process or thread is stopped.
const char * StateAsCString(lldb::StateType state)
Converts a StateType to a C string.
std::shared_ptr< lldb_private::SyntheticFrameProvider > SyntheticFrameProviderSP
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
std::shared_ptr< lldb_private::ABI > ABISP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::BreakpointSite > BreakpointSiteSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
@ eDescriptionLevelInitial
@ eDescriptionLevelVerbose
RunDirection
Execution directions.
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::Platform > PlatformSP
StateType
Process and Thread States.
@ eStateUnloaded
Process is object is valid, but not currently loaded.
@ 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.
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::StopInfo > StopInfoSP
StopReason
Thread stop reasons.
@ eStopReasonInstrumentation
@ eStopReasonPlanComplete
@ eStopReasonHistoryBoundary
@ eStopReasonExec
Program was re-exec'ed.
@ eStopReasonInterrupt
Thread requested interrupt.
@ eStopReasonProcessorTrace
@ eStopReasonThreadExiting
std::shared_ptr< lldb_private::Target > TargetSP
@ eStructuredDataTypeDictionary
@ eStructuredDataTypeInteger
@ eStructuredDataTypeArray
@ eStructuredDataTypeString
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
std::shared_ptr< lldb_private::Module > ModuleSP
std::shared_ptr< lldb_private::RegisterCheckpoint > RegisterCheckpointSP
std::shared_ptr< lldb_private::StackFrameList > StackFrameListSP
A line table entry class.
AddressRange GetSameLineContiguousAddressRange(bool include_inlined_functions) const
Give the range for this LineEntry + any additional LineEntries for this same source line that are con...
uint32_t line
The source line number, or LLDB_INVALID_LINE_NUMBER if there is no line number information.
const FileSpec & GetFile() const
Helper to access the file.
bool can_load_frame_providers
Describes what view of the process a thread should see and what operations it is allowed to perform.
Capabilities capabilities
This struct contains the metadata needed to instantiate a frame provider and optional filters to cont...
uint32_t GetID() const
Get a unique identifier for this descriptor.
bool AppliesToThread(Thread &thread) const
Check if this descriptor applies to the given thread.
bool IsValid() const
Check if this descriptor has valid metadata for script-based providers.
std::optional< uint32_t > GetPriority() const
Get the priority of this frame provider.
uint32_t current_inlined_depth
lldb::addr_t stopped_at_unexecuted_bp
lldb::RegisterCheckpointSP register_backup_sp
size_t m_completed_plan_checkpoint
lldb::StopInfoSP stop_info_sp
UserID(lldb::user_id_t uid=LLDB_INVALID_UID)
Construct with optional user ID.
lldb::user_id_t GetID() const
Get accessor for the user ID.