LLDB mainline
lldb::SBDebugger Class Reference

#include <SBDebugger.h>

Public Member Functions

 FLAGS_ANONYMOUS_ENUM ()
 Broadcast bit definitions for the SBDebugger.
 SBDebugger ()
 Default constructor creates an invalid SBDebugger instance.
 SBDebugger (const lldb::SBDebugger &rhs)
 ~SBDebugger ()
lldb::SBBroadcaster GetBroadcaster ()
 Get the broadcaster that allows subscribing to events from this debugger.
lldb::SBDebuggeroperator= (const lldb::SBDebugger &rhs)
 Assignment operator.
 operator bool () const
 Check if this is a valid SBDebugger object.
bool IsValid () const
 Check if this is a valid SBDebugger object.
void Clear ()
 Clear this debugger instance.
lldb::SBStructuredData GetSetting (const char *setting=nullptr)
 Get debugger settings as structured data.
void SetAsync (bool b)
 Set whether the debugger should run in asynchronous mode.
bool GetAsync ()
 Get whether the debugger is running in asynchronous mode.
void SkipLLDBInitFiles (bool b)
 Set whether to skip loading .lldbinit files.
void SkipAppInitFiles (bool b)
 Set whether to skip loading application-specific .lldbinit files.
void SetInputFileHandle (FILE *f, bool transfer_ownership)
 Set the input file handle for the debugger.
void SetOutputFileHandle (FILE *f, bool transfer_ownership)
 Set the output file handle for the debugger.
void SetErrorFileHandle (FILE *f, bool transfer_ownership)
 Set the error file handle for the debugger.
FILE * GetInputFileHandle ()
 Get the input file handle for the debugger.
FILE * GetOutputFileHandle ()
 Get the output file handle for the debugger.
FILE * GetErrorFileHandle ()
 Get the error file handle for the debugger.
SBError SetInputString (const char *data)
 Set the input from a string.
SBError SetInputFile (SBFile file)
 Set the input file for the debugger.
SBError SetOutputFile (SBFile file)
 Set the output file for the debugger.
SBError SetErrorFile (SBFile file)
 Set the error file for the debugger.
SBError SetInputFile (FileSP file)
 Set the input file for the debugger using a FileSP.
SBError SetOutputFile (FileSP file)
 Set the output file for the debugger using a FileSP.
SBError SetErrorFile (FileSP file)
 Set the error file for the debugger using a FileSP.
SBFile GetInputFile ()
 Get the input file for the debugger.
SBFile GetOutputFile ()
 Get the output file for the debugger.
SBFile GetErrorFile ()
 Get the error file for the debugger.
void SaveInputTerminalState ()
 Save the current terminal state.
void RestoreInputTerminalState ()
 Restore the previously saved terminal state.
lldb::SBCommandInterpreter GetCommandInterpreter ()
 Get the command interpreter for this debugger.
void HandleCommand (const char *command)
 Execute a command in the command interpreter.
void RequestInterrupt ()
 Request an interrupt of the current operation.
void CancelInterruptRequest ()
 Cancel a previously requested interrupt.
bool InterruptRequested ()
 Check if an interrupt has been requested.
lldb::SBListener GetListener ()
 Get the listener associated with this debugger.
void HandleProcessEvent (const lldb::SBProcess &process, const lldb::SBEvent &event, FileSP out, FileSP err)
 Handle a process event using FileSP objects.
lldb::SBTarget CreateTarget (const char *filename, const char *target_triple, const char *platform_name, bool add_dependent_modules, lldb::SBError &error)
 Create a target with the specified parameters.
lldb::SBTarget CreateTargetWithFileAndTargetTriple (const char *filename, const char *target_triple)
 Create a target with the specified file and target triple.
lldb::SBTarget CreateTargetWithFileAndArch (const char *filename, const char *archname)
 Create a target with the specified file and architecture.
lldb::SBTarget CreateTarget (const char *filename)
 Create a target with the specified file.
lldb::SBTarget GetDummyTarget ()
 Get the dummy target.
void DispatchClientTelemetry (const lldb::SBStructuredData &data)
 Dispatch telemetry data from client to server.
bool DeleteTarget (lldb::SBTarget &target)
 Delete a target from the debugger.
lldb::SBTarget GetTargetAtIndex (uint32_t idx)
 Get a target by index.
uint32_t GetIndexOfTarget (lldb::SBTarget target)
 Get the index of a target.
lldb::SBTarget FindTargetWithProcessID (lldb::pid_t pid)
 Find a target with the specified process ID.
lldb::SBTarget FindTargetWithFileAndArch (const char *filename, const char *arch)
 Find a target with the specified file and architecture.
lldb::SBTarget FindTargetByGloballyUniqueID (lldb::user_id_t id)
 Find a target with the specified unique ID.
uint32_t GetNumTargets ()
 Get the number of targets in the debugger.
lldb::SBTarget GetSelectedTarget ()
 Get the currently selected target.
void SetSelectedTarget (SBTarget &target)
 Set the selected target.
lldb::SBPlatform GetSelectedPlatform ()
 Get the selected platform.
void SetSelectedPlatform (lldb::SBPlatform &platform)
 Set the selected 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 information about the available platform at the given index as structured data.
lldb::SBSourceManager GetSourceManager ()
 Get the source manager for this debugger.
lldb::SBError SetCurrentPlatform (const char *platform_name)
 Set the current platform by name.
bool SetCurrentPlatformSDKRoot (const char *sysroot)
 Set the SDK root for the current platform.
