LLDB mainline
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lldb::SBDebugger Class Reference

#include <SBDebugger.h>

Public Member Functions

 FLAGS_ANONYMOUS_ENUM ()
 
 SBDebugger ()
 
 SBDebugger (const lldb::SBDebugger &rhs)
 
 ~SBDebugger ()
 
lldb::SBBroadcaster GetBroadcaster ()
 
lldb::SBDebuggeroperator= (const lldb::SBDebugger &rhs)
 
 operator bool () const
 
bool IsValid () const
 
void Clear ()
 
lldb::SBStructuredData GetSetting (const char *setting=nullptr)
 Getting a specific setting value into SBStructuredData format.
 
void SetAsync (bool b)
 
bool GetAsync ()
 
void SkipLLDBInitFiles (bool b)
 
void SkipAppInitFiles (bool b)
 
void SetInputFileHandle (FILE *f, bool transfer_ownership)
 
void SetOutputFileHandle (FILE *f, bool transfer_ownership)
 
void SetErrorFileHandle (FILE *f, bool transfer_ownership)
 
FILE * GetInputFileHandle ()
 
FILE * GetOutputFileHandle ()
 
FILE * GetErrorFileHandle ()
 
SBError SetInputString (const char *data)
 
SBError SetInputFile (SBFile file)
 
SBError SetOutputFile (SBFile file)
 
SBError SetErrorFile (SBFile file)
 
SBError SetInputFile (FileSP file)
 
SBError SetOutputFile (FileSP file)
 
SBError SetErrorFile (FileSP file)
 
SBFile GetInputFile ()
 
SBFile GetOutputFile ()
 
SBFile GetErrorFile ()
 
void SaveInputTerminalState ()
 
void RestoreInputTerminalState ()
 
lldb::SBCommandInterpreter GetCommandInterpreter ()
 
void HandleCommand (const char *command)
 
void RequestInterrupt ()
 
void CancelInterruptRequest ()
 
bool InterruptRequested ()
 
lldb::SBListener GetListener ()
 
void HandleProcessEvent (const lldb::SBProcess &process, const lldb::SBEvent &event, FileSP out, FileSP err)
 
lldb::SBTarget CreateTarget (const char *filename, const char *target_triple, const char *platform_name, bool add_dependent_modules, lldb::SBError &error)
 
lldb::SBTarget CreateTargetWithFileAndTargetTriple (const char *filename, const char *target_triple)
 
lldb::SBTarget CreateTargetWithFileAndArch (const char *filename, const char *archname)
 
lldb::SBTarget CreateTarget (const char *filename)
 
lldb::SBTarget GetDummyTarget ()
 
bool DeleteTarget (lldb::SBTarget &target)
 
lldb::SBTarget GetTargetAtIndex (uint32_t idx)
 
uint32_t GetIndexOfTarget (lldb::SBTarget target)
 
lldb::SBTarget FindTargetWithProcessID (lldb::pid_t pid)
 
lldb::SBTarget FindTargetWithFileAndArch (const char *filename, const char *arch)
 
uint32_t GetNumTargets ()
 
lldb::SBTarget GetSelectedTarget ()
 
void SetSelectedTarget (SBTarget &target)
 
lldb::SBPlatform GetSelectedPlatform ()
 
void SetSelectedPlatform (lldb::SBPlatform &platform)
 
uint32_t GetNumPlatforms ()
 Get the number of currently active platforms.
 
lldb::SBPlatform GetPlatformAtIndex (uint32_t idx)
 Get one of the currently active platforms.
 
uint32_t GetNumAvailablePlatforms ()
 Get the number of available platforms.
 
lldb::SBStructuredData GetAvailablePlatformInfoAtIndex (uint32_t idx)
 Get the name and description of one of the available platforms.
 
lldb::SBSourceManager GetSourceManager ()
 
lldb::SBError SetCurrentPlatform (const char *platform_name)
 
bool SetCurrentPlatformSDKRoot (const char *sysroot)
 
bool SetUseExternalEditor (bool input)
 
bool GetUseExternalEditor ()
 
bool SetUseColor (bool use_color)
 
bool GetUseColor () const
 
bool SetShowInlineDiagnostics (bool)
 
bool SetUseSourceCache (bool use_source_cache)
 
bool GetUseSourceCache () const
 
lldb::ScriptLanguage GetScriptingLanguage (const char *script_language_name)
 
SBStructuredData GetScriptInterpreterInfo (ScriptLanguage)
 
bool EnableLog (const char *channel, const char **categories)
 
void SetLoggingCallback (lldb::LogOutputCallback log_callback, void *baton)
 
