Lines Matching full:thread

33 #include "lldb/Target/Thread.h"
121 interpreter, "thread backtrace",
122 "Show backtraces of thread call stacks. Defaults to the current "
123 "thread, thread indexes can be specified as arguments.\n"
124 "Use the thread-index \"all\" to see all threads.\n"
125 "Use the thread-index \"unique\" to see threads grouped by unique "
128 "frames in the backtrace and 'settings set thread-format' to "
129 "customize the thread header.\n"
195 void DoExtendedBacktrace(Thread *thread, CommandReturnObject &result) {
196 SystemRuntime *runtime = thread->GetProcess()->GetSystemRuntime();
203 thread->shared_from_this(), type);
224 "thread disappeared while computing backtraces: 0x%" PRIx64 "\n",
229 Thread *thread = thread_sp.get();
239 if (!thread->GetStatus(strm, m_options.m_start, m_options.m_count,
243 "error displaying backtrace for thread: \"0x%4.4x\"\n",
244 thread->GetIndexID());
250 DoExtendedBacktrace(thread, result);
420 Thread *thread = nullptr;
423 thread = GetDefaultThread();
425 if (thread == nullptr) {
426 result.AppendError("no selected thread in process");
434 result.AppendErrorWithFormat("invalid thread index '%s'.\n",
438 thread =
440 if (thread == nullptr) {
442 "Thread index %u is out of range (valid values are 0 - %u).\n",
485 StackFrame *frame = thread->GetStackFrameAtIndex(0).get();
525 new_plan_sp = thread->QueueThreadPlanForStepInRange(
538 new_plan_sp = thread->QueueThreadPlanForStepSingleInstruction(
541 StackFrame *frame = thread->GetStackFrameAtIndex(0).get();
544 new_plan_sp = thread->QueueThreadPlanForStepOverRange(
551 new_plan_sp = thread->QueueThreadPlanForStepSingleInstruction(
554 new_plan_sp = thread->QueueThreadPlanForStepSingleInstruction(
557 new_plan_sp = thread->QueueThreadPlanForStepSingleInstruction(
560 new_plan_sp = thread->QueueThreadPlanForStepOut(
563 thread->GetSelectedFrameIndex(DoNoSelectMostRelevantFrame),
566 new_plan_sp = thread->QueueThreadPlanForStepScripted(
590 process->GetThreadList().SetSelectedThreadByID(thread->GetID());
606 // There is a race condition where this thread will return up the call
618 process->GetThreadList().SetSelectedThreadByID(thread->GetID());
641 interpreter, "thread continue",
673 std::vector<Thread *> resume_threads;
678 "invalid thread index argument: \"%s\".\n", entry.c_str());
681 Thread *thread =
684 if (thread) {
685 resume_threads.push_back(thread);
687 result.AppendErrorWithFormat("invalid thread index %u.\n",
694 result.AppendError("no valid thread indexes were specified");
698 result.AppendMessageWithFormat("Resuming thread: ");
703 Thread *thread =
705 std::vector<Thread *>::iterator this_thread_pos =
706 find(resume_threads.begin(), resume_threads.end(), thread);
711 result.AppendMessageWithFormat("%u, ", thread->GetIndexID());
713 result.AppendMessageWithFormat("%u ", thread->GetIndexID());
716 thread->SetResumeState(eStateRunning, override_suspend);
718 thread->SetResumeState(eStateSuspended);
731 Thread *current_thread = GetDefaultThread();
733 result.AppendError("the process doesn't have a current thread");
738 Thread *thread = process->GetThreadList().GetThreadAtIndex(idx).get();
739 if (thread == current_thread) {
740 result.AppendMessageWithFormat("Resuming thread 0x%4.4" PRIx64
742 thread->GetID(), process->GetID());
744 thread->SetResumeState(eStateRunning, override_suspend);
746 thread->SetResumeState(eStateSuspended);
758 // We should not be holding the thread list lock when we do this.
820 error = Status::FromErrorStringWithFormat("invalid thread index '%s'",
869 interpreter, "thread until",
871 "current or specified thread. Stops when returning from "
896 Thread *thread = nullptr;
917 thread = GetDefaultThread();
919 thread = process->GetThreadList()
924 if (thread == nullptr) {
927 "Thread index %u is out of range (valid values are 0 - %u).\n",
935 thread->GetStackFrameAtIndex(m_options.m_frame_idx).get();
938 "Frame index %u is out of range for thread id %" PRIu64 ".\n",
939 m_options.m_frame_idx, thread->GetID());
956 "frame %u of thread id %" PRIu64 ".\n",
957 m_options.m_frame_idx, thread->GetID());
1037 new_plan_sp = thread->QueueThreadPlanForStepUntil(
1053 result.AppendErrorWithFormat("Frame index %u of thread id %" PRIu64
1055 m_options.m_frame_idx, thread->GetID());
1059 if (!process->GetThreadList().SetSelectedThreadByID(thread->GetID())) {
1061 "Failed to set the selected thread to thread id %" PRIu64 ".\n",
1062 thread->GetID());
1121 return Status::FromErrorStringWithFormat("Invalid thread ID: '%s'.",
1142 : CommandObjectParsed(interpreter, "thread select",
1143 "Change the currently selected thread.",
1144 "thread select <thread-index> (or -t <thread-id>)",
1191 "'%s' takes exactly one thread index argument, or a thread ID "
1197 result.AppendErrorWithFormat("'%s' cannot take both a thread ID option "
1198 "and a thread index argument:\nUsage: %s\n",
1203 Thread *new_thread = nullptr;
1207 result.AppendErrorWithFormat("Invalid thread index '%s'",
1213 result.AppendErrorWithFormat("Invalid thread index #%s.\n",
1221 result.AppendErrorWithFormat("Invalid thread ID %" PRIu64 ".\n",
1241 interpreter, "thread list",
1242 "Show a summary of each thread in the current target process. "
1243 "Use 'settings set thread-format' to customize the individual "
1244 "thread listings.",
1245 "thread list",
1313 interpreter, "thread info",
1316 "current thread.",
1317 "thread info",
1339 result.AppendErrorWithFormat("thread no longer exists: 0x%" PRIx64 "\n",
1344 Thread *thread = thread_sp.get();
1347 if (!thread->GetDescription(strm, eDescriptionLevelFull,
1350 result.AppendErrorWithFormat("error displaying info for thread: \"%d\"\n",
1351 thread->GetIndexID());
1366 interpreter, "thread exception",
1367 "Display the current exception object for a thread. Defaults to "
1368 "the current thread.",
1369 "thread exception",
1387 result.AppendErrorWithFormat("thread no longer exists: 0x%" PRIx64 "\n",
1418 interpreter, "thread siginfo",
1419 "Display the current siginfo object for a thread. Defaults to "
1420 "the current thread.",
1421 "thread siginfo",
1439 result.AppendErrorWithFormat("thread no longer exists: 0x%" PRIx64 "\n",
1446 result.AppendErrorWithFormat("error displaying info for thread: \"%d\"\n",
1518 : CommandObjectRaw(interpreter, "thread return",
1524 "thread return",
1540 // "thread return -- -5".
1546 Thread *thread = m_exe_ctx.GetThreadPtr();
1548 error = thread->UnwindInnermostExpression();
1554 thread->SetSelectedFrameByIndexNoisily(0, result.GetOutputStream());
1557 thread->GetSelectedFrame(DoNoSelectMostRelevantFrame));
1605 "Error returning from frame %d of thread %d: %s.", frame_idx,
1683 interpreter, "thread jump",
1684 "Sets the program counter to a new address.", "thread jump",
1696 Thread *thread = m_exe_ctx.GetThreadPtr();
1712 result.AppendErrorWithFormat("Error changing PC value for thread %d.",
1713 thread->GetIndexID());
1734 Status err = thread->JumpToLine(file, line, m_options.m_force, &warnings);
1817 interpreter, "thread plan list",
1818 "Show thread plans for one or more threads. If no threads are "
1820 "current thread. Use the thread-index \"all\" to see all threads.",
1843 // Thread Indexes...
1890 : CommandObjectParsed(interpreter, "thread plan discard",
1891 "Discards thread plans up to and including the "
1892 "specified index (see 'thread plan list'.) "
1914 Thread *thread = m_exe_ctx.GetThreadPtr();
1917 "thread plan index - but got %zu.",
1925 "Invalid thread index: \"%s\" - should be unsigned int.",
1932 "You wouldn't really want me to discard the base thread plan.");
1936 if (thread->DiscardUserThreadPlansUpToIndex(thread_plan_idx)) {
1940 "Could not find User thread plan with index %s.",
1949 : CommandObjectParsed(interpreter, "thread plan prune",
1950 "Removes any thread plans associated with "
1982 result.AppendErrorWithFormat("invalid thread specification: \"%s\"\n",
2003 "Commands for managing thread plans that control execution.",
2004 "thread plan <subcommand> [<subcommand objects]") {
2026 interpreter, "trace thread export",
2029 "thread trace export <export-plugin> [<subcommand objects>]") {
2050 /*live_debug_session_only=*/true, interpreter, "thread trace start",
2053 "thread trace start [<trace-options>]") {}
2067 interpreter, "thread trace stop",
2070 "Defaults to the current thread. Thread indices can be "
2071 "specified as arguments.\n Use the thread-index \"all\" to stop "
2074 "thread trace stop [<thread-index> <thread-index> ...]",
2105 result.AppendErrorWithFormat("invalid thread specification: \"%s\"\n", arg);
2111 result.AppendErrorWithFormat("no thread with index: \"%s\"\n", arg);
2170 interpreter, "thread trace dump function-calls",
2171 "Dump the traced function-calls for one thread. If no "
2172 "thread is specified, the current thread is used.",
2188 result.AppendError("invalid thread\n");
2343 interpreter, "thread trace dump instructions",
2344 "Dump the traced instructions for one thread. If no "
2345 "thread is specified, show the current thread.",
2370 result.AppendError("invalid thread\n");
2471 interpreter, "thread trace dump info",
2473 "threads are specified, show the current thread. Use the "
2474 "thread-index \"all\" to see all threads.",
2505 "thread trace dump <subcommand> [<subcommand objects>]") {
2526 "thread trace <subcommand> [<subcommand objects>]") {
2544 : CommandObjectMultiword(interpreter, "thread",
2548 "thread <subcommand> [<subcommand-options>]") {
2571 interpreter, "thread step-in",
2573 "to current thread unless specified.",
2578 interpreter, "thread step-out",
2580 "returning. Defaults to current thread unless specified.",
2585 interpreter, "thread step-over",
2587 "to current thread unless specified.",
2592 interpreter, "thread step-inst",
2594 "Defaults to current thread unless specified.",
2599 interpreter, "thread step-inst-over",
2601 "Defaults to current thread unless specified.",
2607 interpreter, "thread step-scripted",