bool SetUseExternalEditor (bool input)
 Set whether to use an external editor.
bool GetUseExternalEditor ()
 Get whether an external editor is being used.
bool SetUseColor (bool use_color)
 Set whether to use color in output.
bool GetUseColor () const
 Get whether color is being used in output.
bool SetShowInlineDiagnostics (bool b)
 Set whether to show inline diagnostics.
bool SetUseSourceCache (bool use_source_cache)
 Set whether to use the source cache.
bool GetUseSourceCache () const
 Get whether the source cache is being used.
lldb::ScriptLanguage GetScriptingLanguage (const char *script_language_name)
 Get the scripting language by name.
SBStructuredData GetScriptInterpreterInfo (ScriptLanguage language)
 Get information about a script interpreter as structured data.
bool EnableLog (const char *channel, const char **categories)
 Enable logging for a specific channel and category.
void SetLoggingCallback (lldb::LogOutputCallback log_callback, void *baton)
 Set a callback for log output.
LLDB_DEPRECATED_FIXME("Use AddDestroyCallback and RemoveDestroyCallback", "AddDestroyCallback") void SetDestroyCallback(lldb lldb::callback_token_t AddDestroyCallback (lldb::SBDebuggerDestroyCallback destroy_callback, void *baton)
 Set a callback for when the debugger is destroyed (deprecated).
bool RemoveDestroyCallback (lldb::callback_token_t token)
 Remove a destroy callback.
 LLDB_DEPRECATED_FIXME ("Use DispatchInput(const void *, size_t)", "DispatchInput(const void *, size_t)") void DispatchInput(void *baton
 Dispatch input to the debugger (deprecated).
void DispatchInput (const void *data, size_t data_len)
 Dispatch input to the debugger.
void DispatchInputInterrupt ()
 Interrupt the current input dispatch.
void DispatchInputEndOfFile ()
 Signal end-of-file to the current input dispatch.
void PushInputReader (lldb::SBInputReader &reader)
 Push an input reader onto the IO handler stack.
const char * GetInstanceName ()
 Get the instance name of this debugger.
bool GetDescription (lldb::SBStream &description)
 Get a description of this debugger.
uint32_t GetTerminalWidth () const
 Get the terminal width.
void SetTerminalWidth (uint32_t term_width)
 Set the terminal width.
uint32_t GetTerminalHeight () const
 Get the terminal height.
void SetTerminalHeight (uint32_t term_height)
 Set the terminal height.
lldb::user_id_t GetID ()
 Get the unique ID of this debugger.
const char * GetPrompt () const
 Get the command prompt string.
void SetPrompt (const char *prompt)
 Set the command prompt string.
const char * GetReproducerPath () const
 Get the path to the reproducer.
lldb::ScriptLanguage GetScriptLanguage () const
 Get the current scripting language.
void SetScriptLanguage (lldb::ScriptLanguage script_lang)
 Set the current scripting language.
lldb::LanguageType GetREPLLanguage () const
 Get the current REPL language.
void SetREPLLanguage (lldb::LanguageType repl_lang)
 Set the current REPL language.
bool GetCloseInputOnEOF () const
 Get whether to close input on EOF (deprecated).
void SetCloseInputOnEOF (bool b)
 Set whether to close input on EOF (deprecated).
SBTypeCategory GetCategory (const char *category_name)
 Get a type category by name.
SBTypeCategory GetCategory (lldb::LanguageType lang_type)
 Get a type category by language.
SBTypeCategory CreateCategory (const char *category_name)
 Create a new type category.
bool DeleteCategory (const char *category_name)
 Delete a type category.
uint32_t GetNumCategories ()
 Get the number of type categories.
SBTypeCategory GetCategoryAtIndex (uint32_t index)
 Get a type category by index.
SBTypeCategory GetDefaultCategory ()
 Get the default type category.
SBTypeFormat GetFormatForType (SBTypeNameSpecifier type_name_spec)
 Get the format for a type.
SBTypeSummary GetSummaryForType (SBTypeNameSpecifier type_name_spec)
 Get the summary for a type.
SBTypeFilter GetFilterForType (SBTypeNameSpecifier type_name_spec)
 Get the filter for a type.
SBTypeSynthetic GetSyntheticForType (SBTypeNameSpecifier type_name_spec)
 Get the synthetic for a type.
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 with options.
SBCommandInterpreterRunResult RunCommandInterpreter (const SBCommandInterpreterRunOptions &options)
 Run the command interpreter with options and return a result object.
SBError RunREPL (lldb::LanguageType language, const char *repl_options)
 Run a REPL (Read-Eval-Print Loop) for the specified language.
SBTrace LoadTraceFromFile (SBError &error, const SBFileSpec &trace_description_file)
 Load a trace from a trace description file.

Static Public Member Functions

static const char * GetBroadcasterClass ()
 Get the broadcaster class name.
static bool SupportsLanguage (lldb::LanguageType language)
 Check if a specific language is supported by LLDB.
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)
 Get progress data from an event.
static lldb::SBStructuredData GetDiagnosticFromEvent (const lldb::SBEvent &event)
 Get diagnostic information from an event.
static void Initialize ()
 Initialize LLDB and its subsystems.
static lldb::SBError InitializeWithErrorHandling ()
 Initialize the LLDB debugger subsystem with error handling.
static void PrintStackTraceOnError ()
 Configure LLDB to print a stack trace when it crashes.
static void PrintDiagnosticsOnError ()
 Configure LLDB to print diagnostic information when it crashes.
static void Terminate ()
 Terminate LLDB and its subsystems.
static lldb::SBDebugger Create ()
 Create a new debugger instance (deprecated).
static lldb::SBDebugger Create (bool source_init_files)
 Create a new debugger instance.
static lldb::SBDebugger Create (bool source_init_files, lldb::LogOutputCallback log_callback, void *baton)
 Create a new debugger instance with a custom log handler and user data passed to the log callback.
static void Destroy (lldb::SBDebugger &debugger)
 Destroy a debugger instance.
static void MemoryPressureDetected ()
 Notify the debugger that system memory pressure has been detected.
static bool GetDefaultArchitecture (char *arch_name, size_t arch_name_len)
 Get the default architecture.
static bool SetDefaultArchitecture (const char *arch_name)
 Set the default architecture.
static const char * GetVersionString ()
 Get the LLDB version string.
static const char * StateAsCString (lldb::StateType state)
 Convert a state type to a string.
static SBStructuredData GetBuildConfiguration ()
 Get the build configuration as structured data.
static bool StateIsRunningState (lldb::StateType state)
 Check if a state is a running state.
static bool StateIsStoppedState (lldb::StateType state)
 Check if a state is a stopped state.
static SBDebugger FindDebuggerWithID (int id)
 Find a debugger by ID. Returns an invalid debugger if not found.
static lldb::SBError SetInternalVariable (const char *var_name, const char *value, const char *debugger_instance_name)
 Set an internal variable.
static lldb::SBStringList GetInternalVariableValue (const char *var_name, const char *debugger_instance_name)
 Get the value of an internal variable.

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 voi HandleProcessEvent )(const lldb::SBProcess &process, const lldb::SBEvent &event, SBFile out, SBFile err)
 Handle a process event (deprecated).
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 lldb_private::SystemInitializerFull
class SBCommandInterpreter
class SBInputReader
class SBListener
class SBProcess
class SBSourceManager
class SBStructuredData
class SBPlatform
class SBTarget
class SBTrace
class SBProgress

