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'", short_option);
74 if (option_arg.getAsInteger(0,
m_start))
75 error.SetErrorStringWithFormat(
76 "invalid integer value for option '%c'", short_option);
83 error.SetErrorStringWithFormat(
84 "invalid boolean value for option '%c'", short_option);
87 llvm_unreachable(
"Unimplemented option");
99 return llvm::ArrayRef(g_thread_backtrace_options);
110 interpreter,
"thread backtrace",
111 "Show thread call stacks. Defaults to the current thread, thread "
112 "indexes can be specified as arguments.\n"
113 "Use the thread-index \"all\" to see all threads.\n"
114 "Use the thread-index \"unique\" to see threads grouped by unique "
116 "Use 'settings set frame-format' to customize the printing of "
117 "frames in the backtrace and 'settings set thread-format' to "
118 "customize the thread header.",
120 eCommandRequiresProcess | eCommandRequiresThread |
121 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
122 eCommandProcessMustBePaused) {}
129 uint32_t idx)
override {
130 llvm::StringRef count_opt(
"--count");
131 llvm::StringRef start_opt(
"--start");
138 Args copy_args(current_args);
141 size_t count_idx = 0;
142 size_t start_idx = 0;
143 size_t count_val = 0;
144 size_t start_val = 0;
146 for (
size_t idx = 0; idx < num_entries; idx++) {
147 llvm::StringRef arg_string = copy_args[idx].ref();
148 if (arg_string.equals(
"-c") || count_opt.startswith(arg_string)) {
150 if (idx == num_entries)
153 if (copy_args[idx].ref().getAsInteger(0, count_val))
155 }
else if (arg_string.equals(
"-s") || start_opt.startswith(arg_string)) {
157 if (idx == num_entries)
160 if (copy_args[idx].ref().getAsInteger(0, start_val))
167 std::string new_start_val = llvm::formatv(
"{0}", start_val + count_val);
168 if (start_idx == 0) {
174 std::string repeat_command;
177 return repeat_command;
185 const std::vector<ConstString> &types =
187 for (
auto type : types) {
189 thread->shared_from_this(), type);
190 if (ext_thread_sp && ext_thread_sp->IsValid()) {
191 const uint32_t num_frames_with_source = 0;
192 const bool stop_format =
false;
196 num_frames_with_source, stop_format)) {
209 "thread disappeared while computing backtraces: 0x%" PRIx64
"\n",
214 Thread *thread = thread_sp.get();
222 const uint32_t num_frames_with_source = 0;
223 const bool stop_format =
true;
225 num_frames_with_source, stop_format, only_stacks)) {
227 "error displaying backtrace for thread: \"0x%4.4x\"\n",
233 "Interrupt skipped extended backtrace")) {
246#define LLDB_OPTIONS_thread_step_scope
247#include "CommandOptions.inc"
260 return llvm::ArrayRef(g_thread_step_scope_options);
266 const int short_option =
267 g_thread_step_scope_options[option_idx].short_option;
269 switch (short_option) {
272 bool avoid_no_debug =
275 error.SetErrorStringWithFormat(
"invalid boolean value for option '%c'",
284 bool avoid_no_debug =
287 error.SetErrorStringWithFormat(
"invalid boolean value for option '%c'",
296 error.SetErrorStringWithFormat(
"invalid step count '%s'",
297 option_arg.str().c_str());
307 if (option_arg ==
"block") {
312 error.SetErrorStringWithFormat(
"invalid end line number '%s'",
313 option_arg.str().c_str());
327 llvm_unreachable(
"Unimplemented option");
342 if (process_sp && process_sp->GetSteppingRunsAllThreads())
366 const char *name,
const char *help,
371 eCommandRequiresProcess | eCommandRequiresThread |
372 eCommandTryTargetAPILock |
373 eCommandProcessMustBeLaunched |
374 eCommandProcessMustBePaused),
386 arg.push_back(thread_id_arg);
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) {
643 interpreter,
"thread continue",
644 "Continue execution of the current target process. One "
645 "or more threads may be specified, by default all "
648 eCommandRequiresThread | eCommandTryTargetAPILock |
649 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
659 arg.push_back(thread_idx_arg);
679 if (process ==
nullptr) {
680 result.
AppendError(
"no process exists. Cannot continue");
692 std::lock_guard<std::recursive_mutex> guard(
695 std::vector<Thread *> resume_threads;
696 for (
auto &entry : command.
entries()) {
698 if (entry.ref().getAsInteger(0, thread_idx)) {
700 "invalid thread index argument: \"%s\".\n", entry.c_str());
707 resume_threads.push_back(thread);
715 if (resume_threads.empty()) {
716 result.
AppendError(
"no valid thread indexes were specified");
719 if (resume_threads.size() == 1)
724 for (uint32_t idx = 0; idx < num_threads; ++idx) {
727 std::vector<Thread *>::iterator this_thread_pos =
728 find(resume_threads.begin(), resume_threads.end(), thread);
730 if (this_thread_pos != resume_threads.end()) {
731 resume_threads.erase(this_thread_pos);
732 if (!resume_threads.empty())
737 const bool override_suspend =
true;
750 std::lock_guard<std::recursive_mutex> guard(
754 if (current_thread ==
nullptr) {
755 result.
AppendError(
"the process doesn't have a current thread");
759 for (uint32_t idx = 0; idx < num_threads; ++idx) {
761 if (thread == current_thread) {
763 " in process %" PRIu64
"\n",
765 const bool override_suspend =
true;
775 if (synchronous_execution)
781 if (
error.Success()) {
784 if (synchronous_execution) {
801 "Process cannot be continued from its current state (%s).\n",
811#define LLDB_OPTIONS_thread_until
812#include "CommandOptions.inc"
834 switch (short_option) {
844 error.SetErrorStringWithFormat(
"invalid thread index '%s'",
845 option_arg.str().c_str());
851 error.SetErrorStringWithFormat(
"invalid frame index '%s'",
852 option_arg.str().c_str());
860 if (
error.Success()) {
868 llvm_unreachable(
"Unimplemented option");
881 return llvm::ArrayRef(g_thread_until_options);
893 interpreter,
"thread until",
894 "Continue until a line number or address is reached by the "
895 "current or specified thread. Stops when returning from "
896 "the current function as a safety measure. "
897 "The target line number(s) are given as arguments, and if more "
899 " is provided, stepping will stop when the first one is hit.",
901 eCommandRequiresThread | eCommandTryTargetAPILock |
902 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
912 arg.push_back(line_num_arg);
929 if (process ==
nullptr) {
930 result.
AppendError(
"need a valid process to step");
933 std::vector<uint32_t> line_numbers;
937 for (
size_t i = 0; i < num_args; i++) {
938 uint32_t line_number;
944 line_numbers.push_back(line_number);
960 if (thread ==
nullptr) {
963 "Thread index %u is out of range (valid values are 0 - %u).\n",
968 const bool abort_other_plans =
false;
972 if (frame ==
nullptr) {
974 "Frame index %u is out of range for thread id %" PRIu64
".\n",
990 if (line_table ==
nullptr) {
992 "frame %u of thread id %" PRIu64
".\n",
999 std::vector<addr_t> address_list;
1005 "function info - can't get until range.");
1018 bool all_in_function =
true;
1027 for (uint32_t line_number : line_numbers) {
1030 uint32_t start_idx_ptr = index_ptr;
1032 index_ptr, line_number,
nullptr, exact, &line_entry);
1034 line_number = line_entry.
line;
1036 start_idx_ptr = index_ptr;
1037 while (start_idx_ptr <= end_ptr) {
1039 start_idx_ptr, line_number,
nullptr, exact, &line_entry);
1047 address_list.push_back(address);
1049 all_in_function =
false;
1057 address_list.push_back(address);
1059 all_in_function =
false;
1062 if (address_list.empty()) {
1063 if (all_in_function)
1065 "No line entries matching until target.\n");
1068 "Until target outside of the current function.\n");
1074 abort_other_plans, &address_list.front(), address_list.size(),
1082 new_plan_sp->SetIsControllingPlan(
true);
1083 new_plan_sp->SetOkayToDiscard(
false);
1090 " has no debug information.\n",
1097 "Failed to set the selected thread to thread id %" PRIu64
".\n",
1104 if (synchronous_execution)
1109 if (
error.Success()) {
1112 if (synchronous_execution) {
1140 "Change the currently selected thread.", nullptr,
1141 eCommandRequiresProcess | eCommandTryTargetAPILock |
1142 eCommandProcessMustBeLaunched |
1143 eCommandProcessMustBePaused) {
1153 arg.push_back(thread_idx_arg);
1175 if (process ==
nullptr) {
1180 "'%s' takes exactly one thread index argument:\nUsage: %s\n",
1194 if (new_thread ==
nullptr) {
1213 interpreter,
"thread list",
1214 "Show a summary of each thread in the current target process. "
1215 "Use 'settings set thread-format' to customize the individual "
1218 eCommandRequiresProcess | eCommandTryTargetAPILock |
1219 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1228 const bool only_threads_with_stop_reason =
false;
1229 const uint32_t start_frame = 0;
1230 const uint32_t num_frames = 0;
1231 const uint32_t num_frames_with_source = 0;
1233 process->
GetThreadStatus(strm, only_threads_with_stop_reason, start_frame,
1234 num_frames, num_frames_with_source,
false);
1240#define LLDB_OPTIONS_thread_info
1241#include "CommandOptions.inc"
1261 switch (short_option) {
1271 llvm_unreachable(
"Unimplemented option");
1277 return llvm::ArrayRef(g_thread_info_options);
1286 interpreter,
"thread info",
1287 "Show an extended summary of one or "
1288 "more threads. Defaults to the "
1291 eCommandRequiresProcess | eCommandTryTargetAPILock |
1292 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
1317 Thread *thread = thread_sp.get();
1339 interpreter,
"thread exception",
1340 "Display the current exception object for a thread. Defaults to "
1341 "the current thread.",
1343 eCommandRequiresProcess | eCommandTryTargetAPILock |
1344 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1366 ValueObjectSP exception_object_sp = thread_sp->GetCurrentException();
1367 if (exception_object_sp) {
1368 exception_object_sp->Dump(strm);
1371 ThreadSP exception_thread_sp = thread_sp->GetCurrentExceptionBacktrace();
1372 if (exception_thread_sp && exception_thread_sp->IsValid()) {
1373 const uint32_t num_frames_with_source = 0;
1374 const bool stop_format =
false;
1375 exception_thread_sp->GetStatus(strm, 0,
UINT32_MAX,
1376 num_frames_with_source, stop_format);
1387 interpreter,
"thread siginfo",
1388 "Display the current siginfo object for a thread. Defaults to "
1389 "the current thread.",
1391 eCommandRequiresProcess | eCommandTryTargetAPILock |
1392 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1416 thread_sp->GetIndexID());
1419 ValueObjectSP exception_object_sp = thread_sp->GetSiginfoValue();
1420 if (exception_object_sp)
1421 exception_object_sp->Dump(strm);
1423 strm.
Printf(
"(no siginfo)\n");
1431#define LLDB_OPTIONS_thread_return
1432#include "CommandOptions.inc"
1451 switch (short_option) {
1459 error.SetErrorStringWithFormat(
1460 "invalid boolean value '%s' for 'x' option",
1461 option_arg.str().c_str());
1465 llvm_unreachable(
"Unimplemented option");
1475 return llvm::ArrayRef(g_thread_return_options);
1485 "Prematurely return from a stack frame, "
1486 "short-circuiting execution of newer frames "
1487 "and optionally yielding a specified value. Defaults "
1488 "to the exiting the current stack "
1491 eCommandRequiresFrame | eCommandTryTargetAPILock |
1492 eCommandProcessMustBeLaunched |
1493 eCommandProcessMustBePaused) {
1503 arg.push_back(expression_arg);
1519 if (command.startswith(
"-x")) {
1520 if (command.size() != 2U)
1521 result.
AppendWarning(
"Return values ignored when returning from user "
1522 "called expressions");
1527 if (!
error.Success()) {
1539 "Could not select 0th frame after unwinding expression.");
1548 uint32_t frame_idx = frame_sp->GetFrameIndex();
1550 if (frame_sp->IsInlined()) {
1551 result.
AppendError(
"Don't know how to return from inlined frames.");
1555 if (!command.empty()) {
1564 return_valobj_sp, options);
1566 if (return_valobj_sp)
1568 "Error evaluating result expression: %s",
1569 return_valobj_sp->GetError().AsCString());
1572 "Unknown error evaluating result expression.");
1579 const bool broadcast =
true;
1580 error = thread_sp->ReturnFromFrame(frame_sp, return_valobj_sp, broadcast);
1581 if (!
error.Success()) {
1583 "Error returning from frame %d of thread %d: %s.", frame_idx,
1584 thread_sp->GetIndexID(),
error.AsCString());
1596#define LLDB_OPTIONS_thread_jump
1597#include "CommandOptions.inc"
1620 switch (short_option) {
1624 return Status(
"only one source file expected.");
1628 return Status(
"invalid line number: '%s'.", option_arg.str().c_str());
1632 return Status(
"invalid line offset: '%s'.", option_arg.str().c_str());
1642 llvm_unreachable(
"Unimplemented option");
1648 return llvm::ArrayRef(g_thread_jump_options);
1660 interpreter,
"thread jump",
1661 "Sets the program counter to a new address.",
"thread jump",
1662 eCommandRequiresFrame | eCommandTryTargetAPILock |
1663 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1688 if (!reg_ctx->
SetPC(callAddr)) {
1706 "No source file available for the current location.");
1710 std::string warnings;
1718 if (!warnings.empty())
1732#define LLDB_OPTIONS_thread_plan_list
1733#include "CommandOptions.inc"
1751 switch (short_option) {
1757 if (option_arg.getAsInteger(0, tid))
1758 return Status(
"invalid tid: '%s'.", option_arg.str().c_str());
1768 llvm_unreachable(
"Unimplemented option");
1782 return llvm::ArrayRef(g_thread_plan_list_options);
1794 interpreter,
"thread plan list",
1795 "Show thread plans for one or more threads. If no threads are "
1796 "specified, show the "
1797 "current thread. Use the thread-index \"all\" to see all threads.",
1799 eCommandRequiresProcess | eCommandRequiresThread |
1800 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
1801 eCommandProcessMustBePaused) {}
1868 "Discards thread plans up to and including the "
1869 "specified index (see 'thread plan list'.) "
1870 "Only user visible plans can be discarded.",
1872 eCommandRequiresProcess | eCommandRequiresThread |
1873 eCommandTryTargetAPILock |
1874 eCommandProcessMustBeLaunched |
1875 eCommandProcessMustBePaused) {
1885 arg.push_back(plan_index_arg);
1906 "thread plan index - but got %zu.",
1911 uint32_t thread_plan_idx;
1914 "Invalid thread index: \"%s\" - should be unsigned int.",
1919 if (thread_plan_idx == 0) {
1921 "You wouldn't really want me to discard the base thread plan.");
1930 "Could not find User thread plan with index %s.",
1941 "Removes any thread plans associated with "
1942 "currently unreported threads. "
1943 "Specify one or more TID's to remove, or if no "
1944 "TID's are provides, remove threads for all "
1945 "unreported threads",
1947 eCommandRequiresProcess |
1948 eCommandTryTargetAPILock |
1949 eCommandProcessMustBeLaunched |
1950 eCommandProcessMustBePaused) {
1960 arg.push_back(tid_arg);
1979 std::lock_guard<std::recursive_mutex> guard(
1982 for (
size_t i = 0; i < num_args; i++) {
2006 interpreter,
"plan",
2007 "Commands for managing thread plans that control execution.",
2008 "thread plan <subcommand> [<subcommand objects]") {
2030 interpreter,
"trace thread export",
2031 "Commands for exporting traces of the threads in the current "
2032 "process to different formats.",
2033 "thread trace export <export-plugin> [<subcommand objects>]") {
2036 for (llvm::StringRef plugin_name =
2038 !plugin_name.empty();
2054 true, interpreter,
"thread trace start",
2055 "Start tracing threads with the corresponding trace "
2056 "plug-in for the current process.",
2057 "thread trace start [<trace-options>]") {}
2071 interpreter,
"thread trace stop",
2072 "Stop tracing threads, including the ones traced with the "
2073 "\"process trace start\" command."
2074 "Defaults to the current thread. Thread indices can be "
2075 "specified as arguments.\n Use the thread-index \"all\" to stop "
2077 "for all existing threads.",
2078 "thread trace stop [<thread-index> <thread-index> ...]",
2079 eCommandRequiresProcess | eCommandTryTargetAPILock |
2080 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
2081 eCommandProcessMustBeTraced) {}
2086 llvm::ArrayRef<lldb::tid_t> tids)
override {
2089 TraceSP trace_sp = process_sp->GetTarget().GetTrace();
2091 if (llvm::Error err = trace_sp->Stop(tids))
2106 uint32_t thread_idx;
2108 if (!llvm::to_integer(arg, thread_idx)) {
2120#define LLDB_OPTIONS_thread_trace_dump_function_calls
2121#include "CommandOptions.inc"
2136 switch (short_option) {
2151 llvm_unreachable(
"Unimplemented option");
2162 return llvm::ArrayRef(g_thread_trace_dump_function_calls_options);
2174 interpreter,
"thread trace dump function-calls",
2175 "Dump the traced function-calls for one thread. If no "
2176 "thread is specified, the current thread is used.",
2178 eCommandRequiresProcess | eCommandRequiresThread |
2179 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
2180 eCommandProcessMustBePaused | eCommandProcessMustBeTraced) {
2197 llvm::Expected<TraceCursorSP> cursor_or_error =
2200 if (!cursor_or_error) {
2201 result.
AppendError(llvm::toString(cursor_or_error.takeError()));
2206 std::optional<StreamFile> out_file;
2227#define LLDB_OPTIONS_thread_trace_dump_instructions
2228#include "CommandOptions.inc"
2243 switch (short_option) {
2246 if (option_arg.empty() || option_arg.getAsInteger(0, count) ||
2248 error.SetErrorStringWithFormat(
2249 "invalid integer value for option '%s'",
2250 option_arg.str().c_str());
2261 if (option_arg.empty() || option_arg.getAsInteger(0, skip) || skip < 0)
2262 error.SetErrorStringWithFormat(
2263 "invalid integer value for option '%s'",
2264 option_arg.str().c_str());
2271 if (option_arg.empty() || option_arg.getAsInteger(0,
id))
2272 error.SetErrorStringWithFormat(
2273 "invalid integer value for option '%s'",
2274 option_arg.str().c_str());
2322 llvm_unreachable(
"Unimplemented option");
2335 return llvm::ArrayRef(g_thread_trace_dump_instructions_options);
2349 interpreter,
"thread trace dump instructions",
2350 "Dump the traced instructions for one thread. If no "
2351 "thread is specified, show the current thread.",
2353 eCommandRequiresProcess | eCommandRequiresThread |
2354 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
2355 eCommandProcessMustBePaused | eCommandProcessMustBeTraced) {
2365 uint32_t index)
override {
2368 if (cmd.find(
" --continue") == std::string::npos)
2369 cmd +=
" --continue";
2388 llvm::Expected<TraceCursorSP> cursor_or_error =
2391 if (!cursor_or_error) {
2392 result.
AppendError(llvm::toString(cursor_or_error.takeError()));
2403 std::optional<StreamFile> out_file;
2432#define LLDB_OPTIONS_thread_trace_dump_info
2433#include "CommandOptions.inc"
2448 switch (short_option) {
2458 llvm_unreachable(
"Unimplemented option");
2469 return llvm::ArrayRef(g_thread_trace_dump_info_options);
2479 interpreter,
"thread trace dump info",
2480 "Dump the traced information for one or more threads. If no "
2481 "threads are specified, show the current thread. Use the "
2482 "thread-index \"all\" to see all threads.",
2484 eCommandRequiresProcess | eCommandTryTargetAPILock |
2485 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
2486 eCommandProcessMustBeTraced) {}
2510 interpreter,
"dump",
2511 "Commands for displaying trace information of the threads "
2512 "in the current process.",
2513 "thread trace dump <subcommand> [<subcommand objects>]") {
2531 interpreter,
"trace",
2532 "Commands for operating on traces of the threads in the current "
2534 "thread trace <subcommand> [<subcommand objects>]") {
2553 "Commands for operating on "
2554 "one or more threads in "
2555 "the current process.",
2556 "thread <subcommand> [<subcommand-options>]") {
2579 interpreter,
"thread step-in",
2580 "Source level single step, stepping into calls. Defaults "
2581 "to current thread unless specified.",
2586 interpreter,
"thread step-out",
2587 "Finish executing the current stack frame and stop after "
2588 "returning. Defaults to current thread unless specified.",
2593 interpreter,
"thread step-over",
2594 "Source level single step, stepping over calls. Defaults "
2595 "to current thread unless specified.",
2600 interpreter,
"thread step-inst",
2601 "Instruction level single step, stepping into calls. "
2602 "Defaults to current thread unless specified.",
2607 interpreter,
"thread step-inst-over",
2608 "Instruction level single step, stepping over calls. "
2609 "Defaults to current thread unless specified.",
2615 interpreter,
"thread step-scripted",
2616 "Step as instructed by the script class passed in the -C option. "
2617 "You can also specify a dictionary of key (-k) and value (-v) pairs "
2618 "that will be used to populate an SBStructuredData Dictionary, which "
2619 "will be passed to the constructor of the class implementing the "
2620 "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_extended_backtrace
Options * GetOptions() override
CommandObjectThreadBacktrace(CommandInterpreter &interpreter)
std::optional< std::string > GetRepeatCommand(Args ¤t_args, uint32_t idx) 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
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The input array contains a parsed version of the line.
~CommandObjectThreadContinue() override=default
bool 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 input array contains a parsed version of the line.
~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 input array contains a parsed version of the line.
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)
bool DoExecute(Args &args, CommandReturnObject &result) override
~CommandObjectThreadJump() override=default
Options * GetOptions() override
bool DoExecute(Args &command, CommandReturnObject &result) override
~CommandObjectThreadList() override=default
CommandObjectThreadList(CommandInterpreter &interpreter)
bool DoExecute(Args &args, CommandReturnObject &result) override
CommandObjectThreadPlanDiscard(CommandInterpreter &interpreter)
~CommandObjectThreadPlanDiscard() override=default
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The input array contains a parsed version of the line.
~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
bool DoExecute(Args &command, CommandReturnObject &result) override
Options * GetOptions() override
CommandObjectThreadPlanList(CommandInterpreter &interpreter)
bool HandleOneThread(lldb::tid_t tid, CommandReturnObject &result) override
~CommandObjectThreadPlanList() override=default
CommandObjectThreadPlanPrune(CommandInterpreter &interpreter)
bool DoExecute(Args &args, CommandReturnObject &result) override
~CommandObjectThreadPlanPrune() override=default
~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
bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override
CommandObjectThreadReturn(CommandInterpreter &interpreter)
~CommandObjectThreadReturn() override=default
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The input array contains a parsed version of the line.
bool DoExecute(Args &command, CommandReturnObject &result) override
CommandObjectThreadSelect(CommandInterpreter &interpreter)
~CommandObjectThreadSelect() override=default
~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 input array contains a parsed version of the line.
OptionGroupPythonClassWithDict m_class_options
~CommandObjectThreadStepWithTypeAndScope() override=default
OptionGroupOptions m_all_options
Options * GetOptions() override
ThreadStepScopeOptionGroup m_options
CommandObjectThreadStepWithTypeAndScope(CommandInterpreter &interpreter, const char *name, const char *help, const char *syntax, StepType step_type, StepScope step_scope)
bool DoExecute(Args &command, CommandReturnObject &result) override
void HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override
The input array contains a parsed version of the line.
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
bool 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
bool 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
bool DoExecute(Args &args, CommandReturnObject &result) 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.
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)
bool 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
ExecutionContext m_exe_ctx
std::vector< CommandArgumentEntry > m_arguments
CommandInterpreter & GetCommandInterpreter()
Target & GetSelectedTarget()
CommandInterpreter & m_interpreter
Thread * GetDefaultThread()
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.
size_t GetStatus(Stream &strm, uint32_t start_frame, uint32_t num_frames, uint32_t num_frames_with_source, bool stop_format, bool only_stacks=false)
bool SetSelectedFrameByIndexNoisily(uint32_t frame_idx, Stream &output_stream)
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
A line table entry class.
FileSpec file
The source file, possibly mapped by the target.source-map setting.
AddressRange range
The section offset address range for this line entry.
uint32_t line
The source line number, or zero if there is no line number information.
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.