LLDB  mainline
Enumerations | Functions | Variables
CommandInterpreter.cpp File Reference
#include <memory>
#include <stdlib.h>
#include <string>
#include <vector>
#include "CommandObjectScript.h"
#include "lldb/Interpreter/CommandObjectRegexCommand.h"
#include "Commands/CommandObjectApropos.h"
#include "Commands/CommandObjectBreakpoint.h"
#include "Commands/CommandObjectBugreport.h"
#include "Commands/CommandObjectCommands.h"
#include "Commands/CommandObjectDisassemble.h"
#include "Commands/CommandObjectExpression.h"
#include "Commands/CommandObjectFrame.h"
#include "Commands/CommandObjectGUI.h"
#include "Commands/CommandObjectHelp.h"
#include "Commands/CommandObjectLanguage.h"
#include "Commands/CommandObjectLog.h"
#include "Commands/CommandObjectMemory.h"
#include "Commands/CommandObjectPlatform.h"
#include "Commands/CommandObjectPlugin.h"
#include "Commands/CommandObjectProcess.h"
#include "Commands/CommandObjectQuit.h"
#include "Commands/CommandObjectRegister.h"
#include "Commands/CommandObjectReproducer.h"
#include "Commands/CommandObjectSettings.h"
#include "Commands/CommandObjectSource.h"
#include "Commands/CommandObjectStats.h"
#include "Commands/CommandObjectTarget.h"
#include "Commands/CommandObjectThread.h"
#include "Commands/CommandObjectType.h"
#include "Commands/CommandObjectVersion.h"
#include "Commands/CommandObjectWatchpoint.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/State.h"
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/Timer.h"
#include "lldb/Host/Editline.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Interpreter/CommandCompletions.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "lldb/Interpreter/Options.h"
#include "lldb/Interpreter/Property.h"
#include "lldb/Utility/Args.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/TargetList.h"
#include "lldb/Target/Thread.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/PrettyStackTrace.h"

Go to the source code of this file.

Enumerations

enum  {
  ePropertyExpandRegexAliases = 0, ePropertyPromptOnQuit = 1, ePropertyStopCmdSourceOnError = 2, eSpaceReplPrompts = 3,
  eEchoCommands = 4, eEchoCommentCommands = 5
}
 
enum  {
  eHandleCommandFlagStopOnContinue = (1u << 0), eHandleCommandFlagStopOnError = (1u << 1), eHandleCommandFlagEchoCommand = (1u << 2), eHandleCommandFlagEchoCommentCommand = (1u << 3),
  eHandleCommandFlagPrintResult = (1u << 4), eHandleCommandFlagStopOnCrash = (1u << 5)
}
 

Functions

static void StripLeadingSpaces (std::string &s)
 
static size_t FindArgumentTerminator (const std::string &s)
 
static bool ExtractCommand (std::string &command_string, std::string &command, std::string &suffix, char &quote_char)
 

Variables

static const char * k_white_space = " \t\v"
 
static constexpr bool NoGlobalSetting = true
 
static constexpr uintptr_t DefaultValueTrue = true
 
static constexpr uintptr_t DefaultValueFalse = false
 
static constexpr const char * NoCStrDefault = nullptr
 
static constexpr PropertyDefinition g_properties []
 
static const char * k_valid_command_chars
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ePropertyExpandRegexAliases 
ePropertyPromptOnQuit 
ePropertyStopCmdSourceOnError 
eSpaceReplPrompts 
eEchoCommands 
eEchoCommentCommands 

Definition at line 110 of file CommandInterpreter.cpp.

◆ anonymous enum

anonymous enum
Enumerator
eHandleCommandFlagStopOnContinue 
eHandleCommandFlagStopOnError 
eHandleCommandFlagEchoCommand 
eHandleCommandFlagEchoCommentCommand 
eHandleCommandFlagPrintResult 
eHandleCommandFlagStopOnCrash 

Definition at line 2361 of file CommandInterpreter.cpp.

Function Documentation

◆ ExtractCommand()

static bool ExtractCommand ( std::string &  command_string,
std::string &  command,
std::string &  suffix,
char &  quote_char 
)
static

◆ FindArgumentTerminator()

static size_t FindArgumentTerminator ( const std::string &  s)
static

◆ StripLeadingSpaces()

static void StripLeadingSpaces ( std::string &  s)
static

Definition at line 1299 of file CommandInterpreter.cpp.

References k_white_space.

Referenced by ExtractCommand().

Variable Documentation

◆ DefaultValueFalse

constexpr uintptr_t DefaultValueFalse = false
static

Definition at line 82 of file CommandInterpreter.cpp.

◆ DefaultValueTrue

constexpr uintptr_t DefaultValueTrue = true
static

Definition at line 81 of file CommandInterpreter.cpp.

◆ g_properties

constexpr PropertyDefinition g_properties[]
static
Initial value:
= {
{"expand-regex-aliases", OptionValue::eTypeBoolean, NoGlobalSetting,
"If true, regular expression alias commands will show the "
"expanded command that will be executed. This can be used to "
"debug new regular expression alias commands."},
{"prompt-on-quit", OptionValue::eTypeBoolean, NoGlobalSetting,
"If true, LLDB will prompt you before quitting if there are any live "
"processes being debugged. If false, LLDB will quit without asking in any "
"case."},
{"stop-command-source-on-error", OptionValue::eTypeBoolean, NoGlobalSetting,
"If true, LLDB will stop running a 'command source' "
"script upon encountering an error."},
{"space-repl-prompts", OptionValue::eTypeBoolean, NoGlobalSetting,
"If true, blank lines will be printed between between REPL submissions."},
{"echo-commands", OptionValue::eTypeBoolean, NoGlobalSetting,
"If true, commands will be echoed before they are evaluated."},
{"echo-comment-commands", OptionValue::eTypeBoolean, NoGlobalSetting,
"If true, commands will be echoed even if they are pure comment lines."}}
static constexpr uintptr_t DefaultValueFalse
static constexpr uintptr_t DefaultValueTrue
static constexpr const char * NoCStrDefault
static constexpr bool NoGlobalSetting

Definition at line 85 of file CommandInterpreter.cpp.

Referenced by lldb_private::CommandInterpreter::CommandInterpreter(), lldb_private::CommandInterpreter::GetEchoCommands(), lldb_private::CommandInterpreter::GetEchoCommentCommands(), lldb_private::CommandInterpreter::GetExpandRegexAliases(), lldb_private::CommandInterpreter::GetPromptOnQuit(), lldb_private::CommandInterpreter::GetSpaceReplPrompts(), and lldb_private::CommandInterpreter::GetStopCmdSourceOnError().

◆ k_valid_command_chars

const char* k_valid_command_chars
static
Initial value:
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"

Definition at line 1297 of file CommandInterpreter.cpp.

Referenced by ExtractCommand().

◆ k_white_space

const char* k_white_space = " \t\v"
static

◆ NoCStrDefault

constexpr const char* NoCStrDefault = nullptr
static

Definition at line 83 of file CommandInterpreter.cpp.

◆ NoGlobalSetting

constexpr bool NoGlobalSetting = true
static

Definition at line 80 of file CommandInterpreter.cpp.