Detailed Description

Definition at line 45 of file SBDebugger.h.

Constructor & Destructor Documentation

◆ SBDebugger() [1/3]

SBDebugger::SBDebugger ( )

Default constructor creates an invalid SBDebugger instance.

Definition at line 91 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

Referenced by Create(), Create(), Create(), Destroy(), FindDebuggerWithID(), lldb_private::SystemInitializerFull, operator=(), SBDebugger(), and ~SBDebugger().

◆ SBDebugger() [2/3]

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

Definition at line 98 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBDebugger().

◆ ~SBDebugger()

◆ SBDebugger() [3/3]

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

Definition at line 93 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Member Function Documentation

◆ AddDestroyCallback()

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

Set a callback for when the debugger is destroyed (deprecated).

Add a callback for when the debugger is destroyed. Returns a token that can be used to remove the callback.

Definition at line 1707 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, LLDB_INVALID_CALLBACK_TOKEN, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ CancelInterruptRequest()

void SBDebugger::CancelInterruptRequest ( )

Cancel a previously requested interrupt.

Definition at line 1739 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ Clear()

void SBDebugger::Clear ( )

Clear this debugger instance.

This will close all IO handlers and reset the debugger to its initial state.

Definition at line 215 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ Create() [1/3]

SBDebugger SBDebugger::Create ( )
static

Create a new debugger instance (deprecated).

Definition at line 224 of file SBDebugger.cpp.

References Create(), LLDB_INSTRUMENT, and SBDebugger().

Referenced by Create(), Create(), and ~SBDebugger().

◆ Create() [2/3]

SBDebugger SBDebugger::Create ( bool source_init_files)
static

Create a new debugger instance.

If source_init_files is true, the debugger will source .lldbinit files from the home directory and current directory.

Definition at line 230 of file SBDebugger.cpp.

References Create(), LLDB_INSTRUMENT_VA, and SBDebugger().

◆ Create() [3/3]

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

Create a new debugger instance with a custom log handler and user data passed to the log callback.

If source_init_files is true, the debugger will source .lldbinit files from the home directory and current directory.

Definition at line 236 of file SBDebugger.cpp.

References lldb_private::Debugger::CreateInstance(), lldb::SBCommandInterpreter::get(), GetCommandInterpreter(), LLDB_INSTRUMENT_VA, reset(), SBCommandInterpreter, SBDebugger(), lldb_private::CommandInterpreter::SkipAppInitFiles(), lldb_private::CommandInterpreter::SkipLLDBInitFiles(), lldb::SBCommandInterpreter::SourceInitFileInGlobalDirectory(), and lldb::SBCommandInterpreter::SourceInitFileInHomeDirectory().

◆ CreateCategory()

SBTypeCategory SBDebugger::CreateCategory ( const char * category_name)

Create a new type category.

Definition at line 1580 of file SBDebugger.cpp.

References lldb_private::DataVisualization::Categories::GetCategory(), LLDB_INSTRUMENT_VA, and lldb::SBTypeCategory.

◆ 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)

Delete a type category.

Definition at line 1596 of file SBDebugger.cpp.

References lldb_private::DataVisualization::Categories::Delete(), and LLDB_INSTRUMENT_VA.

◆ DeleteTarget()

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

◆ Destroy()

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

Destroy a debugger instance.

Definition at line 268 of file SBDebugger.cpp.

References lldb_private::Debugger::Destroy(), LLDB_INSTRUMENT_VA, m_opaque_sp, and SBDebugger().

Referenced by ~SBDebugger().

