LLDB  mainline
Macros | 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/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/Config.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/StopInfo.h"
#include "lldb/Target/TargetList.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/UnixSignals.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/FormatAdapters.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "InterpreterProperties.inc"
#include "InterpreterPropertiesEnum.inc"

Go to the source code of this file.

Macros

#define LLDB_PROPERTIES_interpreter
 
#define LLDB_PROPERTIES_interpreter
 

Enumerations

enum  
 
enum  {
  eHandleCommandFlagStopOnContinue = (1u << 0), eHandleCommandFlagStopOnError = (1u << 1), eHandleCommandFlagEchoCommand = (1u << 2), eHandleCommandFlagEchoCommentCommand = (1u << 3),
  eHandleCommandFlagPrintResult = (1u << 4), eHandleCommandFlagPrintErrors = (1u << 5), eHandleCommandFlagStopOnCrash = (1u << 6)
}
 

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)
 
static void GetHomeInitFile (llvm::SmallVectorImpl< char > &init_file, llvm::StringRef suffix={})
 
static void GetCwdInitFile (llvm::SmallVectorImpl< char > &init_file)
 
static LoadCWDlldbinitFile ShouldLoadCwdInitFile ()
 

Variables

static const char * k_white_space = " \t\v"
 
static constexpr const char * InitFileWarning
 
static const char * k_valid_command_chars
 

Macro Definition Documentation

◆ LLDB_PROPERTIES_interpreter [1/2]

#define LLDB_PROPERTIES_interpreter

Definition at line 99 of file CommandInterpreter.cpp.

◆ LLDB_PROPERTIES_interpreter [2/2]

#define LLDB_PROPERTIES_interpreter

Definition at line 99 of file CommandInterpreter.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 98 of file CommandInterpreter.cpp.

◆ anonymous enum

anonymous enum
Enumerator
eHandleCommandFlagStopOnContinue 
eHandleCommandFlagStopOnError 
eHandleCommandFlagEchoCommand 
eHandleCommandFlagEchoCommentCommand 
eHandleCommandFlagPrintResult 
eHandleCommandFlagPrintErrors 
eHandleCommandFlagStopOnCrash 

Definition at line 2370 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

◆ GetCwdInitFile()

static void GetCwdInitFile ( llvm::SmallVectorImpl< char > &  init_file)
static

◆ GetHomeInitFile()

static void GetHomeInitFile ( llvm::SmallVectorImpl< char > &  init_file,
llvm::StringRef  suffix = {} 
)
static

◆ ShouldLoadCwdInitFile()

static LoadCWDlldbinitFile ShouldLoadCwdInitFile ( )
static

◆ StripLeadingSpaces()

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

Definition at line 1324 of file CommandInterpreter.cpp.

References k_white_space.

Referenced by ExtractCommand().

Variable Documentation

◆ InitFileWarning

constexpr const char* InitFileWarning
static
Initial value:
=
"There is a .lldbinit file in the current directory which is not being "
"read.\n"
"To silence this warning without sourcing in the local .lldbinit,\n"
"add the following to the lldbinit file in your home directory:\n"
" settings set target.load-cwd-lldbinit false\n"
"To allow lldb to source .lldbinit files in the current working "
"directory,\n"
"set the value of this variable to true. Only do so if you understand "
"and\n"
"accept the security risk."

Definition at line 83 of file CommandInterpreter.cpp.

Referenced by lldb_private::CommandInterpreter::SourceInitFileCwd().

◆ k_valid_command_chars

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

Definition at line 1322 of file CommandInterpreter.cpp.

Referenced by ExtractCommand().

◆ k_white_space

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