LLDB  mainline
Classes | Enumerations | Functions | Variables
CommandObjectThread.cpp File Reference
#include "CommandObjectThread.h"
#include "lldb/Core/SourceManager.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/OptionParser.h"
#include "lldb/Host/StringConvert.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Interpreter/Options.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/LineEntry.h"
#include "lldb/Symbol/LineTable.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/SystemRuntime.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadPlan.h"
#include "lldb/Target/ThreadPlanStepInRange.h"
#include "lldb/Target/ThreadPlanStepInstruction.h"
#include "lldb/Target/ThreadPlanStepOut.h"
#include "lldb/Target/ThreadPlanStepRange.h"
#include "lldb/Utility/State.h"
#include "lldb/lldb-private.h"
Include dependency graph for CommandObjectThread.cpp:

Go to the source code of this file.

Classes

class  CommandObjectIterateOverThreads
 
class  CommandObjectThreadBacktrace
 
class  CommandObjectThreadBacktrace::CommandOptions
 
class  CommandObjectThreadStepWithTypeAndScope
 
class  CommandObjectThreadStepWithTypeAndScope::CommandOptions
 
class  CommandObjectThreadContinue
 
class  CommandObjectThreadUntil
 
class  CommandObjectThreadUntil::CommandOptions
 
class  CommandObjectThreadSelect
 
class  CommandObjectThreadList
 
class  CommandObjectThreadInfo
 
class  CommandObjectThreadInfo::CommandOptions
 
class  CommandObjectThreadException
 
class  CommandObjectThreadReturn
 
class  CommandObjectThreadReturn::CommandOptions
 
class  CommandObjectThreadJump
 
class  CommandObjectThreadJump::CommandOptions
 
class  CommandObjectThreadPlanList
 
class  CommandObjectThreadPlanList::CommandOptions
 
class  CommandObjectThreadPlanDiscard
 
class  CommandObjectMultiwordThreadPlan
 

Enumerations

enum  StepScope { eStepScopeSource, eStepScopeInstruction }
 

Functions

static constexpr OptionEnumValues TriRunningModes ()
 
static constexpr OptionEnumValues DuoRunningModes ()
 

Variables

static constexpr OptionDefinition g_thread_backtrace_options []
 
static constexpr OptionEnumValueElement g_tri_running_mode []
 
static constexpr OptionDefinition g_thread_step_scope_options []
 
static constexpr OptionEnumValueElement g_duo_running_mode []
 
static constexpr OptionDefinition g_thread_until_options []
 
static constexpr OptionDefinition g_thread_info_options []
 
static constexpr OptionDefinition g_thread_return_options []
 
static constexpr OptionDefinition g_thread_jump_options []
 
static constexpr OptionDefinition g_thread_plan_list_options []
 

Enumeration Type Documentation

◆ StepScope

enum StepScope
Enumerator
eStepScopeSource 
eStepScopeInstruction 

Definition at line 397 of file CommandObjectThread.cpp.

Function Documentation

◆ DuoRunningModes()

static constexpr OptionEnumValues DuoRunningModes ( )
static

Definition at line 993 of file CommandObjectThread.cpp.

References g_duo_running_mode.

◆ TriRunningModes()

static constexpr OptionEnumValues TriRunningModes ( )
static

Definition at line 405 of file CommandObjectThread.cpp.

References g_tri_running_mode.

Variable Documentation

◆ g_duo_running_mode

constexpr OptionEnumValueElement g_duo_running_mode[]
static
Initial value:
= {
{eOnlyThisThread, "this-thread", "Run only this thread"},
{eAllThreads, "all-threads", "Run all threads"} }

Definition at line 989 of file CommandObjectThread.cpp.

Referenced by DuoRunningModes().

◆ g_thread_backtrace_options

constexpr OptionDefinition g_thread_backtrace_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_1, false, "count", 'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCount, "How many frames to display (-1 for all)" },
{ LLDB_OPT_SET_1, false, "start", 's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFrameIndex, "Frame in which to start the backtrace" },
{ LLDB_OPT_SET_1, false, "extended", 'e', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Show the extended backtrace, if available" }
}
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 241 of file CommandObjectThread.cpp.

Referenced by CommandObjectThreadBacktrace::CommandOptions::GetDefinitions().

◆ g_thread_info_options

constexpr OptionDefinition g_thread_info_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_ALL, false, "json", 'j', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Display the thread info in JSON format." },
{ LLDB_OPT_SET_ALL, false, "stop-info", 's', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Display the extended stop info in JSON format." }
}
#define LLDB_OPT_SET_ALL
Definition: lldb-defines.h:110

Definition at line 1421 of file CommandObjectThread.cpp.

Referenced by CommandObjectThreadInfo::CommandOptions::GetDefinitions().

◆ g_thread_jump_options

constexpr OptionDefinition g_thread_jump_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "Specifies the source file to jump to." },
{ LLDB_OPT_SET_1, true, "line", 'l', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeLineNum, "Specifies the line number to jump to." },
{ LLDB_OPT_SET_2, true, "by", 'b', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOffset, "Jumps by a relative line offset from the current line." },
{ LLDB_OPT_SET_3, true, "address", 'a', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeAddressOrExpression, "Jumps to a specific address." },
{ LLDB_OPT_SET_1 | LLDB_OPT_SET_2 | LLDB_OPT_SET_3, false, "force", 'r', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Allows the PC to leave the current function." }
}
#define LLDB_OPT_SET_3
Definition: lldb-defines.h:113
#define LLDB_OPT_SET_2
Definition: lldb-defines.h:112
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 1733 of file CommandObjectThread.cpp.