◆ DispatchClientTelemetry()

void SBDebugger::DispatchClientTelemetry ( const lldb::SBStructuredData & data)

Dispatch telemetry data from client to server.

This is used to send telemetry data from the client to the server if client-telemetry is enabled. If not enabled, the data is ignored.

Definition at line 929 of file SBDebugger.cpp.

References lldb_private::API, lldb_private::GetLog(), LLDB_INSTRUMENT_VA, LLDB_LOGF, lldb::SBStructuredData::m_impl_up, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ DispatchInput()

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

Dispatch input to the debugger.

Definition at line 1185 of file SBDebugger.cpp.

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

Referenced by DispatchInput().

◆ DispatchInputEndOfFile()

void SBDebugger::DispatchInputEndOfFile ( )

Signal end-of-file to the current input dispatch.

Definition at line 1215 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ DispatchInputInterrupt()

void SBDebugger::DispatchInputInterrupt ( )

Interrupt the current input dispatch.

Definition at line 1208 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ EnableLog()

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

Enable logging for a specific channel and category.

Definition at line 1673 of file SBDebugger.cpp.

References lldb_private::eLogHandlerStream, error(), GetCategoryArray(), LLDB_INSTRUMENT_VA, LLDB_LOG_OPTION_PREPEND_THREAD_NAME, LLDB_LOG_OPTION_PREPEND_TIMESTAMP, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ FindDebuggerWithID()

SBDebugger SBDebugger::FindDebuggerWithID ( int id)
static

Find a debugger by ID. Returns an invalid debugger if not found.

Definition at line 1301 of file SBDebugger.cpp.

References lldb_private::Debugger::FindDebuggerWithID(), LLDB_INSTRUMENT_VA, reset(), and SBDebugger().

◆ FindTargetByGloballyUniqueID()

SBTarget SBDebugger::FindTargetByGloballyUniqueID ( lldb::user_id_t id)

Find a target with the specified unique ID.

Definition at line 986 of file SBDebugger.cpp.

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

Referenced by HandleProcessEvent().

◆ FindTargetWithFileAndArch()

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

Find a target with the specified file and architecture.

Definition at line 1008 of file SBDebugger.cpp.

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

Referenced by HandleProcessEvent().

◆ FindTargetWithLLDBProcess()

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

Definition at line 1025 of file SBDebugger.cpp.

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

Referenced by SBProgress.

◆ FindTargetWithProcessID()

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

Find a target with the specified process ID.

Definition at line 997 of file SBDebugger.cpp.

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

Referenced by HandleProcessEvent().

◆ FLAGS_ANONYMOUS_ENUM()

lldb::SBDebugger::FLAGS_ANONYMOUS_ENUM ( )
inline

◆ get()

◆ get_sp()

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

Definition at line 1299 of file SBDebugger.cpp.

References m_opaque_sp.

Referenced by SBProgress, and lldb::SBSourceManager::SBSourceManager().

◆ GetAsync()

bool SBDebugger::GetAsync ( )

Get whether the debugger is running in asynchronous mode.

Definition at line 307 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ GetAvailablePlatformInfoAtIndex()

SBStructuredData SBDebugger::GetAvailablePlatformInfoAtIndex ( uint32_t idx)

◆ GetBroadcaster()

SBBroadcaster SBDebugger::GetBroadcaster ( )

Get the broadcaster that allows subscribing to events from this debugger.

Definition at line 168 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ GetBroadcasterClass()

const char * SBDebugger::GetBroadcasterClass ( )
static

Get the broadcaster class name.

Definition at line 113 of file SBDebugger.cpp.

References lldb_private::ConstString::AsCString(), lldb_private::Debugger::GetStaticBroadcasterClass(), and LLDB_INSTRUMENT.

Referenced by ~SBDebugger().

◆ GetBuildConfiguration()

SBStructuredData SBDebugger::GetBuildConfiguration ( )
static

Get the build configuration as structured data.

Definition at line 728 of file SBDebugger.cpp.

References AddBoolConfigEntry(), AddLLVMTargets(), data, LLDB_INSTRUMENT, SBStructuredData, and lldb_private::XMLDocument::XMLEnabled().

Referenced by HandleProcessEvent().

◆ GetCategory() [1/2]

SBTypeCategory SBDebugger::GetCategory ( const char * category_name)

Get a type category by name.

Definition at line 1553 of file SBDebugger.cpp.

References lldb_private::DataVisualization::Categories::GetCategory(), LLDB_INSTRUMENT_VA, and lldb::SBTypeCategory.

Referenced by GetDefaultCategory().

◆ GetCategory() [2/2]

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

Get a type category by language.

Definition at line 1569 of file SBDebugger.cpp.

References lldb_private::DataVisualization::Categories::GetCategory(), LLDB_INSTRUMENT_VA, and lldb::SBTypeCategory.

◆ GetCategoryAtIndex()

SBTypeCategory SBDebugger::GetCategoryAtIndex ( uint32_t index)

Get a type category by index.

Definition at line 1611 of file SBDebugger.cpp.

References lldb_private::DataVisualization::Categories::GetCategoryAtIndex(), LLDB_INSTRUMENT_VA, and lldb::SBTypeCategory.

◆ GetCloseInputOnEOF()

bool SBDebugger::GetCloseInputOnEOF ( ) const

Get whether to close input on EOF (deprecated).

Definition at line 1543 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ GetCommandInterpreter()

SBCommandInterpreter SBDebugger::GetCommandInterpreter ( )

Get the command interpreter for this debugger.