LLDB_DEPRECATED_FIXME("Use AddDestroyCallback and RemoveDestroyCallback", "AddDestroyCallback") void SetDestroyCallback(lldb lldb::callback_token_t AddDestroyCallback (lldb::SBDebuggerDestroyCallback destroy_callback, void *baton)
 Clear all previously added callbacks and only add the given one.
 
bool RemoveDestroyCallback (lldb::callback_token_t token)
 Remove the specified callback. Return true if successful.
 
 LLDB_DEPRECATED_FIXME ("Use DispatchInput(const void *, size_t)", "DispatchInput(const void *, size_t)") void DispatchInput(void *baton
 
void DispatchInput (const void *data, size_t data_len)
 
void DispatchInputInterrupt ()
 
void DispatchInputEndOfFile ()
 
void PushInputReader (lldb::SBInputReader &reader)
 
const char * GetInstanceName ()
 
bool GetDescription (lldb::SBStream &description)
 
uint32_t GetTerminalWidth () const
 
void SetTerminalWidth (uint32_t term_width)
 
uint32_t GetTerminalHeight () const
 
void SetTerminalHeight (uint32_t term_height)
 
lldb::user_id_t GetID ()
 
const char * GetPrompt () const
 
void SetPrompt (const char *prompt)
 
const char * GetReproducerPath () const
 
lldb::ScriptLanguage GetScriptLanguage () const
 
void SetScriptLanguage (lldb::ScriptLanguage script_lang)
 
lldb::LanguageType GetREPLLanguage () const
 
void SetREPLLanguage (lldb::LanguageType repl_lang)
 
bool GetCloseInputOnEOF () const
 
void SetCloseInputOnEOF (bool b)
 
SBTypeCategory GetCategory (const char *category_name)
 
SBTypeCategory GetCategory (lldb::LanguageType lang_type)
 
SBTypeCategory CreateCategory (const char *category_name)
 
bool DeleteCategory (const char *category_name)
 
uint32_t GetNumCategories ()
 
SBTypeCategory GetCategoryAtIndex (uint32_t)
 
SBTypeCategory GetDefaultCategory ()
 
SBTypeFormat GetFormatForType (SBTypeNameSpecifier)
 
SBTypeSummary GetSummaryForType (SBTypeNameSpecifier)
 
SBTypeFilter GetFilterForType (SBTypeNameSpecifier)
 
SBTypeSynthetic GetSyntheticForType (SBTypeNameSpecifier)
 
void ResetStatistics ()
 Clear collected statistics for targets belonging to this debugger.
 
void RunCommandInterpreter (bool auto_handle_events, bool spawn_thread)
 Run the command interpreter.
 
void RunCommandInterpreter (bool auto_handle_events, bool spawn_thread, SBCommandInterpreterRunOptions &options, int &num_errors, bool &quit_requested, bool &stopped_for_crash)
 Run the command interpreter.
 
SBCommandInterpreterRunResult RunCommandInterpreter (const SBCommandInterpreterRunOptions &options)
 
SBError RunREPL (lldb::LanguageType language, const char *repl_options)
 
SBTrace LoadTraceFromFile (SBError &error, const SBFileSpec &trace_description_file)
 Load a trace from a trace description file and create Targets, Processes and Threads based on the contents of such file.
 

Static Public Member Functions

static const char * GetBroadcasterClass ()
 
static bool SupportsLanguage (lldb::LanguageType language)
 
static const char * GetProgressFromEvent (const lldb::SBEvent &event, uint64_t &progress_id, uint64_t &completed, uint64_t &total, bool &is_debugger_specific)
 Get progress data from a SBEvent whose type is eBroadcastBitProgress.
 
static lldb::SBStructuredData GetProgressDataFromEvent (const lldb::SBEvent &event)
 
static lldb::SBStructuredData GetDiagnosticFromEvent (const lldb::SBEvent &event)
 
static void Initialize ()
 
static lldb::SBError InitializeWithErrorHandling ()
 
static void PrintStackTraceOnError ()
 
static void PrintDiagnosticsOnError ()
 
static void Terminate ()
 
static lldb::SBDebugger Create ()
 
static lldb::SBDebugger Create (bool source_init_files)
 
static lldb::SBDebugger Create (bool source_init_files, lldb::LogOutputCallback log_callback, void *baton)
 
static void Destroy (lldb::SBDebugger &debugger)
 
static void MemoryPressureDetected ()
 
static bool GetDefaultArchitecture (char *arch_name, size_t arch_name_len)
 
static bool SetDefaultArchitecture (const char *arch_name)
 
static const char * GetVersionString ()
 
static const char * StateAsCString (lldb::StateType state)
 
static SBStructuredData GetBuildConfiguration ()
 
static bool StateIsRunningState (lldb::StateType state)
 
static bool StateIsStoppedState (lldb::StateType state)
 
static SBDebugger FindDebuggerWithID (int id)
 
static lldb::SBError SetInternalVariable (const char *var_name, const char *value, const char *debugger_instance_name)
 
static lldb::SBStringList GetInternalVariableValue (const char *var_name, const char *debugger_instance_name)
 

Public Attributes

LLDB_DEPRECATED_FIXME("Use HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, " "SBFile) or HandleProcessEvent(const SBProcess &, const SBEvent &, " "FileSP, FileSP)", "HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, SBFile)") void HandleProcessEvent(const lldb void HandleProcessEvent (const lldb::SBProcess &process, const lldb::SBEvent &event, SBFile out, SBFile err)
 
const void * data
 
const void size_t data_len
 

Protected Member Functions

 SBDebugger (const lldb::DebuggerSP &debugger_sp)
 

Private Member Functions

lldb::SBTarget FindTargetWithLLDBProcess (const lldb::ProcessSP &processSP)
 
void reset (const lldb::DebuggerSP &debugger_sp)
 
lldb_private::Debuggerget () const
 
lldb_private::Debuggerref () const
 
const lldb::DebuggerSPget_sp () const
 

Private Attributes

lldb::DebuggerSP m_opaque_sp
 

Friends

class lldb_private::CommandPluginInterfaceImplementation
 
class lldb_private::python::SWIGBridge
 
class SBCommandInterpreter
 
class SBInputReader
 
class SBListener
 
class SBProcess
 
class SBSourceManager
 
class SBStructuredData
 
class SBPlatform
 
class SBTarget
 
class SBTrace
 

Detailed Description

Definition at line 43 of file SBDebugger.h.

Constructor & Destructor Documentation

◆ SBDebugger() [1/3]

SBDebugger::SBDebugger ( )

Definition at line 91 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ SBDebugger() [2/3]

SBDebugger::SBDebugger ( const lldb::SBDebugger rhs)

Definition at line 98 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ ~SBDebugger()

SBDebugger::~SBDebugger ( )
default

◆ SBDebugger() [3/3]

SBDebugger::SBDebugger ( const lldb::DebuggerSP debugger_sp)
protected

Definition at line 93 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

Member Function Documentation

◆ AddDestroyCallback()

lldb::callback_token_t SBDebugger::AddDestroyCallback ( lldb::SBDebuggerDestroyCallback  destroy_callback,
void *  baton 
)

Clear all previously added callbacks and only add the given one.

Add a callback for when the debugger is destroyed. Return a token, which can be used to remove said callback. Multiple callbacks can be added by calling this function multiple times, and will be invoked in FIFO order.

Definition at line 1732 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, LLDB_INVALID_CALLBACK_TOKEN, and m_opaque_sp.

◆ CancelInterruptRequest()

void SBDebugger::CancelInterruptRequest ( )

Definition at line 1764 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ Clear()

void SBDebugger::Clear ( )

Definition at line 254 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ Create() [1/3]

SBDebugger SBDebugger::Create ( )
static

Definition at line 263 of file SBDebugger.cpp.

References Create(), and LLDB_INSTRUMENT.

Referenced by Create().

◆ Create() [2/3]

SBDebugger SBDebugger::Create ( bool  source_init_files)
static

Definition at line 269 of file SBDebugger.cpp.

References Create(), and LLDB_INSTRUMENT_VA.

◆ Create() [3/3]

SBDebugger SBDebugger::Create ( bool  source_init_files,
lldb::LogOutputCallback  log_callback,
void *  baton 
)
static

◆ CreateCategory()

SBTypeCategory SBDebugger::CreateCategory ( const char *  category_name)

◆ CreateTarget() [1/2]

SBTarget SBDebugger::CreateTarget ( const char *  filename)

◆ CreateTarget() [2/2]

lldb::SBTarget SBDebugger::CreateTarget ( const char *  filename,
const char *  target_triple,
const char *  platform_name,
bool  add_dependent_modules,
lldb::SBError error 
)

◆ CreateTargetWithFileAndArch()

SBTarget SBDebugger::CreateTargetWithFileAndArch ( const char *  filename,
const char *  archname 
)

◆ CreateTargetWithFileAndTargetTriple()

SBTarget SBDebugger::CreateTargetWithFileAndTargetTriple ( const char *  filename,
const char *  target_triple 
)

◆ DeleteCategory()

bool SBDebugger::DeleteCategory ( const char *  category_name)

◆ DeleteTarget()

bool SBDebugger::DeleteTarget ( lldb::SBTarget target)

◆ Destroy()

void SBDebugger::Destroy ( lldb::SBDebugger debugger)
static

◆ DispatchInput()

void SBDebugger::DispatchInput ( const void *  data,
size_t  data_len 
)

Definition at line 1210 of file SBDebugger.cpp.

References data, data_len, DispatchInput(), and LLDB_INSTRUMENT_VA.

Referenced by DispatchInput().

◆ DispatchInputEndOfFile()

void SBDebugger::DispatchInputEndOfFile ( )

Definition at line 1240 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ DispatchInputInterrupt()

void SBDebugger::DispatchInputInterrupt ( )

Definition at line 1233 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ EnableLog()

bool SBDebugger::EnableLog ( const char *  channel,
const char **  categories 
)

◆ FindDebuggerWithID()

SBDebugger SBDebugger::FindDebuggerWithID ( int  id)
static

◆ FindTargetWithFileAndArch()

SBTarget SBDebugger::FindTargetWithFileAndArch ( const char *  filename,
const char *  arch 
)

◆ FindTargetWithLLDBProcess()

SBTarget SBDebugger::FindTargetWithLLDBProcess ( const lldb::ProcessSP processSP)
private

Definition at line 1050 of file SBDebugger.cpp.

References m_opaque_sp, and lldb::SBTarget::SetSP().

◆ FindTargetWithProcessID()

SBTarget SBDebugger::FindTargetWithProcessID ( lldb::pid_t  pid)

Definition at line 1022 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBTarget::SetSP().

◆ FLAGS_ANONYMOUS_ENUM()

lldb::SBDebugger::FLAGS_ANONYMOUS_ENUM ( )
inline

◆ get()

Debugger * SBDebugger::get ( ) const
private

◆ get_sp()

const lldb::DebuggerSP & SBDebugger::get_sp ( ) const
private

Definition at line 1324 of file SBDebugger.cpp.

References m_opaque_sp.

Referenced by lldb::SBSourceManager::SBSourceManager().

◆ GetAsync()

bool SBDebugger::GetAsync ( )

Definition at line 346 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetAvailablePlatformInfoAtIndex()

SBStructuredData SBDebugger::GetAvailablePlatformInfoAtIndex ( uint32_t  idx)

Get the name and description of one of the available platforms.

Parameters
[in]idxZero-based index of the platform for which info should be retrieved, must be less than the value returned by GetNumAvailablePlatforms().

Definition at line 1180 of file SBDebugger.cpp.

References data, lldb_private::Platform::GetHostPlatform(), lldb_private::PluginManager::GetPlatformPluginDescriptionAtIndex(), lldb_private::PluginManager::GetPlatformPluginNameAtIndex(), and LLDB_INSTRUMENT_VA.

◆ GetBroadcaster()

SBBroadcaster SBDebugger::GetBroadcaster ( )

Definition at line 168 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetBroadcasterClass()

const char * SBDebugger::GetBroadcasterClass ( )
static

◆ GetBuildConfiguration()

SBStructuredData SBDebugger::GetBuildConfiguration ( )
static

◆ GetCategory() [1/2]

SBTypeCategory SBDebugger::GetCategory ( const char *  category_name)

◆ GetCategory() [2/2]

SBTypeCategory SBDebugger::GetCategory ( lldb::LanguageType  lang_type)

◆ GetCategoryAtIndex()

SBTypeCategory SBDebugger::GetCategoryAtIndex ( uint32_t  index)

◆ GetCloseInputOnEOF()

bool SBDebugger::GetCloseInputOnEOF ( ) const

Definition at line 1568 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ GetCommandInterpreter()

SBCommandInterpreter SBDebugger::GetCommandInterpreter ( )

Definition at line 560 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBCommandInterpreter::reset().

Referenced by Create(), and HandleCommand().

◆ GetDefaultArchitecture()

bool SBDebugger::GetDefaultArchitecture ( char *  arch_name,
size_t  arch_name_len 
)
static

◆ GetDefaultCategory()

SBTypeCategory SBDebugger::GetDefaultCategory ( )

Definition at line 1643 of file SBDebugger.cpp.

References GetCategory(), and LLDB_INSTRUMENT_VA.

Referenced by GetFormatForType().

◆ GetDescription()

bool SBDebugger::GetDescription ( lldb::SBStream description)

◆ GetDiagnosticFromEvent()

lldb::SBStructuredData SBDebugger::GetDiagnosticFromEvent ( const lldb::SBEvent event)
static

◆ GetDummyTarget()

SBTarget SBDebugger::GetDummyTarget ( )

◆ GetErrorFile()

SBFile SBDebugger::GetErrorFile ( )

Definition at line 537 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleCommand().

◆ GetErrorFileHandle()

FILE * SBDebugger::GetErrorFileHandle ( )

◆ GetFilterForType()

SBTypeFilter SBDebugger::GetFilterForType ( SBTypeNameSpecifier  type_name)

◆ GetFormatForType()

SBTypeFormat SBDebugger::GetFormatForType ( SBTypeNameSpecifier  type_name)

◆ GetID()

user_id_t SBDebugger::GetID ( )

Definition at line 1532 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, LLDB_INVALID_UID, and m_opaque_sp.

◆ GetIndexOfTarget()

uint32_t SBDebugger::GetIndexOfTarget ( lldb::SBTarget  target)

Definition at line 1009 of file SBDebugger.cpp.

References lldb::SBTarget::GetSP(), LLDB_INSTRUMENT_VA, m_opaque_sp, and UINT32_MAX.

◆ GetInputFile()

SBFile SBDebugger::GetInputFile ( )

Definition at line 501 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetInputFileHandle()

FILE * SBDebugger::GetInputFileHandle ( )

Definition at line 492 of file SBDebugger.cpp.

References lldb_private::File::GetStream(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetInstanceName()

const char * SBDebugger::GetInstanceName ( )

◆ GetInternalVariableValue()

SBStringList SBDebugger::GetInternalVariableValue ( const char *  var_name,
const char *  debugger_instance_name 
)
static

◆ GetListener()

SBListener SBDebugger::GetListener ( )

Definition at line 603 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBListener::reset().

◆ GetNumAvailablePlatforms()

uint32_t SBDebugger::GetNumAvailablePlatforms ( )

Get the number of available platforms.

The return value should match the number of entries output by the "platform list" command.

Definition at line 1166 of file SBDebugger.cpp.

References lldb_private::PluginManager::GetPlatformPluginNameAtIndex(), and LLDB_INSTRUMENT_VA.

◆ GetNumCategories()

uint32_t SBDebugger::GetNumCategories ( )

◆ GetNumPlatforms()

uint32_t SBDebugger::GetNumPlatforms ( )

Get the number of currently active platforms.

Definition at line 1145 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetNumTargets()

uint32_t SBDebugger::GetNumTargets ( )

Definition at line 1060 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetOutputFile()

SBFile SBDebugger::GetOutputFile ( )

Definition at line 518 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleCommand().

◆ GetOutputFileHandle()

FILE * SBDebugger::GetOutputFileHandle ( )

◆ GetPlatformAtIndex()

SBPlatform SBDebugger::GetPlatformAtIndex ( uint32_t  idx)

Get one of the currently active platforms.

Definition at line 1155 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBPlatform::SetSP().

◆ GetProgressDataFromEvent()

lldb::SBStructuredData SBDebugger::GetProgressDataFromEvent ( const lldb::SBEvent event)
static

◆ GetProgressFromEvent()

const char * SBDebugger::GetProgressFromEvent ( const lldb::SBEvent event,
uint64_t &  progress_id,
uint64_t &  completed,
uint64_t &  total,
bool &  is_debugger_specific 
)
static

Get progress data from a SBEvent whose type is eBroadcastBitProgress.

Parameters
[in]eventThe event to extract the progress information from.
[out]progress_idThe unique integer identifier for the progress to report.
[out]completedThe amount of work completed. If completed is zero, then this event is a progress started event. If completed is equal to total, then this event is a progress end event. Otherwise completed indicates the current progress update.
[out]totalThe total amount of work units that need to be completed. If this value is UINT64_MAX, then an indeterminate progress indicator should be displayed.
[out]is_debugger_specificSet to true if this progress is specific to this debugger only. Many progress events are not specific to a debugger instance, like any progress events for loading information in modules since LLDB has a global module cache that all debuggers use.
Returns
The message for the progress. If the returned value is NULL, then event was not a eBroadcastBitProgress event.

Definition at line 119 of file SBDebugger.cpp.

References lldb_private::ConstString::AsCString(), lldb::SBEvent::get(), lldb_private::ProgressEventData::GetCompleted(), lldb_private::ProgressEventData::GetEventDataFromEvent(), lldb_private::ProgressEventData::GetID(), lldb_private::ProgressEventData::GetMessage(), lldb_private::ProgressEventData::GetTotal(), lldb_private::ProgressEventData::IsDebuggerSpecific(), and LLDB_INSTRUMENT_VA.

◆ GetPrompt()

const char * SBDebugger::GetPrompt ( ) const

◆ GetREPLLanguage()

LanguageType SBDebugger::GetREPLLanguage ( ) const

Definition at line 1461 of file SBDebugger.cpp.

References lldb::eLanguageTypeUnknown, LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetReproducerPath()

const char * SBDebugger::GetReproducerPath ( ) const

Definition at line 1441 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ GetScriptingLanguage()

ScriptLanguage SBDebugger::GetScriptingLanguage ( const char *  script_language_name)

◆ GetScriptInterpreterInfo()

SBStructuredData SBDebugger::GetScriptInterpreterInfo ( lldb::ScriptLanguage  language)

◆ GetScriptLanguage()

ScriptLanguage SBDebugger::GetScriptLanguage ( ) const

Definition at line 1447 of file SBDebugger.cpp.

References lldb::eScriptLanguageNone, LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetSelectedPlatform()

SBPlatform SBDebugger::GetSelectedPlatform ( )

◆ GetSelectedTarget()

SBTarget SBDebugger::GetSelectedTarget ( )

◆ GetSetting()

lldb::SBStructuredData SBDebugger::GetSetting ( const char *  setting = nullptr)

Getting a specific setting value into SBStructuredData format.

Client can specify empty string or null to get all settings.

Example usages: lldb::SBStructuredData settings = debugger.GetSetting(); lldb::SBStructuredData settings = debugger.GetSetting(nullptr); lldb::SBStructuredData settings = debugger.GetSetting(""); lldb::SBStructuredData settings = debugger.GetSetting("target.arg0"); lldb::SBStructuredData settings = debugger.GetSetting("target");

Parameters
[out]settingProperty setting path to retrieve values. e.g "target.source-map"

Definition at line 470 of file SBDebugger.cpp.

References data, lldb_private::StreamString::GetString(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::StructuredData::ParseJSON().

◆ GetSourceManager()

SBSourceManager SBDebugger::GetSourceManager ( )

Definition at line 678 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ GetSummaryForType()

SBTypeSummary SBDebugger::GetSummaryForType ( SBTypeNameSpecifier  type_name)

◆ GetSyntheticForType()

SBTypeSynthetic SBDebugger::GetSyntheticForType ( SBTypeNameSpecifier  type_name)

◆ GetTargetAtIndex()

SBTarget SBDebugger::GetTargetAtIndex ( uint32_t  idx)

Definition at line 998 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBTarget::SetSP().

◆ GetTerminalHeight()

uint32_t SBDebugger::GetTerminalHeight ( ) const

Definition at line 1408 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetTerminalWidth()

uint32_t SBDebugger::GetTerminalWidth ( ) const

Definition at line 1395 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetUseColor()

bool SBDebugger::GetUseColor ( ) const

Definition at line 1493 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetUseExternalEditor()

bool SBDebugger::GetUseExternalEditor ( )

Definition at line 1481 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetUseSourceCache()

bool SBDebugger::GetUseSourceCache ( ) const

Definition at line 1511 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetVersionString()

const char * SBDebugger::GetVersionString ( )
static

Definition at line 743 of file SBDebugger.cpp.

References lldb_private::GetVersion(), and LLDB_INSTRUMENT.

◆ HandleCommand()

void SBDebugger::HandleCommand ( const char *  command)

◆ HandleProcessEvent()

void lldb::SBDebugger::HandleProcessEvent ( const lldb::SBProcess process,
const lldb::SBEvent event,
FileSP  out,
FileSP  err 
)

◆ Initialize()

void SBDebugger::Initialize ( )
static

Definition at line 174 of file SBDebugger.cpp.

References InitializeWithErrorHandling(), and LLDB_INSTRUMENT.

◆ InitializeWithErrorHandling()

lldb::SBError SBDebugger::InitializeWithErrorHandling ( )
static

◆ InterruptRequested()

bool SBDebugger::InterruptRequested ( )

Definition at line 1771 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ IsValid()

bool SBDebugger::IsValid ( ) const

Definition at line 329 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ LLDB_DEPRECATED_FIXME()

lldb::SBDebugger::LLDB_DEPRECATED_FIXME ( "Use DispatchInput(const void *, size_t)"  ,
"DispatchInput(const void *, size_t)"   
)

◆ LoadTraceFromFile()

SBTrace SBDebugger::LoadTraceFromFile ( SBError error,
const SBFileSpec trace_description_file 
)

Load a trace from a trace description file and create Targets, Processes and Threads based on the contents of such file.

Parameters
[out]errorAn error if the trace could not be created.
[in]trace_description_fileThe file containing the necessary information to load the trace.

Definition at line 1752 of file SBDebugger.cpp.

References error(), LLDB_INSTRUMENT_VA, and lldb::SBTrace::LoadTraceFromFile().

◆ MemoryPressureDetected()

void SBDebugger::MemoryPressureDetected ( )
static

◆ operator bool()

SBDebugger::operator bool ( ) const
explicit

Definition at line 333 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ operator=()

SBDebugger & SBDebugger::operator= ( const lldb::SBDebugger rhs)

Definition at line 104 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ PrintDiagnosticsOnError()

void SBDebugger::PrintDiagnosticsOnError ( )
static

Definition at line 242 of file SBDebugger.cpp.

References DumpDiagnostics(), and LLDB_INSTRUMENT.

◆ PrintStackTraceOnError()

void SBDebugger::PrintStackTraceOnError ( )
static

Definition at line 229 of file SBDebugger.cpp.

References LLDB_INSTRUMENT.

◆ PushInputReader()

void SBDebugger::PushInputReader ( lldb::SBInputReader reader)

Definition at line 1247 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ ref()

Debugger & SBDebugger::ref ( ) const
private

Definition at line 1319 of file SBDebugger.cpp.

References m_opaque_sp.

Referenced by lldb::SBPlatform::Attach(), and lldb::SBTrace::LoadTraceFromFile().

◆ RemoveDestroyCallback()

bool SBDebugger::RemoveDestroyCallback ( lldb::callback_token_t  token)

Remove the specified callback. Return true if successful.

Definition at line 1742 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ RequestInterrupt()

void SBDebugger::RequestInterrupt ( )

Definition at line 1758 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ reset()

void SBDebugger::reset ( const lldb::DebuggerSP debugger_sp)
private

◆ ResetStatistics()

void SBDebugger::ResetStatistics ( )

Clear collected statistics for targets belonging to this debugger.

This includes clearing symbol table and debug info parsing/index time for all modules, breakpoint resolve time and target statistics.

Definition at line 1683 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::DebuggerStats::ResetStatistics().

◆ RestoreInputTerminalState()

void SBDebugger::RestoreInputTerminalState ( )

Definition at line 554 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ RunCommandInterpreter() [1/3]

void SBDebugger::RunCommandInterpreter ( bool  auto_handle_events,
bool  spawn_thread 
)

Run the command interpreter.

Parameters
[in]auto_handle_eventsIf true, automatically handle resulting events. This takes precedence and overrides the corresponding option in SBCommandInterpreterRunOptions.
[in]spawn_threadIf true, start a new thread for IO handling. This takes precedence and overrides the corresponding option in SBCommandInterpreterRunOptions.

Definition at line 1251 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::CommandInterpreterRunOptions::SetAutoHandleEvents(), and lldb_private::CommandInterpreterRunOptions::SetSpawnThread().

◆ RunCommandInterpreter() [2/3]

void SBDebugger::RunCommandInterpreter ( bool  auto_handle_events,
bool  spawn_thread,
SBCommandInterpreterRunOptions options,
int &  num_errors,
bool &  quit_requested,
bool &  stopped_for_crash 
)

Run the command interpreter.

Parameters
[in]auto_handle_eventsIf true, automatically handle resulting events. This takes precedence and overrides the corresponding option in SBCommandInterpreterRunOptions.
[in]spawn_threadIf true, start a new thread for IO handling. This takes precedence and overrides the corresponding option in SBCommandInterpreterRunOptions.
[in]optionsParameter collection of type SBCommandInterpreterRunOptions.
[out]num_errorsThe number of errors.
[out]quit_requestedWhether a quit was requested.
[out]stopped_for_crashWhether the interpreter stopped for a crash.

Definition at line 1263 of file SBDebugger.cpp.

References lldb::eCommandInterpreterResultInferiorCrash, lldb::eCommandInterpreterResultQuitRequested, lldb_private::CommandInterpreterRunResult::GetNumErrors(), lldb_private::CommandInterpreterRunResult::IsResult(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBCommandInterpreterRunOptions::ref(), lldb_private::CommandInterpreter::RunCommandInterpreter(), lldb::SBCommandInterpreterRunOptions::SetAutoHandleEvents(), and lldb::SBCommandInterpreterRunOptions::SetSpawnThread().

◆ RunCommandInterpreter() [3/3]

SBCommandInterpreterRunResult SBDebugger::RunCommandInterpreter ( const SBCommandInterpreterRunOptions options)

◆ RunREPL()

SBError SBDebugger::RunREPL ( lldb::LanguageType  language,
const char *  repl_options 
)

◆ SaveInputTerminalState()

void SBDebugger::SaveInputTerminalState ( )

Definition at line 547 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetAsync()

void SBDebugger::SetAsync ( bool  b)

Definition at line 339 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetCloseInputOnEOF()

void SBDebugger::SetCloseInputOnEOF ( bool  b)

Definition at line 1574 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ SetCurrentPlatform()

SBError SBDebugger::SetCurrentPlatform ( const char *  platform_name)

◆ SetCurrentPlatformSDKRoot()

bool SBDebugger::SetCurrentPlatformSDKRoot ( const char *  sysroot)

Definition at line 1558 of file SBDebugger.cpp.

References GetSelectedPlatform(), and LLDB_INSTRUMENT_VA.

◆ SetDefaultArchitecture()

bool SBDebugger::SetDefaultArchitecture ( const char *  arch_name)
static

◆ SetErrorFile() [1/2]

SBError SBDebugger::SetErrorFile ( FileSP  file)

Definition at line 450 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and SetErrorFile().

◆ SetErrorFile() [2/2]

SBError SBDebugger::SetErrorFile ( SBFile  file)

◆ SetErrorFileHandle()

void SBDebugger::SetErrorFileHandle ( FILE *  f,
bool  transfer_ownership 
)

Definition at line 445 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and SetErrorFile().

◆ SetInputFile() [1/2]

SBError SBDebugger::SetInputFile ( FileSP  file)

Definition at line 415 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and SetInputFile().

◆ SetInputFile() [2/2]

SBError SBDebugger::SetInputFile ( SBFile  file)

◆ SetInputFileHandle()

void SBDebugger::SetInputFileHandle ( FILE *  f,
bool  transfer_ownership 
)

Definition at line 366 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetInputString()

SBError SBDebugger::SetInputString ( const char *  data)

◆ SetInternalVariable()

SBError SBDebugger::SetInternalVariable ( const char *  var_name,
const char *  value,
const char *  debugger_instance_name 
)
static

◆ SetLoggingCallback()

void SBDebugger::SetLoggingCallback ( lldb::LogOutputCallback  log_callback,
void *  baton 
)

Definition at line 1713 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetOutputFile() [1/2]

SBError SBDebugger::SetOutputFile ( FileSP  file)

Definition at line 420 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and SetOutputFile().

◆ SetOutputFile() [2/2]

SBError SBDebugger::SetOutputFile ( SBFile  file)

◆ SetOutputFileHandle()

void SBDebugger::SetOutputFileHandle ( FILE *  f,
bool  transfer_ownership 
)

Definition at line 425 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and SetOutputFile().

◆ SetPrompt()

void SBDebugger::SetPrompt ( const char *  prompt)

Definition at line 1434 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetREPLLanguage()

void SBDebugger::SetREPLLanguage ( lldb::LanguageType  repl_lang)

Definition at line 1467 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetScriptLanguage()

void SBDebugger::SetScriptLanguage ( lldb::ScriptLanguage  script_lang)

Definition at line 1453 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetSelectedPlatform()

void SBDebugger::SetSelectedPlatform ( lldb::SBPlatform platform)

◆ SetSelectedTarget()

void SBDebugger::SetSelectedTarget ( SBTarget target)

◆ SetShowInlineDiagnostics()

bool SBDebugger::SetShowInlineDiagnostics ( bool  value)

Definition at line 1499 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetTerminalHeight()

void SBDebugger::SetTerminalHeight ( uint32_t  term_height)

Definition at line 1414 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetTerminalWidth()

void SBDebugger::SetTerminalWidth ( uint32_t  term_width)

Definition at line 1401 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetUseColor()

bool SBDebugger::SetUseColor ( bool  use_color)

Definition at line 1487 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetUseExternalEditor()

bool SBDebugger::SetUseExternalEditor ( bool  input)

Definition at line 1475 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetUseSourceCache()

bool SBDebugger::SetUseSourceCache ( bool  use_source_cache)

Definition at line 1505 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SkipAppInitFiles()

void SBDebugger::SkipAppInitFiles ( bool  b)

Definition at line 359 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SkipLLDBInitFiles()

void SBDebugger::SkipLLDBInitFiles ( bool  b)

Definition at line 352 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ StateAsCString()

const char * SBDebugger::StateAsCString ( lldb::StateType  state)
static

◆ StateIsRunningState()

bool SBDebugger::StateIsRunningState ( lldb::StateType  state)
static

Definition at line 813 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and lldb_private::StateIsRunningState().

◆ StateIsStoppedState()

bool SBDebugger::StateIsStoppedState ( lldb::StateType  state)
static

Definition at line 821 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and lldb_private::StateIsStoppedState().

◆ SupportsLanguage()

bool SBDebugger::SupportsLanguage ( lldb::LanguageType  language)
static

◆ Terminate()

void SBDebugger::Terminate ( )
static

Definition at line 248 of file SBDebugger.cpp.

References g_debugger_lifetime, and LLDB_INSTRUMENT.

Friends And Related Function Documentation

◆ lldb_private::CommandPluginInterfaceImplementation

Definition at line 505 of file SBDebugger.h.

◆ lldb_private::python::SWIGBridge

friend class lldb_private::python::SWIGBridge
friend

Definition at line 506 of file SBDebugger.h.

◆ SBCommandInterpreter

friend class SBCommandInterpreter
friend

Definition at line 511 of file SBDebugger.h.

◆ SBInputReader

friend class SBInputReader
friend

Definition at line 512 of file SBDebugger.h.

◆ SBListener

friend class SBListener
friend

Definition at line 513 of file SBDebugger.h.

◆ SBPlatform

friend class SBPlatform
friend

Definition at line 517 of file SBDebugger.h.

◆ SBProcess

friend class SBProcess
friend

Definition at line 514 of file SBDebugger.h.

◆ SBSourceManager

friend class SBSourceManager
friend

Definition at line 515 of file SBDebugger.h.

◆ SBStructuredData

friend class SBStructuredData
friend

Definition at line 516 of file SBDebugger.h.

◆ SBTarget

friend class SBTarget
friend

Definition at line 518 of file SBDebugger.h.

◆ SBTrace

friend class SBTrace
friend

Definition at line 519 of file SBDebugger.h.

Member Data Documentation

◆ data

const void* lldb::SBDebugger::data

◆ data_len

const void size_t lldb::SBDebugger::data_len

Definition at line 354 of file SBDebugger.h.

Referenced by DispatchInput().

◆ HandleProcessEvent

void SBDebugger::HandleProcessEvent

Definition at line 223 of file SBDebugger.h.

Referenced by HandleCommand().

◆ m_opaque_sp

lldb::DebuggerSP lldb::SBDebugger::m_opaque_sp
private

Definition at line 531 of file SBDebugger.h.

Referenced by AddDestroyCallback(), CancelInterruptRequest(), Clear(), CreateTarget(), CreateTargetWithFileAndArch(), CreateTargetWithFileAndTargetTriple(), DeleteTarget(), Destroy(), DispatchInputEndOfFile(), DispatchInputInterrupt(), EnableLog(), FindTargetWithFileAndArch(), FindTargetWithLLDBProcess(), FindTargetWithProcessID(), get(), get_sp(), GetAsync(), GetBroadcaster(), GetCommandInterpreter(), GetDescription(), GetDummyTarget(), GetErrorFile(), GetErrorFileHandle(), GetID(), GetIndexOfTarget(), GetInputFile(), GetInputFileHandle(), GetInstanceName(), GetListener(), GetNumPlatforms(), GetNumTargets(), GetOutputFile(), GetOutputFileHandle(), GetPlatformAtIndex(), GetPrompt(), GetREPLLanguage(), GetScriptInterpreterInfo(), GetScriptLanguage(), GetSelectedPlatform(), GetSelectedTarget(), GetSetting(), GetTargetAtIndex(), GetTerminalHeight(), GetTerminalWidth(), GetUseColor(), GetUseExternalEditor(), GetUseSourceCache(), HandleCommand(), InterruptRequested(), operator=(), ref(), RemoveDestroyCallback(), RequestInterrupt(), reset(), ResetStatistics(), RestoreInputTerminalState(), RunCommandInterpreter(), RunREPL(), SaveInputTerminalState(), lldb::SBStructuredData::SBStructuredData(), SetAsync(), SetCurrentPlatform(), SetErrorFile(), SetInputFile(), SetInputFileHandle(), SetInputString(), SetLoggingCallback(), SetOutputFile(), SetPrompt(), SetREPLLanguage(), SetScriptLanguage(), SetSelectedPlatform(), SetSelectedTarget(), SetShowInlineDiagnostics(), SetTerminalHeight(), SetTerminalWidth(), SetUseColor(), SetUseExternalEditor(), SetUseSourceCache(), SkipAppInitFiles(), and SkipLLDBInitFiles().


The documentation for this class was generated from the following files: