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,
93 llvm_unreachable(
"Unimplemented option");
105 return llvm::ArrayRef(g_thread_backtrace_options);
116 interpreter,
"thread backtrace",
117 "Show backtraces of thread call stacks. Defaults to the current "
118 "thread, thread indexes can be specified as arguments.\n"
119 "Use the thread-index \"all\" to see all threads.\n"
120 "Use the thread-index \"unique\" to see threads grouped by unique "
122 "Use 'settings set frame-format' to customize the printing of "
123 "frames in the backtrace and 'settings set thread-format' to "
124 "customize the thread header.",
126 eCommandRequiresProcess | eCommandRequiresThread |
127 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
128 eCommandProcessMustBePaused) {}
135 uint32_t index)
override {
136 llvm::StringRef count_opt(
"--count");
137 llvm::StringRef start_opt(
"--start");
144 Args copy_args(current_args);
147 size_t count_idx = 0;
148 size_t start_idx = 0;
149 size_t count_val = 0;
150 size_t start_val = 0;
152 for (
size_t idx = 0; idx < num_entries; idx++) {
153 llvm::StringRef arg_string = copy_args[idx].ref();
154 if (arg_string ==
"-c" || count_opt.starts_with(arg_string)) {
156 if (idx == num_entries)
159 if (copy_args[idx].ref().getAsInteger(0, count_val))
161 }
else if (arg_string ==
"-s" || start_opt.starts_with(arg_string)) {
163 if (idx == num_entries)
166 if (copy_args[idx].ref().getAsInteger(0, start_val))
173 std::string new_start_val = llvm::formatv(
"{0}", start_val + count_val);
174 if (start_idx == 0) {
180 std::string repeat_command;
183 return repeat_command;
191 const std::vector<ConstString> &types =
193 for (
auto type : types) {
195 thread->shared_from_this(), type);
196 if (ext_thread_sp && ext_thread_sp->IsValid()) {
197 const uint32_t num_frames_with_source = 0;
198 const bool stop_format =
false;
202 num_frames_with_source, stop_format)) {
215 "thread disappeared while computing backtraces: 0x%" PRIx64
"\n",
220 Thread *thread = thread_sp.get();
228 const uint32_t num_frames_with_source = 0;
229 const bool stop_format =
true;
231 num_frames_with_source, stop_format, only_stacks)) {
233 "error displaying backtrace for thread: \"0x%4.4x\"\n",
239 "Interrupt skipped extended backtrace")) {
250#define LLDB_OPTIONS_thread_step_scope
251#include "CommandOptions.inc"
264 return llvm::ArrayRef(g_thread_step_scope_options);
270 const int short_option =
271 g_thread_step_scope_options[option_idx].short_option;
273 switch (short_option) {
276 bool avoid_no_debug =
279 error.SetErrorStringWithFormat(
280 "invalid boolean value for option '%c': %s", short_option,
289 bool avoid_no_debug =
292 error.SetErrorStringWithFormat(
293 "invalid boolean value for option '%c': %s", short_option,
302 error.SetErrorStringWithFormat(
303 "invalid integer value for option '%c': %s", short_option,
314 if (option_arg ==
"block") {
319 error.SetErrorStringWithFormat(
"invalid end line number '%s'",
320 option_arg.str().c_str());
334 llvm_unreachable(
"Unimplemented option");
349 if (process_sp && process_sp->GetSteppingRunsAllThreads())
373 const char *name,
const char *help,
377 eCommandRequiresProcess | eCommandRequiresThread |
378 eCommandTryTargetAPILock |
379 eCommandProcessMustBeLaunched |
380 eCommandProcessMustBePaused),
415 if (thread ==
nullptr) {
416 result.
AppendError(
"no selected thread in process");
421 uint32_t step_thread_idx;
423 if (!llvm::to_integer(thread_idx_cstr, step_thread_idx)) {
430 if (thread ==
nullptr) {
432 "Thread index %u is out of range (valid values are 0 - %u).\n",
433 step_thread_idx, num_threads);
442 }
else if (!
GetDebugger().GetScriptInterpreter()->CheckObjectExists(
445 "class for scripted step: \"%s\" does not exist.",
454 "end line option is only valid for step into");
458 const bool abort_other_plans =
false;
463 bool bool_stop_other_threads;
465 bool_stop_other_threads =
false;
469 bool_stop_other_threads =
true;
476 assert(frame !=
nullptr);
502 "Could not find the current block address.");
516 abort_other_plans, range,
529 false, abort_other_plans, bool_stop_other_threads, new_plan_status);
538 stop_other_threads, new_plan_status,
542 true, abort_other_plans, bool_stop_other_threads, new_plan_status);
545 false, abort_other_plans, bool_stop_other_threads, new_plan_status);
548 true, abort_other_plans, bool_stop_other_threads, new_plan_status);
551 abort_other_plans,
nullptr,
false, bool_stop_other_threads,
eVoteYes,
570 new_plan_sp->SetIsControllingPlan(
true);
571 new_plan_sp->SetOkayToDiscard(
false);
576 "step operation does not support iteration count.");
586 if (synchronous_execution)
591 if (!
error.Success()) {
600 process->
SyncIOHandler(iohandler_id, std::chrono::seconds(2));
602 if (synchronous_execution) {
631 interpreter,
"thread continue",
632 "Continue execution of the current target process. One "
633 "or more threads may be specified, by default all "
636 eCommandRequiresThread | eCommandTryTargetAPILock |
637 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
647 if (process ==
nullptr) {
648 result.
AppendError(
"no process exists. Cannot continue");
660 std::lock_guard<std::recursive_mutex> guard(
663 std::vector<Thread *> resume_threads;
664 for (
auto &entry : command.
entries()) {
666 if (entry.ref().getAsInteger(0, thread_idx)) {
668 "invalid thread index argument: \"%s\".\n", entry.c_str());
675 resume_threads.push_back(thread);
683 if (resume_threads.empty()) {
684 result.
AppendError(
"no valid thread indexes were specified");
687 if (resume_threads.size() == 1)
692 for (uint32_t idx = 0; idx < num_threads; ++idx) {
695 std::vector<Thread *>::iterator this_thread_pos =
696 find(resume_threads.begin(), resume_threads.end(), thread);
698 if (this_thread_pos != resume_threads.end()) {
699 resume_threads.erase(this_thread_pos);
700 if (!resume_threads.empty())
705 const bool override_suspend =
true;
718 std::lock_guard<std::recursive_mutex> guard(
722 if (current_thread ==
nullptr) {
723 result.
AppendError(
"the process doesn't have a current thread");
727 for (uint32_t idx = 0; idx < num_threads; ++idx) {
729 if (thread == current_thread) {
731 " in process %" PRIu64
"\n",
733 const bool override_suspend =
true;
743 if (synchronous_execution)
749 if (
error.Success()) {
752 if (synchronous_execution) {
769 "Process cannot be continued from its current state (%s).\n",
777#define LLDB_OPTIONS_thread_until
778#include "CommandOptions.inc"
800 switch (short_option) {
810 error.SetErrorStringWithFormat(
"invalid thread index '%s'",
811 option_arg.str().c_str());
817 error.SetErrorStringWithFormat(
"invalid frame index '%s'",
818 option_arg.str().c_str());
826 if (
error.Success()) {
834 llvm_unreachable(
"Unimplemented option");
847 return llvm::ArrayRef(g_thread_until_options);
859 interpreter,
"thread until",
860 "Continue until a line number or address is reached by the "
861 "current or specified thread. Stops when returning from "
862 "the current function as a safety measure. "
863 "The target line number(s) are given as arguments, and if more "
865 " is provided, stepping will stop when the first one is hit.",
867 eCommandRequiresThread | eCommandTryTargetAPILock |
868 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
883 if (process ==
nullptr) {
884 result.
AppendError(
"need a valid process to step");
887 std::vector<uint32_t> line_numbers;
891 for (
size_t i = 0; i < num_args; i++) {
892 uint32_t line_number;
898 line_numbers.push_back(line_number);
914 if (thread ==
nullptr) {
917 "Thread index %u is out of range (valid values are 0 - %u).\n",
922 const bool abort_other_plans =
false;
926 if (frame ==
nullptr) {
928 "Frame index %u is out of range for thread id %" PRIu64
".\n",
944 if (line_table ==
nullptr) {
946 "frame %u of thread id %" PRIu64
".\n",
953 std::vector<addr_t> address_list;
959 "function info - can't get until range.");
972 bool all_in_function =
true;
981 for (uint32_t line_number : line_numbers) {
984 uint32_t start_idx_ptr = index_ptr;
986 index_ptr, line_number,
nullptr, exact, &line_entry);
988 line_number = line_entry.
line;
990 start_idx_ptr = index_ptr;
991 while (start_idx_ptr <= end_ptr) {
993 start_idx_ptr, line_number,
nullptr, exact, &line_entry);
1001 address_list.push_back(address);
1003 all_in_function =
false;
1011 address_list.push_back(address);
1013 all_in_function =
false;
1016 if (address_list.empty()) {
1017 if (all_in_function)
1019 "No line entries matching until target.\n");
1022 "Until target outside of the current function.\n");
1028 abort_other_plans, &address_list.front(), address_list.size(),
1036 new_plan_sp->SetIsControllingPlan(
true);
1037 new_plan_sp->SetOkayToDiscard(
false);
1044 " has no debug information.\n",
1051 "Failed to set the selected thread to thread id %" PRIu64
".\n",
1058 if (synchronous_execution)
1063 if (
error.Success()) {
1066 if (synchronous_execution) {
1089#define LLDB_OPTIONS_thread_select
1090#include "CommandOptions.inc"
1106 const int short_option = g_thread_select_options[option_idx].short_option;
1107 switch (short_option) {
1111 return Status(
"Invalid thread ID: '%s'.", option_arg.str().c_str());
1117 llvm_unreachable(
"Unimplemented option");
1124 return llvm::ArrayRef(g_thread_select_options);
1132 "Change the currently selected thread.",
1133 "thread select <thread-index> (or -t <thread-id>)",
1134 eCommandRequiresProcess | eCommandTryTargetAPILock |
1135 eCommandProcessMustBeLaunched |
1136 eCommandProcessMustBePaused) {
1147 arg.push_back(thread_idx_arg);
1174 if (process ==
nullptr) {
1180 "'%s' takes exactly one thread index argument, or a thread ID "
1181 "option:\nUsage: %s\n",
1187 "and a thread index argument:\nUsage: %s\n",
1192 Thread *new_thread =
nullptr;
1201 if (new_thread ==
nullptr) {
1209 if (new_thread ==
nullptr) {
1230 interpreter,
"thread list",
1231 "Show a summary of each thread in the current target process. "
1232 "Use 'settings set thread-format' to customize the individual "
1235 eCommandRequiresProcess | eCommandTryTargetAPILock |
1236 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1245 const bool only_threads_with_stop_reason =
false;
1246 const uint32_t start_frame = 0;
1247 const uint32_t num_frames = 0;
1248 const uint32_t num_frames_with_source = 0;
1250 process->
GetThreadStatus(strm, only_threads_with_stop_reason, start_frame,
1251 num_frames, num_frames_with_source,
false);
1256#define LLDB_OPTIONS_thread_info
1257#include "CommandOptions.inc"
1277 switch (short_option) {
1287 llvm_unreachable(
"Unimplemented option");
1293 return llvm::ArrayRef(g_thread_info_options);
1302 interpreter,
"thread info",
1303 "Show an extended summary of one or "
1304 "more threads. Defaults to the "
1307 eCommandRequiresProcess | eCommandTryTargetAPILock |
1308 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {
1333 Thread *thread = thread_sp.get();
1355 interpreter,
"thread exception",
1356 "Display the current exception object for a thread. Defaults to "
1357 "the current thread.",
1359 eCommandRequiresProcess | eCommandTryTargetAPILock |
1360 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1382 ValueObjectSP exception_object_sp = thread_sp->GetCurrentException();
1383 if (exception_object_sp) {
1384 if (llvm::Error
error = exception_object_sp->Dump(strm)) {
1390 ThreadSP exception_thread_sp = thread_sp->GetCurrentExceptionBacktrace();
1391 if (exception_thread_sp && exception_thread_sp->IsValid()) {
1392 const uint32_t num_frames_with_source = 0;
1393 const bool stop_format =
false;
1394 exception_thread_sp->GetStatus(strm, 0,
UINT32_MAX,
1395 num_frames_with_source, stop_format);
1406 interpreter,
"thread siginfo",
1407 "Display the current siginfo object for a thread. Defaults to "
1408 "the current thread.",
1410 eCommandRequiresProcess | eCommandTryTargetAPILock |
1411 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1435 thread_sp->GetIndexID());
1438 ValueObjectSP exception_object_sp = thread_sp->GetSiginfoValue();
1439 if (exception_object_sp) {
1440 if (llvm::Error
error = exception_object_sp->Dump(strm)) {
1445 strm.
Printf(
"(no siginfo)\n");
1453#define LLDB_OPTIONS_thread_return
1454#include "CommandOptions.inc"
1473 switch (short_option) {
1481 error.SetErrorStringWithFormat(
1482 "invalid boolean value '%s' for 'x' option",
1483 option_arg.str().c_str());
1487 llvm_unreachable(
"Unimplemented option");
1497 return llvm::ArrayRef(g_thread_return_options);
1507 "Prematurely return from a stack frame, "
1508 "short-circuiting execution of newer frames "
1509 "and optionally yielding a specified value. Defaults "
1510 "to the exiting the current stack "
1513 eCommandRequiresFrame | eCommandTryTargetAPILock |
1514 eCommandProcessMustBeLaunched |
1515 eCommandProcessMustBePaused) {
1529 if (command.starts_with(
"-x")) {
1530 if (command.size() != 2U)
1531 result.
AppendWarning(
"Return values ignored when returning from user "
1532 "called expressions");
1537 if (!
error.Success()) {
1549 "Could not select 0th frame after unwinding expression.");
1558 uint32_t frame_idx = frame_sp->GetFrameIndex();
1560 if (frame_sp->IsInlined()) {
1561 result.
AppendError(
"Don't know how to return from inlined frames.");
1565 if (!command.empty()) {
1574 return_valobj_sp, options);
1576 if (return_valobj_sp)
1578 "Error evaluating result expression: %s",
1579 return_valobj_sp->GetError().AsCString());
1582 "Unknown error evaluating result expression.");
1589 const bool broadcast =
true;
1590 error = thread_sp->ReturnFromFrame(frame_sp, return_valobj_sp, broadcast);
1591 if (!
error.Success()) {
1593 "Error returning from frame %d of thread %d: %s.", frame_idx,
1594 thread_sp->GetIndexID(),
error.AsCString());
1605#define LLDB_OPTIONS_thread_jump
1606#include "CommandOptions.inc"
1629 switch (short_option) {
1633 return Status(
"only one source file expected.");
1637 return Status(
"invalid line number: '%s'.", option_arg.str().c_str());
1641 return Status(
"invalid line offset: '%s'.", option_arg.str().c_str());
1651 llvm_unreachable(
"Unimplemented option");
1657 return llvm::ArrayRef(g_thread_jump_options);
1669 interpreter,
"thread jump",
1670 "Sets the program counter to a new address.",
"thread jump",
1671 eCommandRequiresFrame | eCommandTryTargetAPILock |
1672 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
1697 if (!reg_ctx->
SetPC(callAddr)) {
1715 "No source file available for the current location.");
1719 std::string warnings;
1727 if (!warnings.empty())
1740#define LLDB_OPTIONS_thread_plan_list
1741#include "CommandOptions.inc"
1759 switch (short_option) {
1765 if (option_arg.getAsInteger(0, tid))
1766 return Status(
"invalid tid: '%s'.", option_arg.str().c_str());
1776 llvm_unreachable(
"Unimplemented option");
1790 return llvm::ArrayRef(g_thread_plan_list_options);
1802 interpreter,
"thread plan list",
1803 "Show thread plans for one or more threads. If no threads are "
1804 "specified, show the "
1805 "current thread. Use the thread-index \"all\" to see all threads.",
1807 eCommandRequiresProcess | eCommandRequiresThread |
1808 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
1809 eCommandProcessMustBePaused) {}
1876 "Discards thread plans up to and including the "
1877 "specified index (see 'thread plan list'.) "
1878 "Only user visible plans can be discarded.",
1880 eCommandRequiresProcess | eCommandRequiresThread |
1881 eCommandTryTargetAPILock |
1882 eCommandProcessMustBeLaunched |
1883 eCommandProcessMustBePaused) {
1902 "thread plan index - but got %zu.",
1907 uint32_t thread_plan_idx;
1910 "Invalid thread index: \"%s\" - should be unsigned int.",
1915 if (thread_plan_idx == 0) {
1917 "You wouldn't really want me to discard the base thread plan.");
1925 "Could not find User thread plan with index %s.",
1935 "Removes any thread plans associated with "
1936 "currently unreported threads. "
1937 "Specify one or more TID's to remove, or if no "
1938 "TID's are provides, remove threads for all "
1939 "unreported threads",
1941 eCommandRequiresProcess |
1942 eCommandTryTargetAPILock |
1943 eCommandProcessMustBeLaunched |
1944 eCommandProcessMustBePaused) {
1961 std::lock_guard<std::recursive_mutex> guard(
1964 for (
size_t i = 0; i < num_args; i++) {
1987 interpreter,
"plan",
1988 "Commands for managing thread plans that control execution.",
1989 "thread plan <subcommand> [<subcommand objects]") {
2011 interpreter,
"trace thread export",
2012 "Commands for exporting traces of the threads in the current "
2013 "process to different formats.",
2014 "thread trace export <export-plugin> [<subcommand objects>]") {
2017 for (llvm::StringRef plugin_name =
2019 !plugin_name.empty();
2035 true, interpreter,
"thread trace start",
2036 "Start tracing threads with the corresponding trace "
2037 "plug-in for the current process.",
2038 "thread trace start [<trace-options>]") {}
2052 interpreter,
"thread trace stop",
2053 "Stop tracing threads, including the ones traced with the "
2054 "\"process trace start\" command."
2055 "Defaults to the current thread. Thread indices can be "
2056 "specified as arguments.\n Use the thread-index \"all\" to stop "
2058 "for all existing threads.",
2059 "thread trace stop [<thread-index> <thread-index> ...]",
2060 eCommandRequiresProcess | eCommandTryTargetAPILock |
2061 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
2062 eCommandProcessMustBeTraced) {}
2067 llvm::ArrayRef<lldb::tid_t> tids)
override {
2070 TraceSP trace_sp = process_sp->GetTarget().GetTrace();
2072 if (llvm::Error err = trace_sp->Stop(tids))
2087 uint32_t thread_idx;
2089 if (!llvm::to_integer(arg, thread_idx)) {
2101#define LLDB_OPTIONS_thread_trace_dump_function_calls
2102#include "CommandOptions.inc"
2117 switch (short_option) {
2132 llvm_unreachable(
"Unimplemented option");
2143 return llvm::ArrayRef(g_thread_trace_dump_function_calls_options);
2155 interpreter,
"thread trace dump function-calls",
2156 "Dump the traced function-calls for one thread. If no "
2157 "thread is specified, the current thread is used.",
2159 eCommandRequiresProcess | eCommandRequiresThread |
2160 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
2161 eCommandProcessMustBePaused | eCommandProcessMustBeTraced) {
2177 llvm::Expected<TraceCursorSP> cursor_or_error =
2180 if (!cursor_or_error) {
2181 result.
AppendError(llvm::toString(cursor_or_error.takeError()));
2186 std::optional<StreamFile> out_file;
2206#define LLDB_OPTIONS_thread_trace_dump_instructions
2207#include "CommandOptions.inc"
2222 switch (short_option) {
2225 if (option_arg.empty() || option_arg.getAsInteger(0, count) ||
2227 error.SetErrorStringWithFormat(
2228 "invalid integer value for option '%s'",
2229 option_arg.str().c_str());
2240 if (option_arg.empty() || option_arg.getAsInteger(0, skip) || skip < 0)
2241 error.SetErrorStringWithFormat(
2242 "invalid integer value for option '%s'",
2243 option_arg.str().c_str());
2250 if (option_arg.empty() || option_arg.getAsInteger(0,
id))
2251 error.SetErrorStringWithFormat(
2252 "invalid integer value for option '%s'",
2253 option_arg.str().c_str());
2301 llvm_unreachable(
"Unimplemented option");
2314 return llvm::ArrayRef(g_thread_trace_dump_instructions_options);
2328 interpreter,
"thread trace dump instructions",
2329 "Dump the traced instructions for one thread. If no "
2330 "thread is specified, show the current thread.",
2332 eCommandRequiresProcess | eCommandRequiresThread |
2333 eCommandTryTargetAPILock | eCommandProcessMustBeLaunched |
2334 eCommandProcessMustBePaused | eCommandProcessMustBeTraced) {
2343 uint32_t index)
override {
2346 if (cmd.find(
" --continue") == std::string::npos)
2347 cmd +=
" --continue";
2366 llvm::Expected<TraceCursorSP> cursor_or_error =
2369 if (!cursor_or_error) {
2370 result.
AppendError(llvm::toString(cursor_or_error.takeError()));
2381 std::optional<StreamFile> out_file;
2409#define LLDB_OPTIONS_thread_trace_dump_info
2410#include "CommandOptions.inc"
2425 switch (short_option) {
2435 llvm_unreachable(
"Unimplemented option");
2446 return llvm::ArrayRef(g_thread_trace_dump_info_options);
2456 interpreter,
"thread trace dump info",
2457 "Dump the traced information for one or more threads. If no "
2458 "threads are specified, show the current thread. Use the "
2459 "thread-index \"all\" to see all threads.",
2461 eCommandRequiresProcess | eCommandTryTargetAPILock |
2462 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
2463 eCommandProcessMustBeTraced) {}
2487 interpreter,
"dump",
2488 "Commands for displaying trace information of the threads "
2489 "in the current process.",
2490 "thread trace dump <subcommand> [<subcommand objects>]") {
2508 interpreter,
"trace",
2509 "Commands for operating on traces of the threads in the current "
2511 "thread trace <subcommand> [<subcommand objects>]") {
2530 "Commands for operating on "
2531 "one or more threads in "
2532 "the current process.",
2533 "thread <subcommand> [<subcommand-options>]") {
2556 interpreter,
"thread step-in",
2557 "Source level single step, stepping into calls. Defaults "
2558 "to current thread unless specified.",
2563 interpreter,
"thread step-out",
2564 "Finish executing the current stack frame and stop after "
2565 "returning. Defaults to current thread unless specified.",
2570 interpreter,
"thread step-over",
2571 "Source level single step, stepping over calls. Defaults "
2572 "to current thread unless specified.",
2577 interpreter,
"thread step-inst",
2578 "Instruction level single step, stepping into calls. "
2579 "Defaults to current thread unless specified.",
2584 interpreter,
"thread step-inst-over",
2585 "Instruction level single step, stepping over calls. "
2586 "Defaults to current thread unless specified.",
2592 interpreter,
"thread step-scripted",
2593 "Step as instructed by the script class passed in the -C option. "
2594 "You can also specify a dictionary of key (-k) and value (-v) pairs "
2595 "that will be used to populate an SBStructuredData Dictionary, which "
2596 "will be passed to the constructor of the class implementing the "
2597 "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 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.
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
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.