Definition at line 513 of file SBDebugger.cpp.

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

Referenced by Create(), HandleCommand(), and ~SBDebugger().

◆ GetDefaultArchitecture()

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

◆ GetDefaultCategory()

SBTypeCategory SBDebugger::GetDefaultCategory ( )

Get the default type category.

Definition at line 1618 of file SBDebugger.cpp.

References GetCategory(), and LLDB_INSTRUMENT_VA.

Referenced by GetFormatForType().

◆ GetDescription()

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

Get a description of this debugger.

Definition at line 1492 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb::SBStream::ref().

◆ GetDiagnosticFromEvent()

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

Get diagnostic information from an event.

Definition at line 154 of file SBDebugger.cpp.

References data, lldb::SBEvent::get(), lldb_private::DiagnosticEventData::GetAsStructuredData(), LLDB_INSTRUMENT_VA, and SBStructuredData.

Referenced by ~SBDebugger().

◆ GetDummyTarget()

SBTarget SBDebugger::GetDummyTarget ( )

Get the dummy target.

The dummy target is used when no target is available.

Definition at line 915 of file SBDebugger.cpp.

References lldb_private::API, lldb_private::GetLog(), lldb::SBTarget::GetSP(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, SBTarget, and lldb::SBTarget::SetSP().

Referenced by HandleProcessEvent().

◆ GetErrorFile()

SBFile SBDebugger::GetErrorFile ( )

Get the error file for the debugger.

Definition at line 492 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBFile.

Referenced by HandleCommand(), and ~SBDebugger().

◆ GetErrorFileHandle()

FILE * SBDebugger::GetErrorFileHandle ( )

Get the error file handle for the debugger.

Definition at line 484 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ GetFilterForType()

◆ GetFormatForType()

SBTypeFormat SBDebugger::GetFormatForType ( SBTypeNameSpecifier type_name_spec)

◆ GetID()

user_id_t SBDebugger::GetID ( )

Get the unique ID of this debugger.

Definition at line 1507 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, LLDB_INVALID_UID, and m_opaque_sp.

◆ GetIndexOfTarget()

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

Get the index of a target.

Definition at line 973 of file SBDebugger.cpp.

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

Referenced by HandleProcessEvent().

◆ GetInputFile()

SBFile SBDebugger::GetInputFile ( )

Get the input file for the debugger.

Definition at line 462 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBFile.

Referenced by ~SBDebugger().

◆ GetInputFileHandle()

FILE * SBDebugger::GetInputFileHandle ( )

Get the input file handle for the debugger.

Definition at line 453 of file SBDebugger.cpp.

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

Referenced by ~SBDebugger().

◆ GetInstanceName()

const char * SBDebugger::GetInstanceName ( )

Get the instance name of this debugger.

Definition at line 1312 of file SBDebugger.cpp.

References lldb_private::ConstString::AsCString(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetInternalVariableValue()

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

◆ GetListener()

SBListener SBDebugger::GetListener ( )

Get the listener associated with this debugger.

Definition at line 556 of file SBDebugger.cpp.

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

Referenced by ~SBDebugger().

◆ 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 1141 of file SBDebugger.cpp.

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

Referenced by HandleProcessEvent().

◆ GetNumCategories()

uint32_t SBDebugger::GetNumCategories ( )

Get the number of type categories.

Definition at line 1605 of file SBDebugger.cpp.

References lldb_private::DataVisualization::Categories::GetCount(), and LLDB_INSTRUMENT_VA.

◆ GetNumPlatforms()

uint32_t SBDebugger::GetNumPlatforms ( )

Get the number of currently active platforms.

Definition at line 1120 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ GetNumTargets()

uint32_t SBDebugger::GetNumTargets ( )

Get the number of targets in the debugger.

Definition at line 1035 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ GetOutputFile()

SBFile SBDebugger::GetOutputFile ( )

Get the output file for the debugger.

Definition at line 477 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBFile.

Referenced by HandleCommand(), and ~SBDebugger().

◆ GetOutputFileHandle()

FILE * SBDebugger::GetOutputFileHandle ( )

Get the output file handle for the debugger.

Definition at line 470 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ GetPlatformAtIndex()

SBPlatform SBDebugger::GetPlatformAtIndex ( uint32_t idx)

Get one of the currently active platforms.

Definition at line 1130 of file SBDebugger.cpp.

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

Referenced by HandleProcessEvent().

◆ GetProgressDataFromEvent()

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

Get progress data from an event.

Definition at line 139 of file SBDebugger.cpp.

References data, lldb::SBEvent::get(), lldb_private::ProgressEventData::GetAsStructuredData(), LLDB_INSTRUMENT_VA, and SBStructuredData.

Referenced by ~SBDebugger().

◆ 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.

Referenced by ~SBDebugger().

◆ GetPrompt()

const char * SBDebugger::GetPrompt ( ) const

Get the command prompt string.

Definition at line 1396 of file SBDebugger.cpp.

References lldb_private::API, lldb_private::ConstString::GetCString(), lldb_private::GetLog(), LLDB_INSTRUMENT_VA, LLDB_LOG, and m_opaque_sp.

◆ GetREPLLanguage()

LanguageType SBDebugger::GetREPLLanguage ( ) const

Get the current REPL language.

Definition at line 1436 of file SBDebugger.cpp.

References lldb::eLanguageTypeUnknown, LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetReproducerPath()

const char * SBDebugger::GetReproducerPath ( ) const

Get the path to the reproducer.

Definition at line 1416 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ GetScriptingLanguage()

ScriptLanguage SBDebugger::GetScriptingLanguage ( const char * script_language_name)

Get the scripting language by name.

Definition at line 673 of file SBDebugger.cpp.

References lldb::eScriptLanguageDefault, LLDB_INSTRUMENT_VA, and lldb_private::OptionArgParser::ToScriptLanguage().

Referenced by HandleProcessEvent().

◆ GetScriptInterpreterInfo()

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

Get information about a script interpreter as structured data.

Definition at line 683 of file SBDebugger.cpp.

References data, lldb_private::ScriptInterpreter::GetInterpreterInfo(), LLDB_INSTRUMENT_VA, m_opaque_sp, and SBStructuredData.

Referenced by HandleProcessEvent().

◆ GetScriptLanguage()

ScriptLanguage SBDebugger::GetScriptLanguage ( ) const

Get the current scripting language.

Definition at line 1422 of file SBDebugger.cpp.

References lldb::eScriptLanguageNone, LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetSelectedPlatform()

◆ GetSelectedTarget()

◆ GetSetting()

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

Get debugger settings as structured data.

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");

Definition at line 431 of file SBDebugger.cpp.

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

Referenced by ~SBDebugger().

◆ GetSourceManager()

SBSourceManager SBDebugger::GetSourceManager ( )

Get the source manager for this debugger.

Definition at line 631 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and SBSourceManager.

Referenced by HandleProcessEvent().

◆ GetSummaryForType()

◆ GetSyntheticForType()

◆ GetTargetAtIndex()

SBTarget SBDebugger::GetTargetAtIndex ( uint32_t idx)

Get a target by index.

Definition at line 962 of file SBDebugger.cpp.

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

Referenced by HandleProcessEvent().

◆ GetTerminalHeight()

uint32_t SBDebugger::GetTerminalHeight ( ) const

Get the terminal height.

Definition at line 1383 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetTerminalWidth()

uint32_t SBDebugger::GetTerminalWidth ( ) const

Get the terminal width.

Definition at line 1370 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetUseColor()

bool SBDebugger::GetUseColor ( ) const

Get whether color is being used in output.

Definition at line 1468 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ GetUseExternalEditor()

bool SBDebugger::GetUseExternalEditor ( )

Get whether an external editor is being used.

Definition at line 1456 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ GetUseSourceCache()

bool SBDebugger::GetUseSourceCache ( ) const

Get whether the source cache is being used.

Definition at line 1486 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ GetVersionString()

const char * SBDebugger::GetVersionString ( )
static

Get the LLDB version string.

Definition at line 696 of file SBDebugger.cpp.

References lldb_private::GetVersion(), and LLDB_INSTRUMENT.

Referenced by HandleProcessEvent().

◆ HandleCommand()

◆ HandleProcessEvent()

◆ Initialize()

void SBDebugger::Initialize ( )
static

Initialize LLDB and its subsystems.

This function should be called before any other LLDB functions. It initializes all required subsystems for proper LLDB functionality.

Definition at line 174 of file SBDebugger.cpp.

References InitializeWithErrorHandling(), and LLDB_INSTRUMENT.

Referenced by ~SBDebugger().

◆ InitializeWithErrorHandling()

lldb::SBError SBDebugger::InitializeWithErrorHandling ( )
static

Initialize the LLDB debugger subsystem with error handling.

Similar to Initialize(), but returns an error if initialization fails.

Definition at line 179 of file SBDebugger.cpp.

References error(), lldb_private::Status::FromError(), g_debugger_lifetime, and LLDB_INSTRUMENT.

Referenced by Initialize(), and ~SBDebugger().

◆ InterruptRequested()

bool SBDebugger::InterruptRequested ( )

Check if an interrupt has been requested.

Definition at line 1746 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ IsValid()

bool SBDebugger::IsValid ( ) const

Check if this is a valid SBDebugger object.

Definition at line 290 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

Referenced by ~SBDebugger().

◆ LLDB_DEPRECATED_FIXME()

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

Dispatch input to the debugger (deprecated).

◆ LoadTraceFromFile()

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

Load a trace from a trace description file.

This will create Targets, Processes and Threads based on the contents of the 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.
Returns
An SBTrace object representing the loaded trace.

Definition at line 1727 of file SBDebugger.cpp.

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

◆ MemoryPressureDetected()

void SBDebugger::MemoryPressureDetected ( )
static

Notify the debugger that system memory pressure has been detected.

This can be used to free up memory resources by clearing caches.

Definition at line 277 of file SBDebugger.cpp.

References LLDB_INSTRUMENT, and lldb_private::ModuleList::RemoveOrphanSharedModules().

Referenced by ~SBDebugger().

◆ operator bool()

SBDebugger::operator bool ( ) const
explicit

Check if this is a valid SBDebugger object.

Definition at line 294 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ operator=()

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

Assignment operator.

Definition at line 104 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBDebugger().

Referenced by ~SBDebugger().

◆ PrintDiagnosticsOnError()

void SBDebugger::PrintDiagnosticsOnError ( )
static

Configure LLDB to print diagnostic information when it crashes.

Definition at line 203 of file SBDebugger.cpp.

References DumpDiagnostics(), and LLDB_INSTRUMENT.

Referenced by ~SBDebugger().

◆ PrintStackTraceOnError()

void SBDebugger::PrintStackTraceOnError ( )
static

Configure LLDB to print a stack trace when it crashes.

Definition at line 190 of file SBDebugger.cpp.

References LLDB_INSTRUMENT.

Referenced by ~SBDebugger().

◆ PushInputReader()

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

Push an input reader onto the IO handler stack.

Definition at line 1222 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and SBInputReader.

◆ ref()

Debugger & SBDebugger::ref ( ) const
private

Definition at line 1294 of file SBDebugger.cpp.

References m_opaque_sp.

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

◆ RemoveDestroyCallback()

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

Remove a destroy callback.

Definition at line 1717 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ RequestInterrupt()

void SBDebugger::RequestInterrupt ( )

Request an interrupt of the current operation.

Definition at line 1733 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ 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 1658 of file SBDebugger.cpp.

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

◆ RestoreInputTerminalState()

void SBDebugger::RestoreInputTerminalState ( )

Restore the previously saved terminal state.

Definition at line 507 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ 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 1226 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 with options.

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 1238 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)

Run the command interpreter with options and return a result object.

Definition at line 1262 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBCommandInterpreterRunOptions::ref(), lldb_private::CommandInterpreter::RunCommandInterpreter(), and lldb::SBCommandInterpreterRunResult.

◆ RunREPL()

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

Run a REPL (Read-Eval-Print Loop) for the specified language.

Definition at line 1276 of file SBDebugger.cpp.

References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SaveInputTerminalState()

void SBDebugger::SaveInputTerminalState ( )

Save the current terminal state.

This should be called before modifying terminal settings.

Definition at line 500 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ SetAsync()

void SBDebugger::SetAsync ( bool b)

Set whether the debugger should run in asynchronous mode.

When in asynchronous mode, events are processed on a background thread.

Definition at line 300 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ SetCloseInputOnEOF()

void SBDebugger::SetCloseInputOnEOF ( bool b)

Set whether to close input on EOF (deprecated).

Definition at line 1549 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA.

◆ SetCurrentPlatform()

SBError SBDebugger::SetCurrentPlatform ( const char * platform_name)

◆ SetCurrentPlatformSDKRoot()

bool SBDebugger::SetCurrentPlatformSDKRoot ( const char * sysroot)

Set the SDK root for the current platform.

Definition at line 1533 of file SBDebugger.cpp.

References GetSelectedPlatform(), LLDB_INSTRUMENT_VA, and SBPlatform.

Referenced by HandleProcessEvent().

◆ SetDefaultArchitecture()

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

Set the default architecture.

Definition at line 659 of file SBDebugger.cpp.

References lldb_private::ArchSpec::IsValid(), LLDB_INSTRUMENT_VA, and lldb_private::Target::SetDefaultArchitecture().

Referenced by HandleProcessEvent().

◆ SetErrorFile() [1/2]

SBError SBDebugger::SetErrorFile ( FileSP file)

Set the error file for the debugger using a FileSP.

Definition at line 411 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, lldb::SBFile, and SetErrorFile().

◆ SetErrorFile() [2/2]

SBError SBDebugger::SetErrorFile ( SBFile file)

Set the error file for the debugger.

Definition at line 416 of file SBDebugger.cpp.

References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBFile::m_opaque_sp.

Referenced by SetErrorFile(), SetErrorFileHandle(), and ~SBDebugger().

◆ SetErrorFileHandle()

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

Set the error file handle for the debugger.

Definition at line 406 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and SetErrorFile().

Referenced by ~SBDebugger().

◆ SetInputFile() [1/2]

SBError SBDebugger::SetInputFile ( FileSP file)

Set the input file for the debugger using a FileSP.

Definition at line 376 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, lldb::SBFile, and SetInputFile().

◆ SetInputFile() [2/2]

SBError SBDebugger::SetInputFile ( SBFile file)

Set the input file for the debugger.

Definition at line 360 of file SBDebugger.cpp.

References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBFile::m_opaque_sp.

Referenced by SetInputFile(), and ~SBDebugger().

◆ SetInputFileHandle()

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

Set the input file handle for the debugger.

Definition at line 327 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ SetInputString()

SBError SBDebugger::SetInputString ( const char * data)

Set the input from a string.

Definition at line 334 of file SBDebugger.cpp.

References data, lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBError::SetError().

Referenced by ~SBDebugger().

◆ 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 )

