LLDB mainline
|
#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::SBDebugger & | operator= (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. | |
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::Debugger * | get () const |
lldb_private::Debugger & | ref () const |
const lldb::DebuggerSP & | get_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 |
Definition at line 45 of file SBDebugger.h.
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::SBDebugger | ( | const lldb::SBDebugger & | rhs | ) |
Definition at line 98 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBDebugger().
|
default |
References CancelInterruptRequest(), Clear(), Create(), data, Destroy(), GetAsync(), GetBroadcaster(), GetBroadcasterClass(), GetCommandInterpreter(), GetDiagnosticFromEvent(), GetErrorFile(), GetErrorFileHandle(), GetInputFile(), GetInputFileHandle(), GetListener(), GetOutputFile(), GetOutputFileHandle(), GetProgressDataFromEvent(), GetProgressFromEvent(), GetSetting(), HandleCommand(), HandleProcessEvent, Initialize(), InitializeWithErrorHandling(), InterruptRequested(), IsValid(), MemoryPressureDetected(), operator=(), PrintDiagnosticsOnError(), PrintStackTraceOnError(), RequestInterrupt(), RestoreInputTerminalState(), SaveInputTerminalState(), SBDebugger(), SBProcess, SBStructuredData, SetAsync(), SetErrorFile(), SetErrorFileHandle(), SetInputFile(), SetInputFileHandle(), SetInputString(), SetOutputFile(), SetOutputFileHandle(), SkipAppInitFiles(), SkipLLDBInitFiles(), SupportsLanguage(), and Terminate().
|
protected |
Definition at line 93 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
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 1696 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, LLDB_INVALID_CALLBACK_TOKEN, and m_opaque_sp.
Referenced by HandleProcessEvent().
void SBDebugger::CancelInterruptRequest | ( | ) |
Cancel a previously requested interrupt.
Definition at line 1728 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by ~SBDebugger().
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().
|
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().
|
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().
|
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().
SBTypeCategory SBDebugger::CreateCategory | ( | const char * | category_name | ) |
Create a new type category.
Definition at line 1569 of file SBDebugger.cpp.
References lldb_private::DataVisualization::Categories::GetCategory(), LLDB_INSTRUMENT_VA, and lldb::SBTypeCategory.
SBTarget SBDebugger::CreateTarget | ( | const char * | filename | ) |
Create a target with the specified file.
Definition at line 891 of file SBDebugger.cpp.
References lldb_private::API, lldb_private::eLoadDependentsNo, lldb_private::eLoadDependentsYes, error(), lldb_private::GetLog(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, SBTarget, and lldb::SBTarget::SetSP().
lldb::SBTarget SBDebugger::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.
Definition at line 782 of file SBDebugger.cpp.
References lldb_private::API, lldb::SBError::Clear(), lldb_private::eLoadDependentsNo, lldb_private::eLoadDependentsYes, lldb_private::Status::FromErrorString(), lldb::SBError::GetCString(), lldb_private::GetLog(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, lldb::SBError::ref(), SBTarget, lldb_private::OptionGroupPlatform::SetPlatformName(), lldb::SBTarget::SetSP(), and lldb::SBError::Success().
Referenced by HandleProcessEvent().
SBTarget SBDebugger::CreateTargetWithFileAndArch | ( | const char * | filename, |
const char * | archname ) |
Create a target with the specified file and architecture.
Definition at line 846 of file SBDebugger.cpp.
References lldb_private::API, lldb_private::eLoadDependentsYes, error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::Platform::GetAugmentedArchSpec(), lldb_private::GetLog(), lldb_private::ArchSpec::IsValid(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, SBTarget, and lldb::SBTarget::SetSP().
Referenced by HandleProcessEvent().
SBTarget SBDebugger::CreateTargetWithFileAndTargetTriple | ( | const char * | filename, |
const char * | target_triple ) |
Create a target with the specified file and target triple.
Definition at line 821 of file SBDebugger.cpp.
References lldb_private::API, lldb_private::eLoadDependentsNo, lldb_private::eLoadDependentsYes, error(), lldb_private::GetLog(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, SBTarget, and lldb::SBTarget::SetSP().
Referenced by HandleProcessEvent().
bool SBDebugger::DeleteCategory | ( | const char * | category_name | ) |
Delete a type category.
Definition at line 1585 of file SBDebugger.cpp.
References lldb_private::DataVisualization::Categories::Delete(), and LLDB_INSTRUMENT_VA.
bool SBDebugger::DeleteTarget | ( | lldb::SBTarget & | target | ) |
Delete a target from the debugger.
Definition at line 940 of file SBDebugger.cpp.
References lldb_private::API, lldb::SBTarget::Clear(), lldb_private::GetLog(), lldb::SBTarget::GetSP(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, and lldb::SBTarget::m_opaque_sp.
Referenced by HandleProcessEvent().
|
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().
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().
void SBDebugger::DispatchInput | ( | const void * | data, |
size_t | data_len ) |
Dispatch input to the debugger.
Definition at line 1174 of file SBDebugger.cpp.
References data, data_len, DispatchInput(), and LLDB_INSTRUMENT_VA.
Referenced by DispatchInput().
void SBDebugger::DispatchInputEndOfFile | ( | ) |
Signal end-of-file to the current input dispatch.
Definition at line 1204 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
void SBDebugger::DispatchInputInterrupt | ( | ) |
Interrupt the current input dispatch.
Definition at line 1197 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
bool SBDebugger::EnableLog | ( | const char * | channel, |
const char ** | categories ) |
Enable logging for a specific channel and category.
Definition at line 1662 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().
|
static |
Find a debugger by ID. Returns an invalid debugger if not found.
Definition at line 1290 of file SBDebugger.cpp.
References lldb_private::Debugger::FindDebuggerWithID(), LLDB_INSTRUMENT_VA, reset(), and SBDebugger().
SBTarget SBDebugger::FindTargetWithFileAndArch | ( | const char * | filename, |
const char * | arch ) |
Find a target with the specified file and architecture.
Definition at line 997 of file SBDebugger.cpp.
References lldb_private::Platform::GetAugmentedArchSpec(), LLDB_INSTRUMENT_VA, m_opaque_sp, SBTarget, and lldb::SBTarget::SetSP().
Referenced by HandleProcessEvent().
|
private |
Definition at line 1014 of file SBDebugger.cpp.
References m_opaque_sp, SBTarget, and lldb::SBTarget::SetSP().
Referenced by SBProgress.
SBTarget SBDebugger::FindTargetWithProcessID | ( | lldb::pid_t | pid | ) |
Find a target with the specified process ID.
Definition at line 986 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, SBTarget, and lldb::SBTarget::SetSP().
Referenced by HandleProcessEvent().
|
inline |
Broadcast bit definitions for the SBDebugger.
Definition at line 48 of file SBDebugger.h.
References lldb::eBroadcastBitError, lldb::eBroadcastBitExternalProgress, lldb::eBroadcastBitExternalProgressCategory, lldb::eBroadcastBitProgress, lldb::eBroadcastBitProgressCategory, and lldb::eBroadcastBitWarning.
|
private |
Definition at line 1281 of file SBDebugger.cpp.
References m_opaque_sp.
Referenced by SBProgress, lldb::SBProgress::SBProgress(), lldb::SBProgress::SBProgress(), lldb::SBListener::StartListeningForEventClass(), and lldb::SBListener::StopListeningForEventClass().
|
private |
Definition at line 1288 of file SBDebugger.cpp.
References m_opaque_sp.
Referenced by SBProgress, and lldb::SBSourceManager::SBSourceManager().
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().
SBStructuredData SBDebugger::GetAvailablePlatformInfoAtIndex | ( | uint32_t | idx | ) |
Get information about the available platform at the given index as structured data.
Definition at line 1144 of file SBDebugger.cpp.
References data, lldb_private::Platform::GetHostPlatform(), lldb_private::PluginManager::GetPlatformPluginDescriptionAtIndex(), lldb_private::PluginManager::GetPlatformPluginNameAtIndex(), LLDB_INSTRUMENT_VA, and SBStructuredData.
Referenced by HandleProcessEvent().
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().
|
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().
|
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().
SBTypeCategory SBDebugger::GetCategory | ( | const char * | category_name | ) |
Get a type category by name.
Definition at line 1542 of file SBDebugger.cpp.
References lldb_private::DataVisualization::Categories::GetCategory(), LLDB_INSTRUMENT_VA, and lldb::SBTypeCategory.
Referenced by GetDefaultCategory().
SBTypeCategory SBDebugger::GetCategory | ( | lldb::LanguageType | lang_type | ) |
Get a type category by language.
Definition at line 1558 of file SBDebugger.cpp.
References lldb_private::DataVisualization::Categories::GetCategory(), LLDB_INSTRUMENT_VA, and lldb::SBTypeCategory.
SBTypeCategory SBDebugger::GetCategoryAtIndex | ( | uint32_t | index | ) |
Get a type category by index.
Definition at line 1600 of file SBDebugger.cpp.
References lldb_private::DataVisualization::Categories::GetCategoryAtIndex(), LLDB_INSTRUMENT_VA, and lldb::SBTypeCategory.
bool SBDebugger::GetCloseInputOnEOF | ( | ) | const |
Get whether to close input on EOF (deprecated).
Definition at line 1532 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA.
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().
|
static |
Get the default architecture.
Definition at line 638 of file SBDebugger.cpp.
References lldb_private::ArchSpec::GetArchitectureName(), lldb_private::Target::GetDefaultArchitecture(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsValid(), and LLDB_INSTRUMENT_VA.
Referenced by HandleProcessEvent().
SBTypeCategory SBDebugger::GetDefaultCategory | ( | ) |
Get the default type category.
Definition at line 1607 of file SBDebugger.cpp.
References GetCategory(), and LLDB_INSTRUMENT_VA.
Referenced by GetFormatForType().
bool SBDebugger::GetDescription | ( | lldb::SBStream & | description | ) |
Get a description of this debugger.
Definition at line 1481 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb::SBStream::ref().
|
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().
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().
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().
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().
SBTypeFilter SBDebugger::GetFilterForType | ( | SBTypeNameSpecifier | type_name_spec | ) |
Get the filter for a type.
Definition at line 1630 of file SBDebugger.cpp.
References lldb_private::DataVisualization::GetFilterForType(), lldb::SBTypeNameSpecifier::GetSP(), lldb::SBTypeNameSpecifier::IsValid(), LLDB_INSTRUMENT_VA, and lldb::SBTypeFilter.
SBTypeFormat SBDebugger::GetFormatForType | ( | SBTypeNameSpecifier | type_name_spec | ) |
Get the format for a type.
Definition at line 1613 of file SBDebugger.cpp.
References GetDefaultCategory(), lldb::SBTypeCategory::GetEnabled(), lldb::SBTypeCategory::GetFormatForType(), LLDB_INSTRUMENT_VA, and lldb::SBTypeFormat.
user_id_t SBDebugger::GetID | ( | ) |
Get the unique ID of this debugger.
Definition at line 1496 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, LLDB_INVALID_UID, and m_opaque_sp.
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().
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().
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().
const char * SBDebugger::GetInstanceName | ( | ) |
Get the instance name of this debugger.
Definition at line 1301 of file SBDebugger.cpp.
References lldb_private::ConstString::AsCString(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
|
static |
Get the value of an internal variable.
Definition at line 1333 of file SBDebugger.cpp.
References lldb_private::OptionValue::eDumpOptionValue, error(), lldb_private::Debugger::FindDebuggerWithInstanceName(), lldb_private::StreamString::GetString(), LLDB_INSTRUMENT_VA, lldb::SBStringList, and lldb_private::StringList::SplitIntoLines().
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().
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 1130 of file SBDebugger.cpp.
References lldb_private::PluginManager::GetPlatformPluginNameAtIndex(), and LLDB_INSTRUMENT_VA.
Referenced by HandleProcessEvent().
uint32_t SBDebugger::GetNumCategories | ( | ) |
Get the number of type categories.
Definition at line 1594 of file SBDebugger.cpp.
References lldb_private::DataVisualization::Categories::GetCount(), and LLDB_INSTRUMENT_VA.
uint32_t SBDebugger::GetNumPlatforms | ( | ) |
Get the number of currently active platforms.
Definition at line 1109 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
uint32_t SBDebugger::GetNumTargets | ( | ) |
Get the number of targets in the debugger.
Definition at line 1024 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
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().
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().
SBPlatform SBDebugger::GetPlatformAtIndex | ( | uint32_t | idx | ) |
Get one of the currently active platforms.
Definition at line 1119 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, SBPlatform, and lldb::SBPlatform::SetSP().
Referenced by HandleProcessEvent().
|
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().
|
static |
Get progress data from a SBEvent whose type is eBroadcastBitProgress.
[in] | event | The event to extract the progress information from. |
[out] | progress_id | The unique integer identifier for the progress to report. |
[out] | completed | The 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] | total | The 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_specific | Set 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. |
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().
const char * SBDebugger::GetPrompt | ( | ) | const |
Get the command prompt string.
Definition at line 1385 of file SBDebugger.cpp.
References lldb_private::API, lldb_private::ConstString::GetCString(), lldb_private::GetLog(), LLDB_INSTRUMENT_VA, LLDB_LOG, and m_opaque_sp.
LanguageType SBDebugger::GetREPLLanguage | ( | ) | const |
Get the current REPL language.
Definition at line 1425 of file SBDebugger.cpp.
References lldb::eLanguageTypeUnknown, LLDB_INSTRUMENT_VA, and m_opaque_sp.
const char * SBDebugger::GetReproducerPath | ( | ) | const |
Get the path to the reproducer.
Definition at line 1405 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA.
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().
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().
ScriptLanguage SBDebugger::GetScriptLanguage | ( | ) | const |
Get the current scripting language.
Definition at line 1411 of file SBDebugger.cpp.
References lldb::eScriptLanguageNone, LLDB_INSTRUMENT_VA, and m_opaque_sp.
SBPlatform SBDebugger::GetSelectedPlatform | ( | ) |
Get the selected platform.
Definition at line 1076 of file SBDebugger.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb::SBPlatform::GetName(), lldb::SBPlatform::GetSP(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, SBPlatform, and lldb::SBPlatform::SetSP().
Referenced by HandleProcessEvent(), and SetCurrentPlatformSDKRoot().
SBTarget SBDebugger::GetSelectedTarget | ( | ) |
Get the currently selected target.
Definition at line 1034 of file SBDebugger.cpp.
References lldb_private::API, lldb::eDescriptionLevelBrief, lldb::SBStream::GetData(), lldb::SBTarget::GetDescription(), lldb_private::GetLog(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, SBTarget, and lldb::SBTarget::SetSP().
Referenced by HandleProcessEvent().
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().
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().
SBTypeSummary SBDebugger::GetSummaryForType | ( | SBTypeNameSpecifier | type_name_spec | ) |
Get the summary for a type.
Definition at line 1622 of file SBDebugger.cpp.
References lldb::SBTypeNameSpecifier::GetSP(), lldb_private::DataVisualization::GetSummaryForType(), lldb::SBTypeNameSpecifier::IsValid(), LLDB_INSTRUMENT_VA, and lldb::SBTypeSummary.
SBTypeSynthetic SBDebugger::GetSyntheticForType | ( | SBTypeNameSpecifier | type_name_spec | ) |
Get the synthetic for a type.
Definition at line 1638 of file SBDebugger.cpp.
References lldb::SBTypeNameSpecifier::GetSP(), lldb_private::DataVisualization::GetSyntheticForType(), lldb::SBTypeNameSpecifier::IsValid(), LLDB_INSTRUMENT_VA, and lldb::SBTypeSynthetic.
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().
uint32_t SBDebugger::GetTerminalHeight | ( | ) | const |
Get the terminal height.
Definition at line 1372 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
uint32_t SBDebugger::GetTerminalWidth | ( | ) | const |
Get the terminal width.
Definition at line 1359 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
bool SBDebugger::GetUseColor | ( | ) | const |
Get whether color is being used in output.
Definition at line 1457 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
bool SBDebugger::GetUseExternalEditor | ( | ) |
Get whether an external editor is being used.
Definition at line 1445 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
bool SBDebugger::GetUseSourceCache | ( | ) | const |
Get whether the source cache is being used.
Definition at line 1475 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
|
static |
Get the LLDB version string.
Definition at line 696 of file SBDebugger.cpp.
References lldb_private::GetVersion(), and LLDB_INSTRUMENT.
Referenced by HandleProcessEvent().
void SBDebugger::HandleCommand | ( | const char * | command | ) |
Execute a command in the command interpreter.
Definition at line 523 of file SBDebugger.cpp.
References GetCommandInterpreter(), GetErrorFile(), GetOutputFile(), lldb::SBProcess::GetSP(), lldb::SBCommandInterpreter::HandleCommand(), HandleProcessEvent, LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBCommandReturnObject::PutError(), lldb::SBCommandReturnObject::PutOutput(), SBCommandInterpreter, and SBProcess.
Referenced by ~SBDebugger().
void lldb::SBDebugger::HandleProcessEvent | ( | const lldb::SBProcess & | process, |
const lldb::SBEvent & | event, | ||
FileSP | out, | ||
FileSP | err ) |
Handle a process event using FileSP objects.
References AddDestroyCallback(), CreateTarget(), CreateTargetWithFileAndArch(), CreateTargetWithFileAndTargetTriple(), data, DeleteTarget(), DispatchClientTelemetry(), EnableLog(), error(), FindTargetWithFileAndArch(), FindTargetWithProcessID(), GetAvailablePlatformInfoAtIndex(), GetBuildConfiguration(), GetDefaultArchitecture(), GetDummyTarget(), GetIndexOfTarget(), GetNumAvailablePlatforms(), GetNumPlatforms(), GetNumTargets(), GetPlatformAtIndex(), GetScriptingLanguage(), GetScriptInterpreterInfo(), GetSelectedPlatform(), GetSelectedTarget(), GetSourceManager(), GetTargetAtIndex(), GetUseColor(), GetUseExternalEditor(), GetUseSourceCache(), GetVersionString(), RemoveDestroyCallback(), SBStructuredData, SBTarget, SetCurrentPlatform(), SetCurrentPlatformSDKRoot(), SetDefaultArchitecture(), SetLoggingCallback(), SetSelectedPlatform(), SetSelectedTarget(), SetShowInlineDiagnostics(), SetUseColor(), SetUseExternalEditor(), SetUseSourceCache(), StateAsCString(), StateIsRunningState(), and StateIsStoppedState().
|
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().
|
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().
bool SBDebugger::InterruptRequested | ( | ) |
Check if an interrupt has been requested.
Definition at line 1735 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by ~SBDebugger().
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::SBDebugger::LLDB_DEPRECATED_FIXME | ( | "Use DispatchInput(const void *, size_t)" | , |
"DispatchInput(const void *, size_t)" | ) |
Dispatch input to the debugger (deprecated).
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.
[out] | error | An error if the trace could not be created. |
[in] | trace_description_file | The file containing the necessary information to load the trace. |
Definition at line 1716 of file SBDebugger.cpp.
References error(), LLDB_INSTRUMENT_VA, and lldb::SBTrace::LoadTraceFromFile().
|
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().
|
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.
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().
|
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().
|
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().
void SBDebugger::PushInputReader | ( | lldb::SBInputReader & | reader | ) |
Push an input reader onto the IO handler stack.
Definition at line 1211 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and SBInputReader.
|
private |
Definition at line 1283 of file SBDebugger.cpp.
References m_opaque_sp.
Referenced by lldb::SBPlatform::Attach(), lldb::SBTrace::LoadTraceFromFile(), and SBProgress.
bool SBDebugger::RemoveDestroyCallback | ( | lldb::callback_token_t | token | ) |
Remove a destroy callback.
Definition at line 1706 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
void SBDebugger::RequestInterrupt | ( | ) |
Request an interrupt of the current operation.
Definition at line 1722 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by ~SBDebugger().
|
private |
Definition at line 1277 of file SBDebugger.cpp.
References m_opaque_sp.
Referenced by Create(), FindDebuggerWithID(), lldb::SBCommandInterpreter::GetDebugger(), lldb::SBTarget::GetDebugger(), and SBProgress.
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 1647 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, and lldb_private::DebuggerStats::ResetStatistics().
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().
Run the command interpreter.
[in] | auto_handle_events | If true, automatically handle resulting events. This takes precedence and overrides the corresponding option in SBCommandInterpreterRunOptions. |
[in] | spawn_thread | If true, start a new thread for IO handling. This takes precedence and overrides the corresponding option in SBCommandInterpreterRunOptions. |
Definition at line 1215 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, lldb_private::CommandInterpreterRunOptions::SetAutoHandleEvents(), and lldb_private::CommandInterpreterRunOptions::SetSpawnThread().
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.
[in] | auto_handle_events | If true, automatically handle resulting events. This takes precedence and overrides the corresponding option in SBCommandInterpreterRunOptions. |
[in] | spawn_thread | If true, start a new thread for IO handling. This takes precedence and overrides the corresponding option in SBCommandInterpreterRunOptions. |
[in] | options | Parameter collection of type SBCommandInterpreterRunOptions. |
[out] | num_errors | The number of errors. |
[out] | quit_requested | Whether a quit was requested. |
[out] | stopped_for_crash | Whether the interpreter stopped for a crash. |
Definition at line 1227 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().
SBCommandInterpreterRunResult SBDebugger::RunCommandInterpreter | ( | const SBCommandInterpreterRunOptions & | options | ) |
Run the command interpreter with options and return a result object.
Definition at line 1251 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBCommandInterpreterRunOptions::ref(), lldb_private::CommandInterpreter::RunCommandInterpreter(), and lldb::SBCommandInterpreterRunResult.
SBError SBDebugger::RunREPL | ( | lldb::LanguageType | language, |
const char * | repl_options ) |
Run a REPL (Read-Eval-Print Loop) for the specified language.
Definition at line 1265 of file SBDebugger.cpp.
References error(), lldb_private::Status::FromErrorString(), LLDB_INSTRUMENT_VA, and m_opaque_sp.
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().
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().
void SBDebugger::SetCloseInputOnEOF | ( | bool | b | ) |
Set whether to close input on EOF (deprecated).
Definition at line 1538 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA.
SBError SBDebugger::SetCurrentPlatform | ( | const char * | platform_name | ) |
Set the current platform by name.
Definition at line 1502 of file SBDebugger.cpp.
References lldb_private::Status::FromErrorString(), lldb_private::PlatformList::GetOrCreate(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBError::ref(), and lldb_private::PlatformList::SetSelectedPlatform().
Referenced by HandleProcessEvent().
bool SBDebugger::SetCurrentPlatformSDKRoot | ( | const char * | sysroot | ) |
Set the SDK root for the current platform.
Definition at line 1522 of file SBDebugger.cpp.
References GetSelectedPlatform(), LLDB_INSTRUMENT_VA, and SBPlatform.
Referenced by HandleProcessEvent().
|
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().
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().
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().
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().
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().
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().
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().
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().
|
static |
Set an internal variable.
Definition at line 1310 of file SBDebugger.cpp.
References error(), lldb_private::eVarSetOperationAssign, lldb_private::Debugger::FindDebuggerWithInstanceName(), lldb_private::Status::FromErrorStringWithFormat(), LLDB_INSTRUMENT_VA, and lldb::SBError::SetError().
void SBDebugger::SetLoggingCallback | ( | lldb::LogOutputCallback | log_callback, |
void * | baton ) |
Set a callback for log output.
Definition at line 1677 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
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().
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().
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().
void SBDebugger::SetPrompt | ( | const char * | prompt | ) |
Set the command prompt string.
Definition at line 1398 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
void SBDebugger::SetREPLLanguage | ( | lldb::LanguageType | repl_lang | ) |
Set the current REPL language.
Definition at line 1431 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
void SBDebugger::SetScriptLanguage | ( | lldb::ScriptLanguage | script_lang | ) |
Set the current scripting language.
Definition at line 1417 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
void SBDebugger::SetSelectedPlatform | ( | lldb::SBPlatform & | platform | ) |
Set the selected platform.
Definition at line 1093 of file SBDebugger.cpp.
References lldb_private::API, lldb_private::GetLog(), lldb::SBPlatform::GetName(), lldb::SBPlatform::GetSP(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, and SBPlatform.
Referenced by HandleProcessEvent().
void SBDebugger::SetSelectedTarget | ( | SBTarget & | target | ) |
Set the selected target.
Definition at line 1058 of file SBDebugger.cpp.
References lldb_private::API, lldb::eDescriptionLevelBrief, lldb::SBStream::GetData(), lldb::SBTarget::GetDescription(), lldb_private::GetLog(), lldb::SBTarget::GetSP(), LLDB_INSTRUMENT_VA, LLDB_LOGF, m_opaque_sp, and SBTarget.
Referenced by HandleProcessEvent().
Set whether to show inline diagnostics.
Definition at line 1463 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
void SBDebugger::SetTerminalHeight | ( | uint32_t | term_height | ) |
Set the terminal height.
Definition at line 1378 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
void SBDebugger::SetTerminalWidth | ( | uint32_t | term_width | ) |
Set the terminal width.
Definition at line 1365 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Set whether to use color in output.
Definition at line 1451 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
Set whether to use an external editor.
Definition at line 1439 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
Set whether to use the source cache.
Definition at line 1469 of file SBDebugger.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_sp.
Referenced by HandleProcessEvent().
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().
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().
|
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().
|
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().
|
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().
|
static |
Check if a specific language is supported by LLDB.
Definition at line 1743 of file SBDebugger.cpp.
References lldb_private::TypeSystem::SupportsLanguageStatic().
Referenced by ~SBDebugger().
|
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().
|
friend |
Definition at line 666 of file SBDebugger.h.
|
friend |
Definition at line 667 of file SBDebugger.h.
|
friend |
Definition at line 668 of file SBDebugger.h.
References SBDebugger().
|
friend |
Definition at line 673 of file SBDebugger.h.
References SBCommandInterpreter.
Referenced by Create(), GetCommandInterpreter(), HandleCommand(), and SBCommandInterpreter.
|
friend |
Definition at line 674 of file SBDebugger.h.
References SBInputReader.
Referenced by PushInputReader(), and SBInputReader.
|
friend |
Definition at line 675 of file SBDebugger.h.
References SBListener.
Referenced by GetListener(), and SBListener.
|
friend |
Definition at line 679 of file SBDebugger.h.
References SBPlatform.
Referenced by GetPlatformAtIndex(), GetSelectedPlatform(), SBPlatform, SetCurrentPlatformSDKRoot(), and SetSelectedPlatform().
|
friend |
Definition at line 676 of file SBDebugger.h.
References SBProcess.
Referenced by HandleCommand(), SBProcess, and ~SBDebugger().
|
friend |
Definition at line 682 of file SBDebugger.h.
References FindTargetWithLLDBProcess(), get(), get_sp(), ref(), reset(), and SBProgress.
Referenced by SBProgress.
|
friend |
Definition at line 677 of file SBDebugger.h.
References SBSourceManager.
Referenced by GetSourceManager(), and SBSourceManager.
|
friend |
Definition at line 678 of file SBDebugger.h.
References SBStructuredData.
Referenced by GetAvailablePlatformInfoAtIndex(), GetBuildConfiguration(), GetDiagnosticFromEvent(), GetProgressDataFromEvent(), GetScriptInterpreterInfo(), GetSetting(), HandleProcessEvent(), SBStructuredData, and ~SBDebugger().
|
friend |
Definition at line 680 of file SBDebugger.h.
References SBTarget.
Referenced by CreateTarget(), CreateTarget(), CreateTargetWithFileAndArch(), CreateTargetWithFileAndTargetTriple(), FindTargetWithFileAndArch(), FindTargetWithLLDBProcess(), FindTargetWithProcessID(), GetDummyTarget(), GetSelectedTarget(), GetTargetAtIndex(), HandleProcessEvent(), SBTarget, and SetSelectedTarget().
|
friend |
const void* lldb::SBDebugger::data |
Definition at line 475 of file SBDebugger.h.
Referenced by DispatchInput(), GetAvailablePlatformInfoAtIndex(), GetBuildConfiguration(), GetDiagnosticFromEvent(), GetProgressDataFromEvent(), GetScriptInterpreterInfo(), GetSetting(), HandleProcessEvent(), SetInputString(), and ~SBDebugger().
const void size_t lldb::SBDebugger::data_len |
Definition at line 475 of file SBDebugger.h.
Referenced by DispatchInput().
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().
|
private |
Definition at line 694 of file SBDebugger.h.
Referenced by AddDestroyCallback(), CancelInterruptRequest(), Clear(), CreateTarget(), CreateTarget(), CreateTargetWithFileAndArch(), CreateTargetWithFileAndTargetTriple(), DeleteTarget(), Destroy(), DispatchClientTelemetry(), 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 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().