Referenced by CommandObjectThreadJump::CommandOptions::GetDefinitions().

◆ g_thread_plan_list_options

constexpr OptionDefinition g_thread_plan_list_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_1, false, "verbose", 'v', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Display more information about the thread plans" },
{ LLDB_OPT_SET_1, false, "internal", 'i', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Display internal as well as user thread plans" }
}
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 1881 of file CommandObjectThread.cpp.

Referenced by CommandObjectThreadPlanList::CommandOptions::GetDefinitions().

◆ g_thread_return_options

constexpr OptionDefinition g_thread_return_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_ALL, false, "from-expression", 'x', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Return from the innermost expression evaluation." }
}
#define LLDB_OPT_SET_ALL
Definition: lldb-defines.h:110

Definition at line 1557 of file CommandObjectThread.cpp.

Referenced by CommandObjectThreadReturn::CommandOptions::GetDefinitions().

◆ g_thread_step_scope_options

constexpr OptionDefinition g_thread_step_scope_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_1, false, "step-in-avoids-no-debug", 'a', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "A boolean value that sets whether stepping into functions will step over functions with no debug information." },
{ LLDB_OPT_SET_1, false, "step-out-avoids-no-debug", 'A', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "A boolean value, if true stepping out of functions will continue to step out till it hits a function with debug information." },
{ LLDB_OPT_SET_1, false, "count", 'c', OptionParser::eRequiredArgument, nullptr, {}, 1, eArgTypeCount, "How many times to perform the stepping operation - currently only supported for step-inst and next-inst." },
{ LLDB_OPT_SET_1, false, "end-linenumber", 'e', OptionParser::eRequiredArgument, nullptr, {}, 1, eArgTypeLineNum, "The line at which to stop stepping - defaults to the next line and only supported for step-in and step-over. You can also pass the string 'block' to step to the end of the current block. This is particularly useful in conjunction with --step-target to step through a complex calling sequence." },
{ LLDB_OPT_SET_1, false, "run-mode", 'm', OptionParser::eRequiredArgument, nullptr, TriRunningModes(), 0, eArgTypeRunMode, "Determine how to run other threads while stepping the current thread." },
{ LLDB_OPT_SET_1, false, "step-over-regexp", 'r', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeRegularExpression, "A regular expression that defines function names to not to stop at when stepping in." },
{ LLDB_OPT_SET_1, false, "step-in-target", 't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFunctionName, "The name of the directly called function step in should stop at when stepping into." },
{ LLDB_OPT_SET_2, false, "python-class", 'C', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePythonClass, "The name of the class that will manage this step - only supported for Scripted Step." }
}
#define LLDB_OPT_SET_2
Definition: lldb-defines.h:112
static constexpr OptionEnumValues TriRunningModes()
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 409 of file CommandObjectThread.cpp.

Referenced by CommandObjectThreadStepWithTypeAndScope::CommandOptions::GetDefinitions().

◆ g_thread_until_options

constexpr OptionDefinition g_thread_until_options[]
static
Initial value:
= {
{ LLDB_OPT_SET_1, false, "frame", 'f', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFrameIndex, "Frame index for until operation - defaults to 0" },
{ LLDB_OPT_SET_1, false, "thread", 't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadIndex, "Thread index for the thread for until operation" },
{ LLDB_OPT_SET_1, false, "run-mode",'m', OptionParser::eRequiredArgument, nullptr, DuoRunningModes(), 0, eArgTypeRunMode, "Determine how to run other threads while stepping this one" },
{ LLDB_OPT_SET_1, false, "address", 'a', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeAddressOrExpression, "Run until we reach the specified address, or leave the function - can be specified multiple times." }
}
static constexpr OptionEnumValues DuoRunningModes()
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111

Definition at line 997 of file CommandObjectThread.cpp.

Referenced by CommandObjectThreadUntil::CommandOptions::GetDefinitions().

◆ g_tri_running_mode

constexpr OptionEnumValueElement g_tri_running_mode[]
static
Initial value:
= {
{eOnlyThisThread, "this-thread", "Run only this thread"},
{eAllThreads, "all-threads", "Run all threads"},
{eOnlyDuringStepping, "while-stepping",
"Run only this thread while stepping"} }

Definition at line 399 of file CommandObjectThread.cpp.

Referenced by TriRunningModes().