Set a callback for log output.

Definition at line 1688 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ SetOutputFile() [1/2]

SBError SBDebugger::SetOutputFile ( FileSP file)

Set the output file for the debugger using a FileSP.

Definition at line 381 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, lldb::SBFile, and SetOutputFile().

◆ SetOutputFile() [2/2]

SBError SBDebugger::SetOutputFile ( SBFile file)

Set the output file for the debugger.

Definition at line 391 of file SBDebugger.cpp.

References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb::SBFile::m_opaque_sp.

Referenced by SetOutputFile(), SetOutputFileHandle(), and ~SBDebugger().

◆ SetOutputFileHandle()

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

Set the output file handle for the debugger.

Definition at line 386 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and SetOutputFile().

Referenced by ~SBDebugger().

◆ SetPrompt()

void SBDebugger::SetPrompt ( const char * prompt)

Set the command prompt string.

Definition at line 1409 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetREPLLanguage()

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

Set the current REPL language.

Definition at line 1442 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetScriptLanguage()

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

Set the current scripting language.

Definition at line 1428 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetSelectedPlatform()

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

◆ SetSelectedTarget()

◆ SetShowInlineDiagnostics()

bool SBDebugger::SetShowInlineDiagnostics ( bool b)

Set whether to show inline diagnostics.

