45#define LLDB_OPTIONS_thread_backtrace
46#include "CommandOptions.inc"
65 switch (short_option) {
67 if (option_arg.getAsInteger(0,
m_count)) {
69 error.SetErrorStringWithFormat(
70 "invalid integer value for option '%c': %s", short_option,
78 if (option_arg.getAsInteger(0,
m_start))
79 error.SetErrorStringWithFormat(
80 "invalid integer value for option '%c': %s", short_option,
88 error.SetErrorStringWithFormat(
89 "invalid boolean value for option '%c': %s", short_option,
96 llvm_unreachable(
"Unimplemented option");
109 return llvm::ArrayRef(g_thread_backtrace_options);
121 interpreter,
"thread backtrace",
122 "Show backtraces of thread call stacks. Defaults to the current "
123 "thread, thread indexes can be specified as arguments.\n"
124 "Use the thread-index \"all\" to see all threads.\n"
125 "Use the thread-index \"unique\" to see threads grouped by unique "
127 "Use 'settings set frame-format' to customize the printing of "
128 "frames in the backtrace and 'settings set thread-format' to "
129 "customize the thread header.\n"
130 "Customizable frame recognizers may filter out less interesting "
131 "frames, which results in gaps in the numbering. "
132 "Use '-u' to see all frames.",
134 eCommandRequiresProcess | eCommandRequiresThread |
135 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
136 eCommandProcessMustBePaused) {}
143 uint32_t index)
override {
144 llvm::StringRef count_opt(
"--count");
145 llvm::StringRef start_opt(
"--start");
152 Args copy_args(current_args);
155 size_t count_idx = 0;
156 size_t start_idx = 0;
157 size_t count_val = 0;
158 size_t start_val = 0;
160 for (
size_t idx = 0; idx < num_entries; idx++) {
161 llvm::StringRef arg_string = copy_args[idx].ref();
162 if (arg_string ==
"-c" || count_opt.starts_with(arg_string)) {
164 if (idx == num_entries)
167 if (copy_args[idx].ref().getAsInteger(0, count_val))
169 }
else if (arg_string ==
"-s" || start_opt.starts_with(arg_string)) {
171 if (idx == num_entries)
174 if (copy_args[idx].ref().getAsInteger(0, start_val))
181 std::string new_start_val = llvm::formatv(
"{0}", start_val + count_val);
182 if (start_idx == 0) {
188 std::string repeat_command;
191 return repeat_command;
199 const std::vector<ConstString> &types =
201 for (
auto type : types) {
203 thread->shared_from_this(), type);
204 if (ext_thread_sp && ext_thread_sp->IsValid()) {
205 const uint32_t num_frames_with_source = 0;
206 const bool stop_format =
false;
210 num_frames_with_source, stop_format,
224 "thread disappeared while computing backtraces: 0x%" PRIx64
"\n",
229 Thread *thread = thread_sp.get();
237 const uint32_t num_frames_with_source = 0;
238 const bool stop_format =
true;
240 num_frames_with_source, stop_format,
243 "error displaying backtrace for thread: \"0x%4.4x\"\n",
249 "Interrupt skipped extended backtrace")) {
260#define LLDB_OPTIONS_thread_step_scope
261#include "CommandOptions.inc"
274 return llvm::ArrayRef(g_thread_step_scope_options);
280 const int short_option =
281 g_thread_step_scope_options[option_idx].short_option;
283 switch (short_option) {
286 bool avoid_no_debug =
289 error.SetErrorStringWithFormat(
290 "invalid boolean value for option '%c': %s", short_option,
299 bool avoid_no_debug =
302 error.SetErrorStringWithFormat(
303 "invalid boolean value for option '%c': %s", short_option,
312 error.SetErrorStringWithFormat(
313 "invalid integer value for option '%c': %s", short_option,
324 if (option_arg ==
"block") {
329 error.SetErrorStringWithFormat(
"invalid end line number '%s'",
330 option_arg.str().c_str());
344 llvm_unreachable(
"Unimplemented option");
359 if (process_sp && process_sp->GetSteppingRunsAllThreads())
383 const char *name,
const char *help,
387 eCommandRequiresProcess | eCommandRequiresThread |
388 eCommandTryTargetAPILock |
389 eCommandProcessMustBeLaunched |
390 eCommandProcessMustBePaused),
425 if (thread ==
nullptr) {
426 result.
AppendError(
"no selected thread in process");
431 uint32_t step_thread_idx;
433 if (!llvm::to_integer(thread_idx_cstr, step_thread_idx)) {
440 if (thread ==
nullptr) {
442 "Thread index %u is out of range (valid values are 0 - %u).\n",
443 step_thread_idx, num_threads);
452 }
else if (!
GetDebugger().GetScriptInterpreter()->CheckObjectExists(
455 "class for scripted step: \"%s\" does not exist.",
464 "end line option is only valid for step into");
468 const bool abort_other_plans =
false;
473 bool bool_stop_other_threads;
475 bool_stop_other_threads =
false;
479 bool_stop_other_threads =
true;
486 assert(frame !=
nullptr);
512 "Could not find the current block address.");
526 abort_other_plans, range,
539 false, abort_other_plans, bool_stop_other_threads, new_plan_status);
548 stop_other_threads, new_plan_status,
552 true, abort_other_plans, bool_stop_other_threads, new_plan_status);
555 false, abort_other_plans, bool_stop_other_threads, new_plan_status);
558 true, abort_other_plans, bool_stop_other_threads, new_plan_status);
561 abort_other_plans,
nullptr,
false, bool_stop_other_threads,
eVoteYes,
580 new_plan_sp->SetIsControllingPlan(
true);
581 new_plan_sp->SetOkayToDiscard(
false);
586 "step operation does not support iteration count.");
596 if (synchronous_execution)
601 if (!
error.Success()) {
610 process->
SyncIOHandler(iohandler_id, std::chrono::seconds(2));
612 if (synchronous_execution) {
641 interpreter,
"thread continue",
642 "Continue execution of the current target process. One "
643 "or more threads may be specified, by default all "
646 eCommandRequiresThread | eCommandTryTargetAPILock |
647 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
657 if (process ==
nullptr) {
658 result.
AppendError(
"no process exists. Cannot continue");
670 std::lock_guard<std::recursive_mutex> guard(
673 std::vector<Thread *> resume_threads;
674 for (
auto &entry : command.
entries()) {
676 if (entry.ref().getAsInteger(0, thread_idx)) {
678 "invalid thread index argument: \"%s\".\n", entry.c_str());
685 resume_threads.push_back(thread);
693 if (resume_threads.empty()) {
694 result.
AppendError(
"no valid thread indexes were specified");
697 if (resume_threads.size() == 1)
702 for (uint32_t idx = 0; idx < num_threads; ++idx) {
705 std::vector<Thread *>::iterator this_thread_pos =
706 find(resume_threads.begin(), resume_threads.end(), thread);
708 if (this_thread_pos != resume_threads.end()) {
709 resume_threads.erase(this_thread_pos);
710 if (!resume_threads.empty())
715 const bool override_suspend =
true;
728 std::lock_guard<std::recursive_mutex> guard(
732 if (current_thread ==
nullptr) {
733 result.
AppendError(
"the process doesn't have a current thread");
737 for (uint32_t idx = 0; idx < num_threads; ++idx) {
739 if (thread == current_thread) {
741 " in process %" PRIu64
"\n",
743 const bool override_suspend =
true;
753 if (synchronous_execution)
759 if (
error.Success()) {
762 if (synchronous_execution) {
779 "Process cannot be continued from its current state (%s).\n",
787#define LLDB_OPTIONS_thread_until
788#include "CommandOptions.inc"
810 switch (short_option) {
820 error.SetErrorStringWithFormat(
"invalid thread index '%s'",
821 option_arg.str().c_str());
827 error.SetErrorStringWithFormat(
"invalid frame index '%s'",
828 option_arg.str().c_str());
836 if (
error.Success()) {
844 llvm_unreachable(
"Unimplemented option");
857 return llvm::ArrayRef(g_thread_until_options);
869 interpreter,
"thread until",
870 "Continue until a line number or address is reached by the "
871 "current or specified thread. Stops when returning from "
872 "the current function as a safety measure. "
873 "The target line number(s) are given as arguments, and if more "
875 " is provided, stepping will stop when the first one is hit.",
877 eCommandRequiresThread | eCommandTryTargetAPILock |
878 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
893 if (process ==
nullptr) {
894 result.
AppendError(
"need a valid process to step");
897 std::vector<uint32_t> line_numbers;
901 for (
size_t i = 0; i < num_args; i++) {
902 uint32_t line_number;
908 line_numbers.push_back(line_number);
924 if (thread ==
nullptr) {
927 "Thread index %u is out of range (valid values are 0 - %u).\n",
932 const bool abort_other_plans =
false;
936 if (frame ==
nullptr) {
938 "Frame index %u is out of range for thread id %" PRIu64
".\n",
954 if (line_table ==
nullptr) {
956 "frame %u of thread id %" PRIu64
".\n",
963 std::vector<addr_t> address_list;
969 "function info - can't get until range.");
982 bool all_in_function =
true;
991 for (uint32_t line_number : line_numbers) {
994 uint32_t start_idx_ptr = index_ptr;
996 index_ptr, line_number,
nullptr, exact, &line_entry);
998 line_number = line_entry.
line;
1000 start_idx_ptr = index_ptr;
1001 while (start_idx_ptr <= end_ptr) {
1003 start_idx_ptr, line_number,
nullptr, exact, &line_entry);
1011 address_list.push_back(address);
1013 all_in_function =
false;
1021 address_list.push_back(address);
1023 all_in_function =
false;
1026 if (address_list.empty()) {
1027 if (all_in_function)
1029 "No line entries matching until target.\n");
1032 "Until target outside of the current function.\n");
1038 abort_other_plans, &address_list.front(), address_list.size(),
1046 new_plan_sp->SetIsControllingPlan(
true);
1047 new_plan_sp->SetOkayToDiscard(
false);
1054 " has no debug information.\n",
1061 "Failed to set the selected thread to thread id %" PRIu64
".\n",
1068 if (synchronous_execution)
1073 if (
error.Success()) {
1076 if (synchronous_execution) {
1099#define LLDB_OPTIONS_thread_select
1100#include "CommandOptions.inc"
1116 const int short_option = g_thread_select_options[option_idx].short_option;
1117 switch (short_option) {
1121 return Status(
"Invalid thread ID: '%s'.", option_arg.str().c_str());
1127 llvm_unreachable(
"Unimplemented option");
1134 return llvm::ArrayRef(g_thread_select_options);
1142 "Change the currently selected thread.",
1143 "thread select <thread-index> (or -t <thread-id>)",
1144 eCommandRequiresProcess | eCommandTryTargetAPILock |
1145 eCommandProcessMustBeLaunched |
1146 eCommandProcessMustBePaused) {
1157 arg.push_back(thread_idx_arg);
1184 if (process ==
nullptr) {
1190 "'%s' takes exactly one thread index argument, or a thread ID "
1191 "option:\nUsage: %s\n",
1197 "and a thread index argument:\nUsage: %s\n",
1202 Thread *new_thread =
nullptr;
1211 if (new_thread ==
nullptr) {
1219 if (new_thread ==
nullptr) {
1240 interpreter,
"thread list",
1241 "Show a summary of each thread in the current target process. "
1242 "Use 'settings set thread-format' to customize the individual "
1245 eCommandRequiresProcess | eCommandTryTargetAPILock |
1246 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1255 const bool only_threads_with_stop_reason =
false;
1256 const uint32_t start_frame = 0;
1257 const uint32_t num_frames = 0;
1258 const uint32_t num_frames_with_source = 0;
1260 process->
GetThreadStatus(strm, only_threads_with_stop_reason, start_frame,
1261 num_frames, num_frames_with_source,
false);
1266#define LLDB_OPTIONS_thread_info
1267#include "CommandOptions.inc"
1287 switch (short_option) {
1297 llvm_unreachable(
"Unimplemented option");
1303 return llvm::ArrayRef(g_thread_info_options);
1312 interpreter,
"thread info",
1313 "Show an extended summary of one or "
1314 "more threads. Defaults to the "
1317 eCommandRequiresProcess | eCommandTryTargetAPILock |
1318 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
1343 Thread *thread = thread_sp.get();
1365 interpreter,
"thread exception",
1366 "Display the current exception object for a thread. Defaults to "
1367 "the current thread.",
1369 eCommandRequiresProcess | eCommandTryTargetAPILock |
1370 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1392 ValueObjectSP exception_object_sp = thread_sp->GetCurrentException();
1393 if (exception_object_sp) {
1394 if (llvm::Error
error = exception_object_sp->Dump(strm)) {
1400 ThreadSP exception_thread_sp = thread_sp->GetCurrentExceptionBacktrace();
1401 if (exception_thread_sp && exception_thread_sp->IsValid()) {
1402 const uint32_t num_frames_with_source = 0;
1403 const bool stop_format =
false;
1404 exception_thread_sp->GetStatus(strm, 0,
UINT32_MAX,
1405 num_frames_with_source, stop_format,
1417 interpreter,
"thread siginfo",
1418 "Display the current siginfo object for a thread. Defaults to "
1419 "the current thread.",
1421 eCommandRequiresProcess | eCommandTryTargetAPILock |
1422 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1446 thread_sp->GetIndexID());
1449 ValueObjectSP exception_object_sp = thread_sp->GetSiginfoValue();
1450 if (exception_object_sp) {
1451 if (llvm::Error
error = exception_object_sp->Dump(strm)) {
1456 strm.
Printf(
"(no siginfo)\n");
1464#define LLDB_OPTIONS_thread_return
1465#include "CommandOptions.inc"
1484 switch (short_option) {
1492 error.SetErrorStringWithFormat(
1493 "invalid boolean value '%s' for 'x' option",
1494 option_arg.str().c_str());
1498 llvm_unreachable(
"Unimplemented option");
1508 return llvm::ArrayRef(g_thread_return_options);
1518 "Prematurely return from a stack frame, "
1519 "short-circuiting execution of newer frames "
1520 "and optionally yielding a specified value. Defaults "
1521 "to the exiting the current stack "
1524 eCommandRequiresFrame | eCommandTryTargetAPILock |
1525 eCommandProcessMustBeLaunched |
1526 eCommandProcessMustBePaused) {
1540 if (command.starts_with(
"-x")) {
1541 if (command.size() != 2U)
1542 result.
AppendWarning(
"Return values ignored when returning from user "
1543 "called expressions");
1548 if (!
error.Success()) {
1560 "Could not select 0th frame after unwinding expression.");
1569 uint32_t frame_idx = frame_sp->GetFrameIndex();
1571 if (frame_sp->IsInlined()) {
1572 result.
AppendError(
"Don't know how to return from inlined frames.");
1576 if (!command.empty()) {
1585 return_valobj_sp, options);
1587 if (return_valobj_sp)
1589 "Error evaluating result expression: %s",
1590 return_valobj_sp->GetError().AsCString());
1593 "Unknown error evaluating result expression.");
1600 const bool broadcast =
true;
1601 error = thread_sp->ReturnFromFrame(frame_sp, return_valobj_sp, broadcast);
1602 if (!
error.Success()) {
1604 "Error returning from frame %d of thread %d: %s.", frame_idx,
1605 thread_sp->GetIndexID(),
error.AsCString());
1616#define LLDB_OPTIONS_thread_jump
1617#include "CommandOptions.inc"
1640 switch (short_option) {
1644 return Status(
"only one source file expected.");
1648 return Status(
"invalid line number: '%s'.", option_arg.str().c_str());
1652 return Status(
"invalid line offset: '%s'.", option_arg.str().c_str());
1662 llvm_unreachable(
"Unimplemented option");
1668 return llvm::ArrayRef(g_thread_jump_options);
1680 interpreter,
"thread jump",
1681 "Sets the program counter to a new address.",
"thread jump",
1682 eCommandRequiresFrame | eCommandTryTargetAPILock |
1683 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1708 if (!reg_ctx->
SetPC(callAddr)) {
1726 "No source file available for the current location.");
1730 std::string warnings;
1738 if (!warnings.empty())
1751#define LLDB_OPTIONS_thread_plan_list
1752#include "CommandOptions.inc"
1770 switch (short_option) {
1776 if (option_arg.getAsInteger(0, tid))
1777 return Status(
"invalid tid: '%s'.", option_arg.str().c_str());
1787 llvm_unreachable(
"Unimplemented option");
1801 return llvm::ArrayRef(g_thread_plan_list_options);
1813 interpreter,
"thread plan list",
1814 "Show thread plans for one or more threads. If no threads are "
1815 "specified, show the "
1816 "current thread. Use the thread-index \"all\" to see all threads.",
1818 eCommandRequiresProcess | eCommandRequiresThread |
1819 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
1820 eCommandProcessMustBePaused) {}
1887 "Discards thread plans up to and including the "
1888 "specified index (see 'thread plan list'.) "
1889 "Only user visible plans can be discarded.",
1891 eCommandRequiresProcess | eCommandRequiresThread |
1892 eCommandTryTargetAPILock |
1893 eCommandProcessMustBeLaunched |
1894 eCommandProcessMustBePaused) {
1913 "thread plan index - but got %zu.",
1918 uint32_t thread_plan_idx;
1921 "Invalid thread index: \"%s\" - should be unsigned int.",
1926 if (thread_plan_idx == 0) {
1928 "You wouldn't really want me to discard the base thread plan.");
1936 "Could not find User thread plan with index %s.",
1946 "Removes any thread plans associated with "
1947 "currently unreported threads. "
1948 "Specify one or more TID's to remove, or if no "
1949 "TID's are provides, remove threads for all "
1950 "unreported threads",
1952 eCommandRequiresProcess |
1953 eCommandTryTargetAPILock |
1954 eCommandProcessMustBeLaunched |
1955 eCommandProcessMustBePaused) {
1972 std::lock_guard<std::recursive_mutex> guard(
1975 for (
size_t i = 0; i < num_args; i++) {
1998 interpreter,
"plan",
1999 "Commands for managing thread plans that control execution.",
2000 "thread plan <subcommand> [<subcommand objects]") {
2022 interpreter,
"trace thread export",
2023 "Commands for exporting traces of the threads in the current "
2024 "process to different formats.",
2025 "thread trace export <export-plugin> [<subcommand objects>]") {
2028 for (llvm::StringRef plugin_name =
2030 !plugin_name.empty();
2046 true, interpreter,
"thread trace start",
2047 "Start tracing threads with the corresponding trace "
2048 "plug-in for the current process.",
2049 "thread trace start [<trace-options>]") {}
2063 interpreter,
"thread trace stop",
2064 "Stop tracing threads, including the ones traced with the "
2065 "\"process trace start\" command."
2066 "Defaults to the current thread. Thread indices can be "
2067 "specified as arguments.\n Use the thread-index \"all\" to stop "
2069 "for all existing threads.",
2070 "thread trace stop [<thread-index> <thread-index> ...]",
2071 eCommandRequiresProcess | eCommandTryTargetAPILock |
2072 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
2073 eCommandProcessMustBeTraced) {}
2078 llvm::ArrayRef<lldb::tid_t> tids)
override {
2081 TraceSP trace_sp = process_sp->GetTarget().GetTrace();
2083 if (llvm::Error err = trace_sp->Stop(tids))
2098 uint32_t thread_idx;
2100 if (!llvm::to_integer(arg, thread_idx)) {
2112#define LLDB_OPTIONS_thread_trace_dump_function_calls
2113#include "CommandOptions.inc"
2128 switch (short_option) {
2143 llvm_unreachable(
"Unimplemented option");
2154 return llvm::ArrayRef(g_thread_trace_dump_function_calls_options);
2166 interpreter,
"thread trace dump function-calls",
2167 "Dump the traced function-calls for one thread. If no "
2168 "thread is specified, the current thread is used.",
2170 eCommandRequiresProcess | eCommandRequiresThread |
2171 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
2172 eCommandProcessMustBePaused | eCommandProcessMustBeTraced) {
2188 llvm::Expected<TraceCursorSP> cursor_or_error =
2191 if (!cursor_or_error) {
2192 result.
AppendError(llvm::toString(cursor_or_error.takeError()));
2197 std::optional<StreamFile> out_file;
2217#define LLDB_OPTIONS_thread_trace_dump_instructions
2218#include "CommandOptions.inc"
2233 switch (short_option) {
2236 if (option_arg.empty() || option_arg.getAsInteger(0, count) ||
2238 error.SetErrorStringWithFormat(
2239 "invalid integer value for option '%s'",
2240 option_arg.str().c_str());
2251 if (option_arg.empty() || option_arg.getAsInteger(0, skip) || skip < 0)
2252 error.SetErrorStringWithFormat(
2253 "invalid integer value for option '%s'",
2254 option_arg.str().c_str());
2261 if (option_arg.empty() || option_arg.getAsInteger(0,
id))
2262 error.SetErrorStringWithFormat(
2263 "invalid integer value for option '%s'",
2264 option_arg.str().c_str());
2312 llvm_unreachable(
"Unimplemented option");
2325 return llvm::ArrayRef(g_thread_trace_dump_instructions_options);
2339 interpreter,
"thread trace dump instructions",
2340 "Dump the traced instructions for one thread. If no "
2341 "thread is specified, show the current thread.",
2343 eCommandRequiresProcess | eCommandRequiresThread |
2344 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
2345 eCommandProcessMustBePaused | eCommandProcessMustBeTraced) {
2354 uint32_t index)
override {
2357 if (cmd.find(
" --continue") == std::string::npos)
2358 cmd +=
" --continue";
2377 llvm::Expected<TraceCursorSP> cursor_or_error =
2380 if (!cursor_or_error) {
2381 result.
AppendError(llvm::toString(cursor_or_error.takeError()));
2392 std::optional<StreamFile> out_file;
2420#define LLDB_OPTIONS_thread_trace_dump_info
2421#include "CommandOptions.inc"
2436 switch (short_option) {
2446 llvm_unreachable(
"Unimplemented option");
2457 return llvm::ArrayRef(g_thread_trace_dump_info_options);
2467 interpreter,
"thread trace dump info",
2468 "Dump the traced information for one or more threads. If no "
2469 "threads are specified, show the current thread. Use the "
2470 "thread-index \"all\" to see all threads.",
2472 eCommandRequiresProcess | eCommandTryTargetAPILock |
2473 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
2474 eCommandProcessMustBeTraced) {}
2498 interpreter,
"dump",
2499 "Commands for displaying trace information of the threads "
2500 "in the current process.",
2501 "thread trace dump <subcommand> [<subcommand objects>]") {
2519 interpreter,
"trace",
2520 "Commands for operating on traces of the threads in the current "
2522 "thread trace <subcommand> [<subcommand objects>]") {
2541 "Commands for operating on "
2542 "one or more threads in "
2543 "the current process.",
2544 "thread <subcommand> [<subcommand-options>]") {
2567 interpreter,
"thread step-in",
2568 "Source level single step, stepping into calls. Defaults "
2569 "to current thread unless specified.",
2574 interpreter,
"thread step-out",
2575 "Finish executing the current stack frame and stop after "
2576 "returning. Defaults to current thread unless specified.",
2581 interpreter,
"thread step-over",
2582 "Source level single step, stepping over calls. Defaults "
2583 "to current thread unless specified.",
2588 interpreter,
"thread step-inst",
2589 "Instruction level single step, stepping into calls. "
2590 "Defaults to current thread unless specified.",
2595 interpreter,
"thread step-inst-over",
2596 "Instruction level single step, stepping over calls. "
2597 "Defaults to current thread unless specified.",
2603 interpreter,
"thread step-scripted",
2604 "Step as instructed by the script class passed in the -C option. "
2605 "You can also specify a dictionary of key (-k) and value (-v) pairs "
2606 "that will be used to populate an SBStructuredData Dictionary, which "
2607 "will be passed to the constructor of the class implementing the "
2608 "scripted step. See the Python Reference for more details.",
static ThreadSP GetSingleThreadFromArgs(ExecutionContext &exe_ctx, Args &args, CommandReturnObject &result)
static llvm::raw_ostream & error(Stream &strm)
#define INTERRUPT_REQUESTED(debugger,...)
This handy define will keep you from having to generate a report for the interruption by hand.
~CommandObjectMultiwordThreadPlan() override=default
CommandObjectMultiwordThreadPlan(CommandInterpreter &interpreter)
~CommandObjectMultiwordTraceDump() override=default
CommandObjectMultiwordTraceDump(CommandInterpreter &interpreter)
CommandObjectMultiwordTrace(CommandInterpreter &interpreter)
~CommandObjectMultiwordTrace() override=default
~CommandOptions() override=default
void OptionParsingStarting(ExecutionContext *execution_context) override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
bool m_filtered_backtrace
bool m_extended_backtrace
Options * GetOptions() override
CommandObjectThreadBacktrace(CommandInterpreter &interpreter)
std::optional< std::string > GetRepeatCommand(Args ¤t_args, uint32_t index) override
Get the command that appropriate for a "repeat" of the current command.
void DoExtendedBacktrace(Thread *thread, CommandReturnObject &result)
bool HandleOneThread(lldb::tid_t tid, CommandReturnObject &result) override
~CommandObjectThreadBacktrace() override=default
~CommandObjectThreadContinue() override=default
void DoExecute(Args &command, CommandReturnObject &result) override
CommandObjectThreadContinue(CommandInterpreter &interpreter)
CommandObjectThreadException(CommandInterpreter &interpreter)
bool HandleOneThread(lldb::tid_t tid, CommandReturnObject &result) override
~CommandObjectThreadException() override=default
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The default version handles argument definitions that have only one argument type,...
~CommandOptions() override=default
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
void OptionParsingStarting(ExecutionContext *execution_context) override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The default version handles argument definitions that have only one argument type,...
CommandObjectThreadInfo(CommandInterpreter &interpreter)
bool HandleOneThread(lldb::tid_t tid, CommandReturnObject &result) override
~CommandObjectThreadInfo() override=default
Options * GetOptions() override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
void OptionParsingStarting(ExecutionContext *execution_context) override
~CommandOptions() override=default
CommandObjectThreadJump(CommandInterpreter &interpreter)
void DoExecute(Args &args, CommandReturnObject &result) override
~CommandObjectThreadJump() override=default
Options * GetOptions() override
void DoExecute(Args &command, CommandReturnObject &result) override
~CommandObjectThreadList() override=default
CommandObjectThreadList(CommandInterpreter &interpreter)
void DoExecute(Args &args, CommandReturnObject &result) override
CommandObjectThreadPlanDiscard(CommandInterpreter &interpreter)
~CommandObjectThreadPlanDiscard() override=default
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The default version handles argument definitions that have only one argument type,...
~CommandOptions() override=default
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
std::vector< lldb::tid_t > m_tids
void OptionParsingStarting(ExecutionContext *execution_context) override
Options * GetOptions() override
CommandObjectThreadPlanList(CommandInterpreter &interpreter)
bool HandleOneThread(lldb::tid_t tid, CommandReturnObject &result) override
~CommandObjectThreadPlanList() override=default
void DoExecute(Args &command, CommandReturnObject &result) override
CommandObjectThreadPlanPrune(CommandInterpreter &interpreter)
~CommandObjectThreadPlanPrune() override=default
void DoExecute(Args &args, CommandReturnObject &result) override
~CommandOptions() override=default
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
void OptionParsingStarting(ExecutionContext *execution_context) override
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Options * GetOptions() override
CommandObjectThreadReturn(CommandInterpreter &interpreter)
void DoExecute(llvm::StringRef command, CommandReturnObject &result) override
~CommandObjectThreadReturn() override=default
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
~OptionGroupThreadSelect() override=default
OptionGroupThreadSelect()
void OptionParsingStarting(ExecutionContext *execution_context) override
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
void DoExecute(Args &command, CommandReturnObject &result) override
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The default version handles argument definitions that have only one argument type,...
OptionGroupOptions m_option_group
CommandObjectThreadSelect(CommandInterpreter &interpreter)
~CommandObjectThreadSelect() override=default
OptionGroupThreadSelect m_options
Options * GetOptions() override
~CommandObjectThreadSiginfo() override=default
bool HandleOneThread(lldb::tid_t tid, CommandReturnObject &result) override
CommandObjectThreadSiginfo(CommandInterpreter &interpreter)
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The default version handles argument definitions that have only one argument type,...
OptionGroupPythonClassWithDict m_class_options
~CommandObjectThreadStepWithTypeAndScope() override=default
OptionGroupOptions m_all_options
Options * GetOptions() override
void DoExecute(Args &command, CommandReturnObject &result) override
ThreadStepScopeOptionGroup m_options
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The default version handles argument definitions that have only one argument type,...
CommandObjectThreadStepWithTypeAndScope(CommandInterpreter &interpreter, const char *name, const char *help, const char *syntax, StepType step_type)
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
uint32_t m_step_thread_idx
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
void OptionParsingStarting(ExecutionContext *execution_context) override
~CommandOptions() override=default
std::vector< lldb::addr_t > m_until_addrs
Options * GetOptions() override
CommandObjectThreadUntil(CommandInterpreter &interpreter)
~CommandObjectThreadUntil() override=default
void DoExecute(Args &command, CommandReturnObject &result) override
TraceDumperOptions m_dumper_options
~CommandOptions() override=default
static const size_t kDefaultCount
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
void OptionParsingStarting(ExecutionContext *execution_context) override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
std::optional< FileSpec > m_output_file
void DoExecute(Args &args, CommandReturnObject &result) override
CommandObjectTraceDumpFunctionCalls(CommandInterpreter &interpreter)
~CommandObjectTraceDumpFunctionCalls() override=default
Options * GetOptions() override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
void OptionParsingStarting(ExecutionContext *execution_context) override
~CommandOptions() override=default
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
~CommandObjectTraceDumpInfo() override=default
Options * GetOptions() override
bool HandleOneThread(lldb::tid_t tid, CommandReturnObject &result) override
CommandObjectTraceDumpInfo(CommandInterpreter &interpreter)
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
std::optional< FileSpec > m_output_file
~CommandOptions() override=default
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
TraceDumperOptions m_dumper_options
static const size_t kDefaultCount
void OptionParsingStarting(ExecutionContext *execution_context) override
CommandObjectTraceDumpInstructions(CommandInterpreter &interpreter)
Options * GetOptions() override
~CommandObjectTraceDumpInstructions() override=default
std::optional< std::string > GetRepeatCommand(Args ¤t_command_args, uint32_t index) override
Get the command that appropriate for a "repeat" of the current command.
void DoExecute(Args &args, CommandReturnObject &result) override
std::optional< lldb::user_id_t > m_last_id
CommandObjectTraceExport(CommandInterpreter &interpreter)
lldb::CommandObjectSP GetDelegateCommand(Trace &trace) override
CommandObjectTraceStart(CommandInterpreter &interpreter)
~CommandObjectTraceStop() override=default
bool DoExecuteOnThreads(Args &command, CommandReturnObject &result, llvm::ArrayRef< lldb::tid_t > tids) override
CommandObjectTraceStop(CommandInterpreter &interpreter)
void OptionParsingStarting(ExecutionContext *execution_context) override
LazyBool m_step_in_avoid_no_debug
~ThreadStepScopeOptionGroup() override=default
std::string m_avoid_regexp
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
std::string m_step_in_target
bool m_end_line_is_block_end
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
LazyBool m_step_out_avoid_no_debug
ThreadStepScopeOptionGroup()
A section + offset based address range class.
Address & GetBaseAddress()
Get accessor for the base address of the range.
bool ContainsLoadAddress(const Address &so_addr, Target *target) const
Check if a section offset so_addr when represented as a load address is contained within this object'...
lldb::addr_t GetByteSize() const
Get accessor for the byte size of this range.
A section + offset based address class.
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
lldb::addr_t GetCallableLoadAddress(Target *target, bool is_indirect=false) const
Get the load address as a callable code load address.
lldb::SectionSP GetSection() const
Get const accessor for the section.
lldb::addr_t GetFileAddress() const
Get the file address.
lldb::addr_t GetOffset() const
Get the section relative offset value.
bool IsValid() const
Check if the object state is valid.
A command line argument class.
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
void ReplaceArgumentAtIndex(size_t idx, llvm::StringRef arg_str, char quote_char='\0')
Replaces the argument value at index idx to arg_str if idx is a valid argument index.
void AppendArgument(llvm::StringRef arg_str, char quote_char='\0')
Appends a new argument to the end of the list argument list.
llvm::ArrayRef< ArgEntry > entries() const
const char * GetArgumentAtIndex(size_t idx) const
Gets the NULL terminated C string argument pointer for the argument at index idx.
bool GetCommandString(std::string &command) const
bool GetQuotedCommandString(std::string &command) const
A class that describes a single lexical block.
bool GetRangeContainingAddress(const Address &addr, AddressRange &range)
static bool InvokeCommonCompletionCallbacks(CommandInterpreter &interpreter, uint32_t completion_mask, lldb_private::CompletionRequest &request, SearchFilter *searcher)
void DoExecute(Args &command, CommandReturnObject &result) override
Class similar to CommandObjectIterateOverThreads, but which performs an action on multiple threads at...
CommandObjectMultiwordThread(CommandInterpreter &interpreter)
~CommandObjectMultiwordThread() override
bool LoadSubCommand(llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj) override
This class works by delegating the logic to the actual trace plug-in that can support the current pro...
std::vector< CommandArgumentData > CommandArgumentEntry
void AddSimpleArgumentList(lldb::CommandArgumentType arg_type, ArgumentRepetitionType repetition_type=eArgRepeatPlain)
ExecutionContext m_exe_ctx
std::vector< CommandArgumentEntry > m_arguments
CommandInterpreter & GetCommandInterpreter()
CommandInterpreter & m_interpreter
Thread * GetDefaultThread()
virtual void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector)
The default version handles argument definitions that have only one argument type,...
virtual llvm::StringRef GetSyntax()
void AppendMessage(llvm::StringRef in_string)
void void AppendError(llvm::StringRef in_string)
void SetStatus(lldb::ReturnStatus status)
void AppendErrorWithFormat(const char *format,...) __attribute__((format(printf
void AppendMessageWithFormat(const char *format,...) __attribute__((format(printf
void SetDidChangeProcessState(bool b)
void void AppendWarning(llvm::StringRef in_string)
void SetError(const Status &error, const char *fallback_error_cstr=nullptr)
Stream & GetOutputStream()
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.
LineTable * GetLineTable()
Get the line table for the compile unit.
"lldb/Utility/ArgCompletionRequest.h"
size_t GetCursorIndex() const
void SetUnwindOnError(bool unwind=false)
void SetUseDynamic(lldb::DynamicValueType dynamic=lldb::eDynamicCanRunTarget)
"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.
bool HasThreadScope() const
Returns true the ExecutionContext object contains a valid target, process, and thread.
const lldb::TargetSP & GetTargetSP() const
Get accessor to get the target shared pointer.
const lldb::ProcessSP & GetProcessSP() const
Get accessor to get the process shared pointer.
StackFrame * GetFramePtr() const
Returns a pointer to the frame object.
const lldb::StackFrameSP & GetFrameSP() const
Get accessor to get the frame shared pointer.
Process & GetProcessRef() const
Returns a reference to the process object.
Target * GetTargetPtr() const
Returns a pointer to the target object.
const lldb::ThreadSP & GetThreadSP() const
Get accessor to get the thread shared pointer.
Process * GetProcessPtr() const
Returns a pointer to the process object.
RegisterContext * GetRegisterContext() const
Thread * GetThreadPtr() const
Returns a pointer to the thread object.
const FileSpec & GetFileSpecAtIndex(size_t idx) const
Get file at index.
void Clear()
Clears the file list.
size_t GetSize() const
Get the number of files in the file list.
bool AppendIfUnique(const FileSpec &file)
Append a FileSpec object if unique.
const AddressRange & GetAddressRange()
bool FindLineEntryByAddress(const Address &so_addr, LineEntry &line_entry, uint32_t *index_ptr=nullptr)
Find a line entry that contains the section offset address so_addr.
void Append(OptionGroup *group)
Append options from a OptionGroup class.
const std::string & GetName()
const StructuredData::DictionarySP GetStructuredData()
A command line option parsing protocol class.
std::vector< Option > m_getopt_table
static llvm::StringRef GetTraceExporterPluginNameAtIndex(uint32_t index)
static ThreadTraceExportCommandCreator GetThreadTraceExportCommandCreatorAtIndex(uint32_t index)
Return the callback used to create the CommandObject that will be listed under "thread trace export".
A plug-in interface definition class for debugging a process.
lldb::pid_t GetID() const
Returns the pid of the process or LLDB_INVALID_PROCESS_ID if there is no known pid.
ThreadList & GetThreadList()
Status Resume()
Resumes all of a process's threads as configured using the Thread run control functions.
void PruneThreadPlans()
Prune ThreadPlanStacks for all unreported threads.
bool PruneThreadPlansForTID(lldb::tid_t tid)
Prune ThreadPlanStacks for unreported threads.
bool DumpThreadPlansForTID(Stream &strm, lldb::tid_t tid, lldb::DescriptionLevel desc_level, bool internal, bool condense_trivial, bool skip_unreported_plans)
Dump the thread plans associated with thread with tid.
Status ResumeSynchronous(Stream *stream)
Resume a process, and wait for it to stop.
size_t GetThreadStatus(Stream &ostrm, bool only_threads_with_stop_reason, uint32_t start_frame, uint32_t num_frames, uint32_t num_frames_with_source, bool stop_format)
lldb::StateType GetState()
Get accessor for the current process state.
void GetStatus(Stream &ostrm)
uint32_t GetIOHandlerID() const
void DumpThreadPlans(Stream &strm, lldb::DescriptionLevel desc_level, bool internal, bool condense_trivial, bool skip_unreported_plans)
Dump all the thread plans for this process.
void SyncIOHandler(uint32_t iohandler_id, const Timeout< std::micro > &timeout)
Waits for the process state to be running within a given msec timeout.
This base class provides an interface to stack frames.
const SymbolContext & GetSymbolContext(lldb::SymbolContextItem resolve_scope)
Provide a SymbolContext for this StackFrame's current pc value.
bool HasDebugInformation()
Determine whether this StackFrame has debug information available or not.
const Address & GetFrameCodeAddress()
Get an Address for the current pc value in this StackFrame.
bool Fail() const
Test for error condition.
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function for a given query.
Block * block
The Block for a given query.
CompileUnit * comp_unit
The CompileUnit for a given query.
LineEntry line_entry
The LineEntry for a given query.
bool GetAddressRangeFromHereToEndLine(uint32_t end_line, AddressRange &range, Status &error)
A plug-in interface definition class for system runtimes.
virtual lldb::ThreadSP GetExtendedBacktraceThread(lldb::ThreadSP thread, ConstString type)
Return a Thread which shows the origin of this thread's creation.
virtual const std::vector< ConstString > & GetExtendedBacktraceTypes()
Return a list of thread origin extended backtraces that may be available.
lldb::ExpressionResults EvaluateExpression(llvm::StringRef expression, ExecutionContextScope *exe_scope, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions &options=EvaluateExpressionOptions(), std::string *fixed_expression=nullptr, ValueObject *ctx_obj=nullptr)
uint32_t GetSize(bool can_update=true)
bool SetSelectedThreadByID(lldb::tid_t tid, bool notify=false)
lldb::ThreadSP FindThreadByIndexID(uint32_t index_id, bool can_update=true)
lldb::ThreadSP GetThreadAtIndex(uint32_t idx, bool can_update=true)
std::recursive_mutex & GetMutex() const override
lldb::ThreadSP FindThreadByID(lldb::tid_t tid, bool can_update=true)
void SetAvoidRegexp(const char *name)
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.
Status UnwindInnermostExpression()
Unwinds the thread stack for the innermost expression plan currently on the thread plan stack.
virtual lldb::StackFrameSP GetStackFrameAtIndex(uint32_t idx)
virtual lldb::ThreadPlanSP QueueThreadPlanForStepUntil(bool abort_other_plans, lldb::addr_t *address_list, size_t num_addresses, bool stop_others, uint32_t frame_idx, Status &status)
void AutoCompleteThreadPlans(CompletionRequest &request) const
Format the thread plan information for auto completion.
uint32_t GetIndexID() const
bool GetDescription(Stream &s, lldb::DescriptionLevel level, bool print_json_thread, bool print_json_stopinfo)
void SetResumeState(lldb::StateType state, bool override_suspend=false)
Sets the USER resume state for this thread.
lldb::StackFrameSP GetSelectedFrame(SelectMostRelevant select_most_relevant)
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...
uint32_t GetSelectedFrameIndex(SelectMostRelevant select_most_relevant)
lldb::ProcessSP GetProcess() const
virtual lldb::ThreadPlanSP QueueThreadPlanForStepInRange(bool abort_other_plans, const AddressRange &range, const SymbolContext &addr_context, const char *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.
virtual lldb::ThreadPlanSP QueueThreadPlanForStepScripted(bool abort_other_plans, const char *class_name, StructuredData::ObjectSP extra_args_sp, bool stop_other_threads, Status &status)
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.
Status JumpToLine(const FileSpec &file, uint32_t line, bool can_leave_function, std::string *warnings=nullptr)
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.
bool SetSelectedFrameByIndexNoisily(uint32_t frame_idx, Stream &output_stream)
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)
Class used to dump the instructions of a TraceCursor using its current state and granularity.
std::optional< lldb::user_id_t > DumpInstructions(size_t count)
Dump count instructions of the thread trace starting at the current cursor position.
void DumpFunctionCalls()
Dump all function calls forwards chronologically and hierarchically.
A plug-in interface definition class for trace information.
virtual lldb::CommandObjectSP GetThreadTraceStartCommand(CommandInterpreter &interpreter)=0
Get the command handle for the "thread trace start" command.
#define LLDB_INVALID_LINE_NUMBER
#define LLDB_INVALID_THREAD_ID
#define LLDB_INVALID_INDEX32
#define LLDB_INVALID_ADDRESS
#define LLDB_INVALID_FRAME_ID
@ DoNoSelectMostRelevantFrame
A class that represents a running process on the host machine.
std::vector< OptionArgElement > OptionElementVector
const char * StateAsCString(lldb::StateType state)
Converts a StateType to a C string.
const char * toString(AppleArm64ExceptionClass EC)
lldb::CommandObjectSP(* ThreadTraceExportCommandCreator)(CommandInterpreter &interpreter)
@ eStepTypeTraceOver
Single step one instruction, stepping over.
@ eStepTypeOut
Single step out a specified context.
@ eStepTypeScripted
A step type implemented by the script interpreter.
@ eStepTypeInto
Single step into a specified context.
@ eStepTypeOver
Single step over a specified context.
@ eStepTypeTrace
Single step one instruction.
std::shared_ptr< lldb_private::Trace > TraceSP
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
@ eDescriptionLevelVerbose
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::CommandObject > CommandObjectSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
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.
@ eStateCrashed
Process or thread has crashed and can be examined.
ExpressionResults
The results of expression evaluation.
std::shared_ptr< lldb_private::Process > ProcessSP
@ eReturnStatusSuccessContinuingNoResult
@ eReturnStatusSuccessFinishResult
@ eReturnStatusSuccessFinishNoResult
@ eArgTypeUnsignedInteger
@ eTraceCursorSeekTypeEnd
The end of the trace, i.e the most recent item.
std::shared_ptr< lldb_private::TraceCursor > TraceCursorSP
std::shared_ptr< lldb_private::Target > TargetSP
Used to build individual command argument lists.
ArgumentRepetitionType arg_repetition
lldb::CommandArgumentType arg_type
uint32_t arg_opt_set_association
This arg might be associated only with some particular option set(s).
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.
const FileSpec & GetFile() const
Helper to access the file.
static int64_t ToOptionEnum(llvm::StringRef s, const OptionEnumValues &enum_values, int32_t fail_value, Status &error)
static lldb::addr_t ToAddress(const ExecutionContext *exe_ctx, llvm::StringRef s, lldb::addr_t fail_value, Status *error_ptr)
Try to parse an address.
static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr)
Class that holds the configuration used by TraceDumper for traversing and dumping instructions.
bool show_control_flow_kind
For each instruction, print the instruction kind.
bool only_events
Dump events and none of the instructions.
bool show_timestamps
For each trace item, print the corresponding timestamp in nanoseconds if available.
std::optional< uint64_t > id
Optional custom id to start traversing from.
bool pretty_print_json
When dumping in JSON format, pretty print the output.
std::optional< size_t > skip
Optional number of instructions to skip from the starting position of the cursor.
bool json
Dump in json format.
bool show_events
Dump the events that happened between instructions.
bool raw
Dump only instruction addresses without disassembly nor symbol information.
bool forwards
If true, the cursor will be iterated forwards starting from the oldest instruction.
lldb::user_id_t GetID() const
Get accessor for the user ID.