Definition at line 1474 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ SetTerminalHeight()

void SBDebugger::SetTerminalHeight ( uint32_t term_height)

Set the terminal height.

Definition at line 1389 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetTerminalWidth()

void SBDebugger::SetTerminalWidth ( uint32_t term_width)

Set the terminal width.

Definition at line 1376 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SetUseColor()

bool SBDebugger::SetUseColor ( bool use_color)

Set whether to use color in output.

Definition at line 1462 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ SetUseExternalEditor()

bool SBDebugger::SetUseExternalEditor ( bool input)

Set whether to use an external editor.

Definition at line 1450 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ SetUseSourceCache()

bool SBDebugger::SetUseSourceCache ( bool use_source_cache)

Set whether to use the source cache.

Definition at line 1480 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by HandleProcessEvent().

◆ SkipAppInitFiles()

void SBDebugger::SkipAppInitFiles ( bool b)

Set whether to skip loading application-specific .lldbinit files.

Definition at line 320 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ SkipLLDBInitFiles()

void SBDebugger::SkipLLDBInitFiles ( bool b)

Set whether to skip loading .lldbinit files.

Definition at line 313 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBDebugger().

◆ StateAsCString()

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

Convert a state type to a string.

Definition at line 702 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and lldb_private::StateAsCString().

Referenced by lldb::SBProcess::AppendEventStateReport(), HandleProcessEvent(), and lldb::SBProcess::ReportEventState().

◆ StateIsRunningState()

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

Check if a state is a running state.

Definition at line 766 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and lldb_private::StateIsRunningState().

Referenced by HandleProcessEvent().

◆ StateIsStoppedState()

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

Check if a state is a stopped state.

Definition at line 774 of file SBDebugger.cpp.

References LLDB_INSTRUMENT_VA, and lldb_private::StateIsStoppedState().

Referenced by HandleProcessEvent().

◆ SupportsLanguage()

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

Check if a specific language is supported by LLDB.

Definition at line 1754 of file SBDebugger.cpp.

References lldb_private::TypeSystem::SupportsLanguageStatic().

Referenced by ~SBDebugger().

◆ Terminate()

void SBDebugger::Terminate ( )
static

Terminate LLDB and its subsystems.

This should be called when LLDB is no longer needed.

Definition at line 209 of file SBDebugger.cpp.

References g_debugger_lifetime, and LLDB_INSTRUMENT.

Referenced by ~SBDebugger().

◆ lldb_private::CommandPluginInterfaceImplementation

Definition at line 669 of file SBDebugger.h.

◆ lldb_private::python::SWIGBridge

friend class lldb_private::python::SWIGBridge
friend

Definition at line 670 of file SBDebugger.h.

◆ lldb_private::SystemInitializerFull

Definition at line 671 of file SBDebugger.h.

References SBDebugger().

◆ SBCommandInterpreter

friend class SBCommandInterpreter
friend

Definition at line 676 of file SBDebugger.h.

References SBCommandInterpreter.

Referenced by Create(), GetCommandInterpreter(), HandleCommand(), and SBCommandInterpreter.

◆ SBInputReader

friend class SBInputReader
friend

Definition at line 677 of file SBDebugger.h.

References SBInputReader.

Referenced by PushInputReader(), and SBInputReader.

◆ SBListener

friend class SBListener
friend

Definition at line 678 of file SBDebugger.h.

References SBListener.

Referenced by GetListener(), and SBListener.

◆ SBPlatform

friend class SBPlatform
friend

◆ SBProcess

friend class SBProcess
friend

Definition at line 679 of file SBDebugger.h.

References SBProcess.

Referenced by HandleCommand(), SBProcess, and ~SBDebugger().

◆ SBProgress

friend class SBProgress
friend

Definition at line 685 of file SBDebugger.h.

References FindTargetWithLLDBProcess(), get(), get_sp(), ref(), reset(), and SBProgress.

Referenced by SBProgress.

◆ SBSourceManager

friend class SBSourceManager
friend

Definition at line 680 of file SBDebugger.h.

References SBSourceManager.

Referenced by GetSourceManager(), and SBSourceManager.

◆ SBStructuredData

◆ SBTarget

◆ SBTrace

friend class SBTrace
friend

Definition at line 684 of file SBDebugger.h.

References SBTrace.

Referenced by SBTrace.

Member Data Documentation

◆ data

◆ data_len

const void size_t lldb::SBDebugger::data_len

Definition at line 478 of file SBDebugger.h.

Referenced by DispatchInput().

◆ HandleProcessEvent

void SBDebugger::HandleProcessEvent

Handle a process event (deprecated).

Handle a process event.

Definition at line 304 of file SBDebugger.h.

Referenced by HandleCommand(), and ~SBDebugger().

◆ m_opaque_sp

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

Definition at line 697 of file SBDebugger.h.

Referenced by AddDestroyCallback(), CancelInterruptRequest(), Clear(), CreateTarget(), CreateTarget(), CreateTargetWithFileAndArch(), CreateTargetWithFileAndTargetTriple(), DeleteTarget(), Destroy(), DispatchClientTelemetry(), DispatchInputEndOfFile(), DispatchInputInterrupt(), EnableLog(), FindTargetByGloballyUniqueID(), 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 bool(), operator=(), ref(), RemoveDestroyCallback(), RequestInterrupt(), reset(), ResetStatistics(), RestoreInputTerminalState(), RunCommandInterpreter(), RunCommandInterpreter(), RunCommandInterpreter(), RunREPL(), SaveInputTerminalState(), SBDebugger(), SBDebugger(), 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: