|
LLDB mainline
|
A class to manage flag bits. More...
#include <Debugger.h>
Classes | |
| struct | DestroyCallbackInfo |
| class | InterruptionReport |
| struct | ProgressReport |
Public Types | |
| using | DebuggerList = std::vector<lldb::DebuggerSP> |
Public Member Functions | |
| Broadcaster & | GetBroadcaster () |
| Get the public broadcaster for this debugger. | |
| const Broadcaster & | GetBroadcaster () const |
| ~Debugger () override | |
| void | Clear () |
| void | DispatchClientTelemetry (const lldb_private::StructuredDataImpl &entry) |
| bool | GetAsyncExecution () |
| void | SetAsyncExecution (bool async) |
| lldb::FileSP | GetInputFileSP () |
| File & | GetInputFile () |
| lldb::FileSP | GetOutputFileSP () |
| lldb::FileSP | GetErrorFileSP () |
| Status | SetInputString (const char *data) |
| void | SetInputFile (lldb::FileSP file) |
| void | SetOutputFile (lldb::FileSP file) |
| void | SetErrorFile (lldb::FileSP file) |
| void | SaveInputTerminalState () |
| void | RestoreInputTerminalState () |
| lldb::StreamUP | GetAsyncOutputStream () |
| lldb::StreamUP | GetAsyncErrorStream () |
| CommandInterpreter & | GetCommandInterpreter () |
| ScriptInterpreter * | GetScriptInterpreter (bool can_create=true, std::optional< lldb::ScriptLanguage > language={}) |
| lldb::ListenerSP | GetListener () |
| SourceManager & | GetSourceManager () |
| ExecutionContext | GetSelectedExecutionContext (bool adopt_dummy_target) |
| Get the execution context representing the selected entities in the selected target. | |
| ExecutionContextRef | GetSelectedExecutionContextRef (bool adopt_dummy_target) |
| Like GetSelectedExecutionContext but returns an ExecutionContextRef. | |
| TargetList & | GetTargetList () |
| Get accessor for the target list. | |
| PlatformList & | GetPlatformList () |
| void | DispatchInputInterrupt () |
| void | DispatchInputEndOfFile () |
| void | AdoptTopIOHandlerFilesIfInvalid (lldb::FileSP &in, lldb::LockableStreamFileSP &out, lldb::LockableStreamFileSP &err) |
| void | RunIOHandlerAsync (const lldb::IOHandlerSP &reader_sp, bool cancel_top_handler=true) |
| Run the given IO handler and return immediately. | |
| void | RunIOHandlerSync (const lldb::IOHandlerSP &reader_sp) |
| Run the given IO handler and block until it's complete. | |
| bool | RemoveIOHandler (const lldb::IOHandlerSP &reader_sp) |
| Remove the given IO handler if it's currently active. | |
| bool | IsTopIOHandler (const lldb::IOHandlerSP &reader_sp) |
| bool | CheckTopIOHandlerTypes (IOHandler::Type top_type, IOHandler::Type second_top_type) |
| void | PrintAsync (const char *s, size_t len, bool is_stdout) |
| llvm::StringRef | GetTopIOHandlerControlSequence (char ch) |
| const char * | GetIOHandlerCommandPrefix () |
| const char * | GetIOHandlerHelpPrologue () |
| void | RefreshIOHandler () |
| void | ClearIOHandlers () |
| llvm::Error | EnableLog (llvm::StringRef channel, llvm::ArrayRef< const char * > categories, llvm::StringRef log_file, uint32_t log_options, size_t buffer_size, LogHandlerKind log_handler_kind) |
| void | SetLoggingCallback (lldb::LogOutputCallback log_callback, void *baton) |
| std::vector< std::string > | CopyLogFilesToDirectory (const FileSpec &dir) |
| Copy this debugger's file-backed log files into the given directory, for inclusion in a diagnostics bundle. | |
| Status | SetPropertyValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef property_path, llvm::StringRef value) override |
| bool | GetAutoConfirm () const |
| FormatEntity::Entry | GetDisassemblyFormat () const |
| FormatEntity::Entry | GetFrameFormat () const |
| FormatEntity::Entry | GetFrameFormatUnique () const |
| uint64_t | GetStopDisassemblyMaxSize () const |
| FormatEntity::Entry | GetThreadFormat () const |
| FormatEntity::Entry | GetThreadStopFormat () const |
| lldb::ScriptLanguage | GetScriptLanguage () const |
| bool | SetScriptLanguage (lldb::ScriptLanguage script_lang) |
| lldb::LanguageType | GetREPLLanguage () const |
| bool | SetREPLLanguage (lldb::LanguageType repl_lang) |
| uint64_t | GetTerminalWidth () const |
| bool | SetTerminalWidth (uint64_t term_width) |
| uint64_t | GetTerminalHeight () const |
| bool | SetTerminalHeight (uint64_t term_height) |
| bool | SetTerminalDimensions (uint64_t term_width, uint64_t term_height) |
| Set the terminal width and height together, so observers are notified once with both dimensions current. | |
| llvm::StringRef | GetPrompt () const |
| llvm::StringRef | GetPromptAnsiPrefix () const |
| llvm::StringRef | GetPromptAnsiSuffix () const |
| void | SetPrompt (llvm::StringRef p) |
| void | SetPrompt (const char *)=delete |
| bool | GetUseExternalEditor () const |
| bool | SetUseExternalEditor (bool use_external_editor_p) |
| llvm::StringRef | GetExternalEditor () const |
| bool | SetExternalEditor (llvm::StringRef editor) |
| bool | GetUseColor () const |
| bool | SetUseColor (bool use_color) |
| bool | GetShowProgress () const |
| bool | SetShowProgress (bool show_progress) |
| bool | GetShowStatusline () const |
| FormatEntity::Entry | GetStatuslineFormat () const |
| bool | SetStatuslineFormat (const FormatEntity::Entry &format) |
| llvm::StringRef | GetSeparator () const |
| bool | SetSeparator (llvm::StringRef s) |
| llvm::StringRef | GetShowProgressAnsiPrefix () const |
| llvm::StringRef | GetShowProgressAnsiSuffix () const |
| llvm::StringRef | GetDisabledAnsiPrefix () const |
| llvm::StringRef | GetDisabledAnsiSuffix () const |
| AutosuggestionMode | GetAutosuggestionMode () const |
| llvm::StringRef | GetAutosuggestionAnsiPrefix () const |
| llvm::StringRef | GetAutosuggestionAnsiSuffix () const |
| llvm::StringRef | GetRegexMatchAnsiPrefix () const |
| llvm::StringRef | GetRegexMatchAnsiSuffix () const |
| bool | GetShowDontUsePoHint () const |
| bool | GetUseSourceCache () const |
| bool | SetUseSourceCache (bool use_source_cache) |
| bool | GetMarkHiddenFrames () const |
| bool | GetHighlightSource () const |
| lldb::StopShowColumn | GetStopShowColumn () const |
| llvm::StringRef | GetStopShowColumnAnsiPrefix () const |
| llvm::StringRef | GetStopShowColumnAnsiSuffix () const |
| uint64_t | GetStopSourceLineCount (bool before) const |
| lldb::StopDisassemblyType | GetStopDisassemblyDisplay () const |
| uint64_t | GetDisassemblyLineCount () const |
| llvm::StringRef | GetStopShowLineMarkerAnsiPrefix () const |
| llvm::StringRef | GetStopShowLineMarkerAnsiSuffix () const |
| bool | GetAutoOneLineSummaries () const |
| bool | GetAutoIndent () const |
| bool | SetAutoIndent (bool b) |
| bool | GetPrintDecls () const |
| bool | SetPrintDecls (bool b) |
| uint64_t | GetTabSize () const |
| bool | SetTabSize (uint64_t tab_size) |
| lldb::DWIMPrintVerbosity | GetDWIMPrintVerbosity () const |
| bool | GetEscapeNonPrintables () const |
| bool | GetNotifyVoid () const |
| const std::string & | GetInstanceName () const |
| bool | GetShowInlineDiagnostics () const |
| bool | SetShowInlineDiagnostics (bool) |
| bool | LoadPlugin (const FileSpec &spec, Status &error) |
| void | RunIOHandlers () |
| bool | IsForwardingEvents () |
| void | EnableForwardEvents (const lldb::ListenerSP &listener_sp) |
| void | CancelForwardEvents (const lldb::ListenerSP &listener_sp) |
| bool | IsHandlingEvents () const |
| Status | RunREPL (lldb::LanguageType language, const char *repl_options) |
| void | RequestInterrupt () |
| Interruption in LLDB: | |
| void | CancelInterruptRequest () |
| Decrement the "interrupt requested" counter. | |
| void | RedrawStatusline (std::optional< ExecutionContextRef > exe_ctx_ref) |
| Redraw the statusline if enabled. | |
| bool | StatuslineSupported () |
| Whether the statusline can be drawn: show-statusline is enabled and the output is an escape-code-capable terminal. | |
| void | FlushStatusLine () |
| Flush cached state (e.g. stale execution context in the statusline). | |
| template<typename... Args> | |
| bool | InterruptRequested (const char *cur_func, const char *formatv, Args &&...args) |
| This is the correct way to query the state of Interruption. | |
| bool | InterruptRequested () |
| void | ReportInterruption (const InterruptionReport &report) |
| Target & | GetSelectedOrDummyTarget (bool prefer_dummy=false) |
| Target & | GetDummyTarget () |
| lldb::BroadcasterManagerSP | GetBroadcasterManager () |
| void | SetDestroyCallback (lldb_private::DebuggerDestroyCallback destroy_callback, void *baton) |
| DEPRECATED: We used to only support one Destroy callback. | |
| lldb::callback_token_t | AddDestroyCallback (lldb_private::DebuggerDestroyCallback destroy_callback, void *baton) |
| Add a callback for when the debugger is destroyed. | |
| bool | RemoveDestroyCallback (lldb::callback_token_t token) |
| Remove the specified callback. Return true if successful. | |
| bool | StartEventHandlerThread () |
| Manually start the global event handler thread. | |
| void | StopEventHandlerThread () |
| Manually stop the debugger's default event handler. | |
| void | FlushProcessOutput (Process &process, bool flush_stdout, bool flush_stderr) |
| Force flushing the process's pending stdout and stderr to the debugger's asynchronous stdout and stderr streams. | |
| SourceManager::SourceFileCache & | GetSourceFileCache () |
| std::optional< ProgressReport > | GetCurrentProgressReport () const |
| Public Member Functions inherited from lldb_private::UserID | |
| UserID (lldb::user_id_t uid=LLDB_INVALID_UID) | |
| Construct with optional user ID. | |
| ~UserID ()=default | |
| Destructor. | |
| void | Clear () |
| Clears the object state. | |
| lldb::user_id_t | GetID () const |
| Get accessor for the user ID. | |
| void | SetID (lldb::user_id_t uid) |
| Set accessor for the user ID. | |
| Public Member Functions inherited from lldb_private::Properties | |
| Properties () | |
| Properties (const lldb::OptionValuePropertiesSP &collection_sp) | |
| virtual | ~Properties () |
| lldb::OptionValuePropertiesSP | GetValueProperties () const |
| virtual lldb::OptionValueSP | GetPropertyValue (const ExecutionContext *exe_ctx, llvm::StringRef property_path, Status &error) const |
| virtual Status | DumpPropertyValue (const ExecutionContext *exe_ctx, Stream &strm, llvm::StringRef property_path, uint32_t dump_mask, bool is_json=false) |
| virtual void | DumpAllPropertyValues (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask, bool is_json=false) |
| virtual void | DumpAllDescriptions (CommandInterpreter &interpreter, Stream &strm) const |
| void | Apropos (llvm::StringRef keyword, std::vector< const Property * > &matching_properties, std::vector< const Property * > &matching_property_paths) const |
| template<typename T> | |
| T | GetPropertyAtIndexAs (uint32_t idx, T default_value, const ExecutionContext *exe_ctx=nullptr) const |
| template<typename T, typename U = typename std::remove_pointer<T>::type, std::enable_if_t< std::is_pointer_v< T >, bool > = true> | |
| const U * | GetPropertyAtIndexAs (uint32_t idx, const ExecutionContext *exe_ctx=nullptr) const |
| template<typename T> | |
| bool | SetPropertyAtIndex (uint32_t idx, T t, const ExecutionContext *exe_ctx=nullptr) const |
Static Public Member Functions | |
| static llvm::StringRef | GetStaticBroadcasterClass () |
| static lldb::DebuggerSP | CreateInstance (lldb::LogOutputCallback log_callback=nullptr, void *baton=nullptr) |
| static void | Initialize (LoadPluginCallbackType load_plugin_callback) |
| static void | Terminate () |
| static void | SettingsInitialize () |
| static void | SettingsTerminate () |
| static void | Destroy (lldb::DebuggerSP &debugger_sp) |
| static StructuredData::DictionarySP | GetBuildConfiguration () |
| Get the build configuration as structured data. | |
| static lldb::DebuggerSP | FindDebuggerWithID (lldb::user_id_t id) |
| static lldb::DebuggerSP | FindDebuggerWithInstanceName (llvm::StringRef instance_name) |
| static size_t | GetNumDebuggers () |
| static lldb::DebuggerSP | GetDebuggerAtIndex (size_t index) |
| static bool | FormatDisassemblerAddress (const FormatEntity::Entry *format, const SymbolContext *sc, const SymbolContext *prev_sc, const ExecutionContext *exe_ctx, const Address *addr, Stream &s) |
| static void | AssertCallback (llvm::StringRef message, llvm::StringRef backtrace, llvm::StringRef prompt) |
| static DebuggerList | DebuggersRequestingInterruption () |
| static llvm::ThreadPoolInterface & | GetThreadPool () |
| Shared thread pool. Use only with ThreadPoolTaskGroup. | |
| static void | ReportWarning (std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr) |
| Report warning events. | |
| static void | ReportError (std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr) |
| Report error events. | |
| static void | ReportInfo (std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr) |
| Report info events. | |
| static void | ReportSymbolChange (const ModuleSpec &module_spec) |
| static const FileSpecList & | GetDefaultSafeAutoLoadPaths () |
| Static Public Member Functions inherited from lldb_private::Properties | |
| static llvm::StringRef | GetExperimentalSettingsName () |
| static bool | IsSettingExperimental (llvm::StringRef setting) |
Protected Types | |
| enum | { eBroadcastBitEventThreadIsListening = (1 << 0) } |
| typedef std::vector< llvm::sys::DynamicLibrary > | LoadedPluginsList |
Static Protected Member Functions | |
| static void | ReportProgress (uint64_t progress_id, std::string title, std::string details, uint64_t completed, uint64_t total, std::optional< lldb::user_id_t > debugger_id, uint32_t progress_category_bit=lldb::eBroadcastBitProgress) |
| Report progress events. | |
| static void | ReportDiagnosticImpl (lldb::Severity severity, std::string message, std::optional< lldb::user_id_t > debugger_id, std::once_flag *once) |
Static Protected Attributes | |
| static LoadPluginCallbackType | g_load_plugin_callback = nullptr |
Private Member Functions | |
| Debugger (lldb::LogOutputCallback m_log_callback, void *baton) | |
| Debugger (const Debugger &)=delete | |
| const Debugger & | operator= (const Debugger &)=delete |
Friends | |
| class | CommandInterpreter |
| class | REPL |
| class | Progress |
| class | ProgressManager |
| class | Statusline |
A class to manage flag bits.
Provides a global root objects for the debugger core.
Definition at line 98 of file Debugger.h.
| using lldb_private::Debugger::DebuggerList = std::vector<lldb::DebuggerSP> |
Definition at line 102 of file Debugger.h.
|
protected |
Definition at line 806 of file Debugger.h.
|
protected |
| Enumerator | |
|---|---|
| eBroadcastBitEventThreadIsListening | |
Definition at line 840 of file Debugger.h.
|
override |
Definition at line 1138 of file Debugger.cpp.
References Clear().
|
private |
Definition at line 1035 of file Debugger.cpp.
References CommandInterpreter, g_unique_id, lldb_private::Target::GetDefaultArchitecture(), lldb_private::Language::GetGlobalLanguageProperties(), lldb_private::ModuleList::GetGlobalModuleListProperties(), lldb_private::Platform::GetGlobalPlatformProperties(), lldb_private::Diagnostics::GetGlobalProperties(), lldb_private::Target::GetGlobalProperties(), lldb_private::TestingProperties::GetGlobalTestingProperties(), lldb_private::Platform::GetHostPlatform(), lldb_private::UserID::GetID(), GetOutputFileSP(), lldb_private::LanguageProperties::GetSettingName(), GetStaticBroadcasterClass(), lldb_private::Properties::GetValueProperties(), lldb_private::ArchSpec::IsValid(), m_broadcaster, m_broadcaster_manager_sp, m_callback_handler_sp, m_clear_once, lldb_private::Properties::m_collection_sp, m_command_interpreter_up, m_dummy_target_sp, m_error_stream_sp, m_event_handler_thread, m_forward_listener_sp, m_input_file_sp, m_instance_name, m_io_handler_stack, m_io_handler_thread, m_listener_sp, m_loaded_plugins, m_output_mutex, m_output_stream_sp, m_platform_list, m_source_file_cache, m_source_manager_up, m_sync_broadcaster, m_target_list, m_terminal_state, lldb_private::Properties::Properties(), lldb_private::OptionValueUInt64::SetMinimumValue(), SetSeparator(), SetUseColor(), lldb_private::Target, and lldb_private::UserID::UserID().
Referenced by CreateInstance(), Debugger(), and operator=().
|
privatedelete |
References Debugger().
| lldb::callback_token_t Debugger::AddDestroyCallback | ( | lldb_private::DebuggerDestroyCallback | destroy_callback, |
| void * | baton ) |
Add a callback for when the debugger is destroyed.
Return a token, which can be used to remove said callback. Multiple callbacks can be added by calling this function multiple times, and will be invoked in FIFO order.
Definition at line 1723 of file Debugger.cpp.
References m_destroy_callback_mutex, m_destroy_callback_next_token, and m_destroy_callbacks.
| void Debugger::AdoptTopIOHandlerFilesIfInvalid | ( | lldb::FileSP & | in, |
| lldb::LockableStreamFileSP & | out, | ||
| lldb::LockableStreamFileSP & | err ) |
Definition at line 1440 of file Debugger.cpp.
References lldb_private::File::eOpenOptionReadOnly, GetErrorStreamSP(), GetInputFileSP(), GetOutputStreamSP(), m_io_handler_stack, m_output_mutex, and lldb_private::NativeFileBase::Unowned.
Referenced by lldb_private::IOHandler::IOHandler(), and lldb_private::ScriptInterpreterIORedirect::ScriptInterpreterIORedirect().
|
static |
Definition at line 1684 of file Debugger.cpp.
References lldb_private::GetVersion(), and ReportError().
Referenced by lldb_private::SystemInitializerFull::Initialize().
| void Debugger::CancelForwardEvents | ( | const lldb::ListenerSP & | listener_sp | ) |
Definition at line 2154 of file Debugger.cpp.
References m_forward_listener_sp.
| void Debugger::CancelInterruptRequest | ( | ) |
Decrement the "interrupt requested" counter.
Definition at line 1561 of file Debugger.cpp.
References m_interrupt_mutex, and m_interrupt_requested.
| bool Debugger::CheckTopIOHandlerTypes | ( | IOHandler::Type | top_type, |
| IOHandler::Type | second_top_type ) |
Definition at line 1404 of file Debugger.cpp.
References m_io_handler_stack.
Referenced by lldb_private::REPL::IOHandlerInputComplete().
| void Debugger::Clear | ( | ) |
Definition at line 1140 of file Debugger.cpp.
References ClearIOHandlers(), lldb_private::File::Close(), lldb_private::telemetry::LLDBBaseTelemetryInfo::debugger, GetInputFile(), lldb_private::telemetry::DebuggerInfo::is_exit_entry, m_broadcaster_manager_sp, m_clear_once, m_command_interpreter_up, m_listener_sp, m_target_list, m_terminal_state, StopEventHandlerThread(), and StopIOHandlerThread().
Referenced by ~Debugger().
| void Debugger::ClearIOHandlers | ( | ) |
Definition at line 1333 of file Debugger.cpp.
References m_io_handler_stack, and PopIOHandler().
Referenced by Clear(), and RunIOHandlers().
| std::vector< std::string > Debugger::CopyLogFilesToDirectory | ( | const FileSpec & | dir | ) |
Copy this debugger's file-backed log files into the given directory, for inclusion in a diagnostics bundle.
Returns the names of the files that were copied. Best-effort: files that cannot be copied are skipped.
Definition at line 1702 of file Debugger.cpp.
References lldb_private::FileSpec::CopyByAppendingPathComponent(), lldb_private::FileSpec::GetPath(), and m_stream_handlers.
Referenced by lldb_private::Diagnostics::CollectLogs().
|
static |
Definition at line 941 of file Debugger.cpp.
References Debugger(), g_debugger_list_ptr, GetDebuggerListMutex(), lldb_private::GetVersion(), and lldb_private::telemetry::DebuggerInfo::lldb_version.
Referenced by lldb_private::mcp::DebuggerCreateTool::Call(), and lldb::SBDebugger::Create().
|
static |
Definition at line 1594 of file Debugger.cpp.
References g_debugger_list_ptr, and GetDebuggerListMutex().
Referenced by DebuggersOwningModuleRequestingInterruption().
|
protected |
Definition at line 2222 of file Debugger.cpp.
References CommandInterpreter, lldb_private::CommandInterpreter::eBroadcastBitAsynchronousErrorData, lldb_private::CommandInterpreter::eBroadcastBitAsynchronousOutputData, lldb_private::Target::eBroadcastBitBreakpointChanged, lldb::eBroadcastBitError, eBroadcastBitEventThreadIsListening, lldb::eBroadcastBitExternalProgress, lldb::eBroadcastBitProgress, lldb_private::CommandInterpreter::eBroadcastBitQuitCommandReceived, lldb_private::Thread::eBroadcastBitStackChanged, lldb_private::Process::eBroadcastBitStateChanged, lldb_private::Process::eBroadcastBitSTDERR, lldb_private::Process::eBroadcastBitSTDOUT, lldb_private::Process::eBroadcastBitStructuredData, lldb_private::Thread::eBroadcastBitThreadSelected, lldb::eBroadcastBitWarning, lldb::eBroadcastSymbolChange, lldb::eStateStopped, GetAsyncErrorStream(), GetAsyncOutputStream(), lldb_private::Broadcaster::GetBroadcasterClass(), lldb_private::EventDataBytes::GetBytesFromEvent(), lldb_private::Breakpoint::BreakpointEventData::GetEventDataFromEvent(), GetListener(), lldb_private::Process::ProcessEventData::GetRestartedFromEvent(), GetSelectedExecutionContextRef(), lldb_private::Process::GetStaticBroadcasterClass(), lldb_private::Target::GetStaticBroadcasterClass(), lldb_private::Thread::GetStaticBroadcasterClass(), HandleBreakpointEvent(), HandleDiagnosticEvent(), HandleProcessEvent(), HandleProgressEvent(), HandleThreadEvent(), m_broadcaster, m_broadcaster_manager_sp, m_command_interpreter_up, m_forward_listener_sp, m_statusline, m_statusline_mutex, m_sync_broadcaster, RedrawStatusline(), RequiresFollowChildWorkaround(), and StatuslineSupported().
Referenced by StartEventHandlerThread().
|
static |
Definition at line 985 of file Debugger.cpp.
References CommandInterpreter, g_debugger_list_ptr, GetDebuggerListMutex(), lldb_private::CommandReturnObject::GetErrorString(), lldb_private::CommandReturnObject::GetOutputString(), lldb_private::CommandInterpreter::GetSaveSessionOnQuit(), lldb_private::CommandInterpreter::SaveTranscript(), and lldb_private::CommandReturnObject::Succeeded().
Referenced by lldb_private::mcp::DebuggerDeleteTool::Call(), and lldb::SBDebugger::Destroy().
| void Debugger::DispatchClientTelemetry | ( | const lldb_private::StructuredDataImpl & | entry | ) |
Definition at line 959 of file Debugger.cpp.
References lldb_private::telemetry::TelemetryManager::DispatchClientTelemetry(), and lldb_private::telemetry::TelemetryManager::GetInstance().
| void Debugger::DispatchInputEndOfFile | ( | ) |
Definition at line 1326 of file Debugger.cpp.
References m_io_handler_stack.
| void Debugger::DispatchInputInterrupt | ( | ) |
Definition at line 1319 of file Debugger.cpp.
References m_io_handler_stack.
| void Debugger::EnableForwardEvents | ( | const lldb::ListenerSP & | listener_sp | ) |
Definition at line 2150 of file Debugger.cpp.
References m_forward_listener_sp.
| llvm::Error Debugger::EnableLog | ( | llvm::StringRef | channel, |
| llvm::ArrayRef< const char * > | categories, | ||
| llvm::StringRef | log_file, | ||
| uint32_t | log_options, | ||
| size_t | buffer_size, | ||
| LogHandlerKind | log_handler_kind ) |
Definition at line 1907 of file Debugger.cpp.
References CreateLogHandler(), lldb_private::Log::EnableLogChannel(), lldb_private::File::eOpenOptionAppend, lldb_private::File::eOpenOptionCanCreate, lldb_private::File::eOpenOptionTruncate, lldb_private::File::eOpenOptionWriteOnly, GetOutputFileSP(), lldb_private::FileSystem::Instance(), LLDB_LOG_OPTION_APPEND, LLDB_LOG_OPTION_PREPEND_THREAD_NAME, LLDB_LOG_OPTION_PREPEND_TIMESTAMP, m_callback_handler_sp, m_stream_handlers, and lldb_private::FileSystem::Open().
Referenced by CommandObjectLogEnable::DoExecute().
|
static |
Definition at line 1625 of file Debugger.cpp.
References g_debugger_list_ptr, and GetDebuggerListMutex().
Referenced by lldb_private::mcp::CommandTool::Call(), lldb_private::mcp::DebuggerDeleteTool::Call(), lldb::SBDebugger::FindDebuggerWithID(), lldb_private::mcp::DebuggerResourceProvider::ReadDebuggerResource(), lldb_private::mcp::DebuggerResourceProvider::ReadTargetResource(), lldb_private::ScriptInterpreterPythonImpl::SessionIORedirect::ReadThreadBytesReceived(), ReportDiagnosticImpl(), and ReportProgress().
|
static |
Definition at line 1017 of file Debugger.cpp.
References g_debugger_list_ptr, and GetDebuggerListMutex().
Referenced by lldb::SBDebugger::GetInternalVariableValue(), and lldb::SBDebugger::SetInternalVariable().
Force flushing the process's pending stdout and stderr to the debugger's asynchronous stdout and stderr streams.
Definition at line 2026 of file Debugger.cpp.
References error(), lldb_private::Stream::Flush(), GetAsyncErrorStream(), GetAsyncOutputStream(), lldb_private::Process::GetSTDERR(), lldb_private::Process::GetSTDOUT(), m_output_flush_mutex, and lldb_private::Stream::Write().
Referenced by HandleProcessEvent().
| void Debugger::FlushStatusLine | ( | ) |
Flush cached state (e.g. stale execution context in the statusline).
Definition at line 1292 of file Debugger.cpp.
References m_statusline, and m_statusline_mutex.
Referenced by lldb_private::Process::Flush().
|
static |
Definition at line 1638 of file Debugger.cpp.
References lldb_private::Symbol::Compare(), lldb_private::FormatEntity::Formatter::Format(), lldb_private::SymbolContext::function, lldb_private::Target::GetDebugger(), GetDisassemblyFormat(), lldb_private::Function::GetMangled(), lldb_private::Symbol::GetName(), lldb_private::ExecutionContext::GetTargetRef(), lldb_private::Symbol::GetType(), lldb_private::ExecutionContext::HasTargetScope(), lldb_private::FormatEntity::Parse(), and lldb_private::SymbolContext::symbol.
Referenced by lldb_private::Instruction::Dump(), and lldb_private::Disassembler::PrintInstructions().
| StreamUP Debugger::GetAsyncErrorStream | ( | ) |
Definition at line 1551 of file Debugger.cpp.
References lldb_private::StreamAsynchronousIO::STDERR.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::AcceleratorBreakpointHit(), lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), ComputeConstituentLoadAddress(), lldb_private::Process::CreateBreakpointSite(), DefaultEventHandler(), FlushProcessOutput(), HandleDiagnosticEvent(), HandleProcessEvent(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::Target::ModulesDidLoad(), PrivateReportDiagnostic(), SetPropertyValue(), and lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction().
| bool Debugger::GetAsyncExecution | ( | ) |
Definition at line 1179 of file Debugger.cpp.
References m_command_interpreter_up.
Referenced by CommandObjectProcessConnect::DoExecute(), CommandObjectProcessContinue::DoExecute(), lldb_private::CommandInterpreter::HandleCommandsFromFile(), lldb_private::Target::HookCommandLine::HandleModuleLoaded(), lldb_private::Target::HookCommandLine::HandleStop(), lldb_private::Target::StopHookCommandLine::HandleStop(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::StopInfoWatchpoint::PerformAction(), and ResumeNewPlan().
| StreamUP Debugger::GetAsyncOutputStream | ( | ) |
Definition at line 1546 of file Debugger.cpp.
References lldb_private::StreamAsynchronousIO::STDOUT.
Referenced by lldb_private::ClangUserExpression::AddArguments(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), DefaultEventHandler(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidFork(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidVFork(), ProcessKDP::DoConnectRemote(), FlushProcessOutput(), lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAcceleratorConnection(), HandleBreakpointEvent(), HandleProcessEvent(), HandleThreadEvent(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), lldb_private::StopInfoWatchpoint::PerformAction(), ProcessFreeBSDKernelCore::PrintUnreadMessage(), and ObjectFileMachO::SaveCore().
| bool Debugger::GetAutoConfirm | ( | ) | const |
Definition at line 386 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| bool Debugger::GetAutoIndent | ( | ) | const |
Definition at line 751 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::REPL::GetIOHandler().
| bool Debugger::GetAutoOneLineSummaries | ( | ) | const |
Definition at line 739 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetAutosuggestionAnsiPrefix | ( | ) | const |
Definition at line 631 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::IOHandlerEditline::IOHandlerEditline().
| llvm::StringRef Debugger::GetAutosuggestionAnsiSuffix | ( | ) | const |
Definition at line 637 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::IOHandlerEditline::IOHandlerEditline().
| AutosuggestionMode Debugger::GetAutosuggestionMode | ( | ) | const |
Definition at line 624 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::IOHandlerEditline::IOHandlerEditline().
|
inline |
Get the public broadcaster for this debugger.
Definition at line 107 of file Debugger.h.
References m_broadcaster.
Referenced by PrivateReportDiagnostic(), and PrivateReportProgress().
|
inline |
Definition at line 108 of file Debugger.h.
References m_broadcaster.
|
inline |
Definition at line 546 of file Debugger.h.
References m_broadcaster_manager_sp.
Referenced by lldb::SBListener::StartListeningForEventClass(), and lldb::SBListener::StopListeningForEventClass().
|
static |
Get the build configuration as structured data.
Definition at line 2605 of file Debugger.cpp.
References AddBoolConfigEntry(), AddLLVMTargets(), and lldb_private::XMLDocument::XMLEnabled().
Referenced by lldb_private::CommandObjectVersion::DoExecute(), and lldb::SBDebugger::GetBuildConfiguration().
|
inline |
Definition at line 182 of file Debugger.h.
References CommandInterpreter, and m_command_interpreter_up.
Referenced by lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), CaptureCommand(), lldb_private::StructuredDataDarwinLog::DebuggerInitialize(), CommandObjectCommandsScriptAdd::DoExecute(), CommandObjectCommandsScriptImport::DoExecute(), CommandObjectCommandsSource::DoExecute(), CommandObjectPlatformProcessLaunch::DoExecute(), ProcessFreeBSDKernelCore::GetPluginCommandObject(), lldb_private::Target::HookCommandLine::HandleModuleLoaded(), lldb_private::Target::HookCommandLine::HandleStop(), lldb_private::Target::StopHookCommandLine::HandleStop(), lldb_private::StructuredDataPlugin::InitializeBasePluginForDebugger(), InterruptRequested(), lldb_private::IOHandlerDelegate::IOHandlerComplete(), lldb_private::REPL::IOHandlerComplete(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::IOHandlerDelegate::IOHandlerSuggestion(), lldb_private::Target::Launch(), lldb_private::REPL::REPL(), lldb_private::REPL::RunLoop(), SetPrompt(), SetPropertyValue(), SetUseColor(), and StopEventHandlerThread().
| std::optional< Debugger::ProgressReport > Debugger::GetCurrentProgressReport | ( | ) | const |
Definition at line 2465 of file Debugger.cpp.
References m_progress_reports, and m_progress_reports_mutex.
|
static |
Definition at line 1614 of file Debugger.cpp.
References g_debugger_list_ptr, and GetDebuggerListMutex().
Referenced by lldb::SBTypeCategory::AddTypeSummary(), lldb::SBTypeCategory::AddTypeSynthetic(), lldb_private::mcp::CommandTool::Call(), lldb_private::mcp::DebuggerListTool::Call(), lldb_private::mcp::DebuggerResourceProvider::GetResources(), and lldb_private::CommandObjectQuit::ShouldAskForConfirmation().
|
static |
Definition at line 237 of file Debugger.cpp.
References lldb_private::FileSpecList::EmplaceBack(), lldb_private::GetLog(), LLDB_LOG, and lldb_private::System.
Referenced by lldb_private::Target::GetSafeAutoLoadPaths().
| llvm::StringRef Debugger::GetDisabledAnsiPrefix | ( | ) | const |
Definition at line 605 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetDisabledAnsiSuffix | ( | ) | const |
Definition at line 611 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| FormatEntity::Entry Debugger::GetDisassemblyFormat | ( | ) | const |
Definition at line 392 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::InstructionList::Dump(), FormatDisassemblerAddress(), and lldb_private::Disassembler::PrintInstructions().
| uint64_t Debugger::GetDisassemblyLineCount | ( | ) | const |
Definition at line 733 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::GetStatus().
|
inline |
Definition at line 544 of file Debugger.h.
References m_dummy_target_sp.
Referenced by CommandObjectTargetFrameProviderList::DoExecute(), CommandObjectTargetFrameProviderRegister::DoExecute(), CommandObjectTargetFrameProviderRemove::DoExecute(), and GetSelectedOrDummyTarget().
| lldb::DWIMPrintVerbosity Debugger::GetDWIMPrintVerbosity | ( | ) | const |
Definition at line 784 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::CommandObjectDWIMPrint::DoExecute().
|
inline |
Definition at line 162 of file Debugger.h.
References m_error_stream_sp.
Referenced by IOHandlerLuaInterpreter::IOHandlerLuaInterpreter(), and lldb_private::ScriptInterpreterIORedirect::ScriptInterpreterIORedirect().
|
inlineprotected |
Definition at line 720 of file Debugger.h.
References m_error_stream_sp.
Referenced by AdoptTopIOHandlerFilesIfInvalid().
| bool Debugger::GetEscapeNonPrintables | ( | ) | const |
Definition at line 745 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetExternalEditor | ( | ) | const |
Definition at line 532 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::Thread::GetStatus(), and lldb_private::Thread::SetSelectedFrameByIndexNoisily().
| FormatEntity::Entry Debugger::GetFrameFormat | ( | ) | const |
Definition at line 397 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::DumpUsingSettingsFormat().
| FormatEntity::Entry Debugger::GetFrameFormatUnique | ( | ) | const |
Definition at line 402 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::DumpUsingSettingsFormat().
| bool Debugger::GetHighlightSource | ( | ) | const |
Definition at line 682 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
|
inline |
Definition at line 156 of file Debugger.h.
References m_input_file_sp.
Referenced by Clear(), SaveInputTerminalState(), and StopIOHandlerThread().
|
inline |
Definition at line 155 of file Debugger.h.
References m_input_file_sp.
Referenced by AdoptTopIOHandlerFilesIfInvalid(), lldb_private::CommandObjectGUI::DoExecute(), and lldb_private::ScriptInterpreterIORedirect::ScriptInterpreterIORedirect().
|
inline |
Definition at line 407 of file Debugger.h.
References m_instance_name.
Referenced by lldb_private::mcp::DebuggerResourceProvider::GetDebuggerResource().
| const char * Debugger::GetIOHandlerCommandPrefix | ( | ) |
Definition at line 1423 of file Debugger.cpp.
References m_io_handler_stack.
Referenced by lldb_private::CommandInterpreter::GetCommandPrefix().
| const char * Debugger::GetIOHandlerHelpPrologue | ( | ) |
Definition at line 1427 of file Debugger.cpp.
References m_io_handler_stack.
|
inline |
Definition at line 191 of file Debugger.h.
References m_listener_sp.
Referenced by lldb_private::Target::CreateProcess(), DefaultEventHandler(), lldb_private::Platform::DoConnectProcess(), and lldb_private::ProcessAttachInfo::GetListenerForProcess().
| bool Debugger::GetMarkHiddenFrames | ( | ) | const |
Definition at line 676 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::Thread::GetStackFrameStatus(), and lldb_private::Thread::GetStatus().
| bool Debugger::GetNotifyVoid | ( | ) | const |
Definition at line 413 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::REPL::IOHandlerInputComplete().
|
static |
Definition at line 1606 of file Debugger.cpp.
References g_debugger_list_ptr, and GetDebuggerListMutex().
Referenced by lldb::SBTypeCategory::AddTypeSummary(), lldb::SBTypeCategory::AddTypeSynthetic(), lldb_private::mcp::CommandTool::Call(), lldb_private::mcp::DebuggerListTool::Call(), lldb_private::mcp::DebuggerResourceProvider::GetResources(), and lldb_private::CommandObjectQuit::ShouldAskForConfirmation().
|
inline |
Definition at line 158 of file Debugger.h.
References m_output_stream_sp.
Referenced by Debugger(), lldb_private::CommandObjectGUI::DoExecute(), EnableLog(), lldb_private::CommandInterpreter::HandleCommandsFromFile(), IOHandlerLuaInterpreter::IOHandlerLuaInterpreter(), and lldb_private::ScriptInterpreterIORedirect::ScriptInterpreterIORedirect().
|
inlineprotected |
Except for Debugger and IOHandler, GetOutputStreamSP and GetErrorStreamSP should not be used directly.
Use GetAsyncOutputStream and GetAsyncErrorStream instead.
Definition at line 719 of file Debugger.h.
References m_output_stream_sp.
Referenced by AdoptTopIOHandlerFilesIfInvalid(), HandleProgressEvent(), and IsEscapeCodeCapableTTY().
|
inline |
Definition at line 222 of file Debugger.h.
References m_platform_list.
Referenced by lldb_private::Target::Attach(), lldb_private::Process::CompleteAttach(), lldb_private::OptionGroupPlatform::CreatePlatformWithOptions(), CommandObjectPlatformProcessInfo::DoExecute(), CommandObjectPlatformProcessLaunch::DoExecute(), CommandObjectPlatformProcessList::DoExecute(), CommandObjectPlatformSelect::DoExecute(), CommandObjectPlatformStatus::DoExecute(), ObjectFileMachO::LoadCoreFileImages(), lldb_private::CommandCompletions::RemoteDiskDirectories(), and lldb_private::CommandCompletions::RemoteDiskFiles().
| bool Debugger::GetPrintDecls | ( | ) | const |
Definition at line 762 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::REPL::IOHandlerInputComplete().
| llvm::StringRef Debugger::GetPrompt | ( | ) | const |
Definition at line 419 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::CommandInterpreter::HandleCommandsFromFile(), SetPrompt(), SetPropertyValue(), and SetUseColor().
| llvm::StringRef Debugger::GetPromptAnsiPrefix | ( | ) | const |
Definition at line 425 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetPromptAnsiSuffix | ( | ) | const |
Definition at line 431 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetRegexMatchAnsiPrefix | ( | ) | const |
Definition at line 643 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::CommandObjectApropos::DoExecute(), and LookupSymbolInModule().
| llvm::StringRef Debugger::GetRegexMatchAnsiSuffix | ( | ) | const |
Definition at line 649 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::CommandObjectApropos::DoExecute(), and LookupSymbolInModule().
| lldb::LanguageType Debugger::GetREPLLanguage | ( | ) | const |
Definition at line 470 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by RunREPL().
| ScriptInterpreter * Debugger::GetScriptInterpreter | ( | bool | can_create = true, |
| std::optional< lldb::ScriptLanguage > | language = {} ) |
Definition at line 1957 of file Debugger.cpp.
References lldb_private::PluginManager::GetScriptInterpreterForLanguage(), GetScriptLanguage(), m_script_interpreter_mutex, and m_script_interpreters.
Referenced by lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), CommandObjectScriptingObjectParsed::CommandObjectScriptingObjectParsed(), lldb_private::BreakpointOptions::CreateFromStructuredData(), lldb_private::BreakpointResolverScripted::CreateImplementationIfNeeded(), CommandObjectCommandsScriptAdd::DoExecute(), CommandObjectFrameRecognizerAdd::DoExecute(), CommandObjectPythonFunction::DoExecute(), CommandObjectScriptingExtensionGenerate::DoExecute(), CommandObjectScriptingObjectParsed::DoExecute(), CommandObjectScriptingObjectRaw::DoExecute(), CommandObjectScriptingRun::DoExecute(), CommandObjectTargetFrameProviderRegister::DoExecute(), CommandObjectScriptingObjectParsed::GetHelp(), CommandObjectScriptingObjectRaw::GetHelp(), CommandObjectPythonFunction::GetHelpLong(), CommandObjectScriptingObjectParsed::GetHelpLong(), CommandObjectScriptingObjectRaw::GetHelpLong(), GetPythonInterpreter(), CommandObjectScriptingObjectParsed::GetRepeatCommand(), CommandObjectScriptingObjectRaw::GetRepeatCommand(), CommandObjectScriptingObjectParsed::HandleArgumentCompletion(), CommandObjectScriptingObjectParsed::CommandOptions::HandleOptionArgumentCompletion(), CommandObjectCommandsScriptAdd::IOHandlerInputComplete(), CommandObjectTypeSummaryAdd::IOHandlerInputComplete(), CommandObjectTypeSynthAdd::IOHandlerInputComplete(), lldb_private::ModuleList::LoadScriptingResourceInTargetForModule(), lldb_private::PlatformDarwin::LocateExecutableScriptingResourcesFromDSYM(), lldb_private::Platform::LocateExecutableScriptingResourcesFromSafePaths(), CommandObjectTypeFilterAdd::CommandOptions::OptionParsingStarting(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), RunScriptFormatKeyword(), and lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction().
| lldb::ScriptLanguage Debugger::GetScriptLanguage | ( | ) | const |
Definition at line 458 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by GetScriptInterpreter(), lldb_private::ModuleList::LoadScriptingResourceInTargetForModule(), lldb_private::PlatformDarwin::LocateExecutableScriptingResourcesForPlatform(), and lldb_private::Platform::LocateExecutableScriptingResourcesFromSafePaths().
| ExecutionContext Debugger::GetSelectedExecutionContext | ( | bool | adopt_dummy_target | ) |
Get the execution context representing the selected entities in the selected target.
If no target is selected, the execution context will contain the dummy target if adopt_dummy_target is true.
Definition at line 1302 of file Debugger.cpp.
References GetSelectedExecutionContextRef().
Referenced by RestoreInputTerminalState().
| ExecutionContextRef Debugger::GetSelectedExecutionContextRef | ( | bool | adopt_dummy_target | ) |
Like GetSelectedExecutionContext but returns an ExecutionContextRef.
Definition at line 1307 of file Debugger.cpp.
References m_dummy_target_sp, and m_target_list.
Referenced by DefaultEventHandler(), GetSelectedExecutionContext(), and SetPropertyValue().
Definition at line 2526 of file Debugger.cpp.
References GetDummyTarget(), and m_target_list.
| llvm::StringRef Debugger::GetSeparator | ( | ) | const |
Definition at line 599 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| bool Debugger::GetShowDontUsePoHint | ( | ) | const |
Definition at line 655 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| bool Debugger::GetShowInlineDiagnostics | ( | ) | const |
Definition at line 791 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::CommandInterpreter::IOHandlerInputComplete().
| bool Debugger::GetShowProgress | ( | ) | const |
Definition at line 558 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by HandleProgressEvent().
| llvm::StringRef Debugger::GetShowProgressAnsiPrefix | ( | ) | const |
Definition at line 569 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetShowProgressAnsiSuffix | ( | ) | const |
Definition at line 575 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| bool Debugger::GetShowStatusline | ( | ) | const |
Definition at line 581 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by StatuslineSupported().
|
inline |
Definition at line 651 of file Debugger.h.
References m_source_file_cache.
Referenced by CommandObjectSourceCacheClear::DoExecute(), and CommandObjectSourceCacheDump::DoExecute().
| SourceManager & Debugger::GetSourceManager | ( | ) |
Definition at line 1973 of file Debugger.cpp.
References m_source_manager_up.
Referenced by lldb_private::Disassembler::PrintInstructions().
|
static |
Definition at line 1030 of file Debugger.cpp.
Referenced by Debugger(), and lldb::SBDebugger::GetBroadcasterClass().
| FormatEntity::Entry Debugger::GetStatuslineFormat | ( | ) | const |
Definition at line 587 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| lldb::StopDisassemblyType Debugger::GetStopDisassemblyDisplay | ( | ) | const |
Definition at line 726 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::GetStatus().
| uint64_t Debugger::GetStopDisassemblyMaxSize | ( | ) | const |
Definition at line 407 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| StopShowColumn Debugger::GetStopShowColumn | ( | ) | const |
Definition at line 688 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by CommandObjectSourceList::DoExecute().
| llvm::StringRef Debugger::GetStopShowColumnAnsiPrefix | ( | ) | const |
Definition at line 695 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetStopShowColumnAnsiSuffix | ( | ) | const |
Definition at line 701 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetStopShowLineMarkerAnsiPrefix | ( | ) | const |
Definition at line 707 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetStopShowLineMarkerAnsiSuffix | ( | ) | const |
Definition at line 713 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| uint64_t Debugger::GetStopSourceLineCount | ( | bool | before | ) | const |
Definition at line 719 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::GetStatus().
| uint64_t Debugger::GetTabSize | ( | ) | const |
Definition at line 773 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::REPL::GetIOHandler(), and lldb_private::REPL::IOHandlerFixIndentation().
|
inline |
Get accessor for the target list.
The target list is part of the global debugger object. This the single debugger shared instance to control where targets get created and to allow for tracking and searching for targets based on certain criteria.
Definition at line 220 of file Debugger.h.
References m_target_list.
Referenced by lldb_private::platform_gdb_server::PlatformRemoteGDBServer::Attach(), lldb_private::PlatformWindows::Attach(), PlatformPOSIX::Attach(), lldb_private::Platform::DoConnectProcess(), CommandObjectProcessAttach::DoExecute(), CommandObjectTargetCreate::DoExecute(), CommandObjectTargetDelete::DoExecute(), CommandObjectTargetSelect::DoExecute(), lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAcceleratorConnection(), lldb_private::Process::HandleProcessStateChangedEvent(), lldb_private::DebuggerStats::ResetStatistics(), and lldb_private::Target::SetLabel().
| uint64_t Debugger::GetTerminalHeight | ( | ) | const |
Definition at line 490 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by SetTerminalWidth().
| uint64_t Debugger::GetTerminalWidth | ( | ) | const |
Definition at line 480 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::CommandObjectDisassemble::DoExecute(), and SetTerminalHeight().
| FormatEntity::Entry Debugger::GetThreadFormat | ( | ) | const |
Definition at line 448 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::Thread::DumpUsingSettingsFormat().
|
static |
Shared thread pool. Use only with ThreadPoolTaskGroup.
Definition at line 2579 of file Debugger.cpp.
References g_thread_pool.
Referenced by lldb_private::SymbolLocator::DownloadSymbolFileAsync(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexImpl(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), lldb_private::DynamicLoaderDarwin::PreloadModulesFromImageInfos(), DynamicLoaderPOSIXDYLD::RefreshModules(), and lldb_private::Target::SetExecutableModule().
| FormatEntity::Entry Debugger::GetThreadStopFormat | ( | ) | const |
Definition at line 453 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::Thread::DumpUsingSettingsFormat().
| llvm::StringRef Debugger::GetTopIOHandlerControlSequence | ( | char | ch | ) |
Definition at line 1419 of file Debugger.cpp.
References m_io_handler_stack.
| bool Debugger::GetUseColor | ( | ) | const |
Definition at line 543 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), CompleteLineEntry(), lldb_private::CommandObjectApropos::DoExecute(), lldb_private::CommandObjectDisassemble::DoExecute(), lldb_private::FormatEntity::Formatter::Format(), lldb_private::CommandInterpreter::GetLLDBCommandsFromIOHandler(), lldb_private::CommandInterpreter::GetPythonCommandsFromIOHandler(), lldb_private::CommandInterpreter::HandleCommandsFromFile(), lldb_private::Options::HandleOptionCompletion(), lldb_private::REPL::IOHandlerInputComplete(), LookupSymbolInModule(), sddarwinlog_private::RunEnableCommand(), SetPrompt(), and SetPropertyValue().
| bool Debugger::GetUseExternalEditor | ( | ) | const |
Definition at line 521 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::Thread::GetStatus(), and lldb_private::Thread::SetSelectedFrameByIndexNoisily().
| bool Debugger::GetUseSourceCache | ( | ) | const |
Definition at line 661 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by SetPropertyValue().
|
protected |
Definition at line 1980 of file Debugger.cpp.
References GetAsyncOutputStream(), lldb_private::Breakpoint::BreakpointEventData::GetBreakpointEventTypeFromEvent(), lldb_private::Breakpoint::BreakpointEventData::GetBreakpointFromEvent(), and lldb_private::Breakpoint::BreakpointEventData::GetNumBreakpointLocationsFromEvent().
Referenced by DefaultEventHandler().
|
protected |
Definition at line 965 of file Debugger.cpp.
References lldb_private::Debugger::DestroyCallbackInfo::baton, lldb_private::Debugger::DestroyCallbackInfo::callback, lldb_private::UserID::GetID(), m_destroy_callback_mutex, and m_destroy_callbacks.
|
protected |
Definition at line 2472 of file Debugger.cpp.
References GetAsyncErrorStream(), and lldb_private::DiagnosticEventData::GetEventDataFromEvent().
Referenced by DefaultEventHandler().
|
protected |
Definition at line 2046 of file Debugger.cpp.
References lldb_private::Process::eBroadcastBitStateChanged, lldb_private::Process::eBroadcastBitSTDERR, lldb_private::Process::eBroadcastBitSTDOUT, lldb_private::Process::eBroadcastBitStructuredData, error(), lldb_private::StreamString::Flush(), FlushProcessOutput(), GetAsyncErrorStream(), GetAsyncOutputStream(), lldb_private::EventDataStructuredData::GetObjectFromEvent(), lldb_private::EventDataStructuredData::GetPluginFromEvent(), lldb_private::EventDataStructuredData::GetProcessFromEvent(), lldb_private::Process::ProcessEventData::GetProcessFromEvent(), lldb_private::Process::ProcessEventData::GetStateFromEvent(), lldb_private::StreamString::GetString(), lldb_private::Process::HandleProcessStateChangedEvent(), IsForwardingEvents(), lldb_private::Stream::PutChar(), SelectMostRelevantFrame, and lldb_private::StateIsStoppedState().
Referenced by DefaultEventHandler().
|
protected |
Definition at line 2410 of file Debugger.cpp.
References lldb_private::Debugger::ProgressReport::completed, lldb_private::ProgressEventData::GetEventDataFromEvent(), GetOutputStreamSP(), GetShowProgress(), lldb_private::Debugger::ProgressReport::id, IsEscapeCodeCapableTTY(), m_progress_reports, m_progress_reports_mutex, OSC_PROGRESS_INDETERMINATE, OSC_PROGRESS_REMOVE, OSC_PROGRESS_SHOW, TerminalSupportsOSCProgress(), lldb_private::Debugger::ProgressReport::total, and UINT64_MAX.
Referenced by DefaultEventHandler().
|
protected |
Definition at line 2131 of file Debugger.cpp.
References lldb_private::Thread::eBroadcastBitStackChanged, lldb_private::Thread::eBroadcastBitThreadSelected, GetAsyncOutputStream(), and lldb_private::Thread::ThreadEventData::GetThreadFromEvent().
Referenced by DefaultEventHandler().
|
protected |
Definition at line 2480 of file Debugger.cpp.
References m_io_handler_thread.
Referenced by IsIOHandlerThreadCurrentThread(), JoinIOHandlerThread(), and lldb_private::REPL::RunLoop().
|
static |
Definition at line 811 of file Debugger.cpp.
References g_debugger_list_ptr, g_load_plugin_callback, g_thread_pool, and GetDebuggerListMutex().
Referenced by lldb_private::SystemInitializerFull::Initialize().
|
protected |
Definition at line 915 of file Debugger.cpp.
References lldb_private::PluginManager::DebuggerInitialize(), lldb_private::FileSystem::EnumerateDirectory(), lldb_private::FileSystem::Instance(), LoadPluginCallback(), and PATH_MAX.
| bool Debugger::InterruptRequested | ( | ) |
Definition at line 1567 of file Debugger.cpp.
References GetCommandInterpreter(), IsIOHandlerThreadCurrentThread(), m_interrupt_mutex, m_interrupt_requested, and lldb_private::CommandInterpreter::WasInterrupted().
Referenced by InterruptRequested().
|
inline |
This is the correct way to query the state of Interruption.
If you are on the RunCommandInterpreter thread, it will check the command interpreter state, and if it is on another thread it will check the debugger Interrupt Request state.
| [in] | cur_func | For reporting if the interruption was requested. Don't provide this by hand, use INTERRUPT_REQUESTED so this gets done consistently. |
| [in] | formatv | A formatv string for the interrupt message. If the elements of the message are expensive to compute, you can use the no-argument form of InterruptRequested, then make up the report using REPORT_INTERRUPTION. |
Definition at line 485 of file Debugger.h.
References InterruptRequested(), and ReportInterruption().
|
protected |
Definition at line 2404 of file Debugger.cpp.
References RunIOHandlers(), and StopEventHandlerThread().
Referenced by StartIOHandlerThread().
|
protected |
Definition at line 2198 of file Debugger.cpp.
References lldb_private::File::GetIsInteractive(), lldb_private::File::GetIsRealTerminal(), lldb_private::File::GetIsTerminalWithColors(), and GetOutputStreamSP().
Referenced by HandleProgressEvent(), and StatuslineSupported().
| bool Debugger::IsForwardingEvents | ( | ) |
Definition at line 2148 of file Debugger.cpp.
References m_forward_listener_sp.
Referenced by HandleProcessEvent().
|
inline |
Definition at line 423 of file Debugger.h.
References m_event_handler_thread.
|
protected |
Definition at line 2520 of file Debugger.cpp.
References lldb_private::Host::GetCurrentThread(), HasIOHandlerThread(), and m_io_handler_thread.
Referenced by InterruptRequested().
| bool Debugger::IsTopIOHandler | ( | const lldb::IOHandlerSP & | reader_sp | ) |
Definition at line 1400 of file Debugger.cpp.
References m_io_handler_stack.
Referenced by lldb_private::Process::ProcessIOHandlerIsActive().
|
protected |
Definition at line 2512 of file Debugger.cpp.
References HasIOHandlerThread(), LLDB_INVALID_HOST_THREAD, and m_io_handler_thread.
Referenced by lldb_private::REPL::RunLoop().
Definition at line 853 of file Debugger.cpp.
References error(), lldb_private::Status::FromErrorString(), g_load_plugin_callback, and m_loaded_plugins.
Referenced by LoadPluginCallback().
References Debugger().
|
protected |
Definition at line 1512 of file Debugger.cpp.
References m_io_handler_stack.
Referenced by ClearIOHandlers(), RemoveIOHandler(), RunIOHandlers(), and RunIOHandlerSync().
| void Debugger::PrintAsync | ( | const char * | s, |
| size_t | len, | ||
| bool | is_stdout ) |
Definition at line 1409 of file Debugger.cpp.
References m_error_stream_sp, m_io_handler_stack, m_output_stream_sp, and lldb_private::Stream::Write().
|
protected |
|
protected |
Definition at line 1485 of file Debugger.cpp.
References m_io_handler_stack.
Referenced by RunIOHandlerAsync(), and RunIOHandlerSync().
| void Debugger::RedrawStatusline | ( | std::optional< ExecutionContextRef > | exe_ctx_ref | ) |
Redraw the statusline if enabled.
Definition at line 1282 of file Debugger.cpp.
References m_statusline, and m_statusline_mutex.
Referenced by DefaultEventHandler(), SetPropertyValue(), SetSeparator(), and SetStatuslineFormat().
| void Debugger::RefreshIOHandler | ( | ) |
Definition at line 1539 of file Debugger.cpp.
References m_io_handler_stack.
| bool Debugger::RemoveDestroyCallback | ( | lldb::callback_token_t | token | ) |
Remove the specified callback. Return true if successful.
Definition at line 1731 of file Debugger.cpp.
References m_destroy_callback_mutex, and m_destroy_callbacks.
| bool Debugger::RemoveIOHandler | ( | const lldb::IOHandlerSP & | reader_sp | ) |
Remove the given IO handler if it's currently active.
Definition at line 1431 of file Debugger.cpp.
References PopIOHandler().
Referenced by lldb_private::Process::PopProcessIOHandler().
|
staticprotected |
Definition at line 1819 of file Debugger.cpp.
References lldb_private::Diagnostics::Enabled(), lldb::eSeverityInfo, FindDebuggerWithID(), g_debugger_list_ptr, GetDebuggerListMutex(), lldb_private::Diagnostics::Instance(), PrivateReportDiagnostic(), lldb_private::Diagnostics::Record(), and lldb_private::Host::SystemLog().
Referenced by ReportError(), ReportInfo(), and ReportWarning().
|
static |
Report error events.
Error events will be delivered to any debuggers that have listeners for the eBroadcastBitError.
| [in] | message | The error message to be reported. |
| [in] | debugger_id | If this optional parameter has a value, it indicates the unique debugger identifier that this diagnostic should be delivered to. If this optional parameter does not have a value, the diagnostic event will be delivered to all debuggers. |
| [in] | once | If a pointer is passed to a std::once_flag, then it will be used to ensure the given error is only broadcast once. |
Definition at line 1866 of file Debugger.cpp.
References lldb::eSeverityError, and ReportDiagnosticImpl().
Referenced by AssertCallback(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::TargetProperties::CheckJITObjectsDir(), lldb_private::StructuredDataDarwinLog::EnableNow(), lldb_private::Function::GetBlock(), lldb_private::DWARFCallFrameInfo::GetFDEIndex(), lldb_private::Options::GetLongOptions(), lldb_private::PlatformMacOSX::GetSDKDirectory(), MachSymtabSectionInfo::GetSection(), GetXcodeSDKDir(), lldb_private::DWARFCallFrameInfo::ParseCIE(), ObjectFileMachO::ParseSymtab(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::StopInfoWatchpoint::PerformAction(), lldb_private::Module::RegisterXcodeSDK(), lldb_private::Module::ReportError(), lldb_private::Module::ReportErrorIfModifyDetected(), and lldb_private::CompactUnwindInfo::ScanIndex().
|
static |
Report info events.
Unlike warning and error events, info events are not broadcast but are logged for diagnostic purposes.
| [in] | message | The info message to be reported. |
| [in] | debugger_id | If this optional parameter has a value, it indicates this diagnostic is associated with a unique debugger instance. |
| [in] | once | If a pointer is passed to a std::once_flag, then it will be used to ensure the given info is only logged once. |
Definition at line 1872 of file Debugger.cpp.
References lldb::eSeverityInfo, and ReportDiagnosticImpl().
| void Debugger::ReportInterruption | ( | const InterruptionReport & | report | ) |
Definition at line 1588 of file Debugger.cpp.
References lldb_private::GetLog(), lldb_private::Host, LLDB_LOG, and lldb_private::Debugger::InterruptionReport::m_description.
Referenced by InterruptRequested().
|
staticprotected |
Report progress events.
Progress events will be delivered to any debuggers that have listeners for the eBroadcastBitProgress. This function is called by the lldb_private::Progress class to deliver the events to any debuggers that qualify.
| [in] | progress_id | The unique integer identifier for the progress to report. |
| [in] | message | The title of the progress dialog to display in the UI. |
| [in] | 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 compare to the total value. |
| [in] | 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. |
| [in] | debugger_id | If this optional parameter has a value, it indicates the unique debugger identifier that this progress should be delivered to. If this optional parameter does not have a value, the progress will be delivered to all debuggers. |
Definition at line 1759 of file Debugger.cpp.
References FindDebuggerWithID(), g_debugger_list_ptr, GetDebuggerListMutex(), and PrivateReportProgress().
Referenced by lldb_private::Progress::ReportProgress().
|
static |
Definition at line 1878 of file Debugger.cpp.
References lldb::eBroadcastSymbolChange, g_debugger_list_ptr, and GetDebuggerListMutex().
Referenced by lldb_private::SymbolLocator::DownloadSymbolFileAsync().
|
static |
Report warning events.
Warning events will be delivered to any debuggers that have listeners for the eBroadcastBitWarning.
| [in] | message | The warning message to be reported. |
| [in] | debugger_id | If this optional parameter has a value, it indicates the unique debugger identifier that this diagnostic should be delivered to. If this optional parameter does not have a value, the diagnostic event will be delivered to all debuggers. |
| [in] | once | If a pointer is passed to a std::once_flag, then it will be used to ensure the given warning is only broadcast once. |
Definition at line 1860 of file Debugger.cpp.
References lldb::eSeverityWarning, and ReportDiagnosticImpl().
Referenced by lldb_private::Target::AddScriptedFrameProviderDescriptor(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), InstrumentationBoundsSafetyStopInfo::ComputeStopReasonAndSuggestedStackFrameWithDebugInfo(), InstrumentationBoundsSafetyStopInfo::ComputeStopReasonAndSuggestedStackFrameWithoutDebugInfo(), lldb_private::TypeSystemClang::CreateASTContext(), lldb_private::SourceManager::DisplaySourceLinesWithLineNumbersUsingLastFile(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), lldb_private::MemoryHistoryASan::GetHistoryThreads(), lldb_private::SymbolContext::GetParentOfInlinedScope(), lldb_private::SymbolLocatorSymStore::Initialize(), InstrumentationBoundsSafetyStopInfo::InstrumentationBoundsSafetyStopInfo(), lldb_private::ModuleList::LoadScriptingResourceInTargetForModule(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::SymbolLocatorSymStore::ParseEnvSymbolPaths(), ObjectFileELF::ParseRISCVAttributes(), lldb_private::StopInfoBreakpoint::PerformAction(), RegisterContextCorePOSIX_riscv32::RegisterContextCorePOSIX_riscv32(), lldb_private::Module::ReportWarning(), lldb_private::Module::ReportWarningOptimization(), lldb_private::Module::ReportWarningUnsupportedLanguage(), lldb_private::InstrumentationRuntimeTSan::RetrieveReportData(), lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData(), lldb_private::ReportRetriever::RetrieveReportData(), lldb_private::DynamicLoaderDarwin::UnloadModuleSections(), and DisassemblerLLVMC::UpdateSubtargetFeatures().
| void Debugger::RequestInterrupt | ( | ) |
Interruption in LLDB:
This is a voluntary interruption mechanism, not preemptive. Parts of lldb that do work that can be safely interrupted call Debugger::InterruptRequested and if that returns true, they should return at a safe point, shortcutting the rest of the work they were to do.
lldb clients can both offer a CommandInterpreter (through RunCommandInterpreter) and use the SB API's for their own purposes, so it is convenient to separate "interrupting the CommandInterpreter execution" and interrupting the work it is doing with the SB API's. So there are two ways to cause an interrupt:
Since the two checks are mutually exclusive, however, it's also convenient to have just one function to check the interrupt state. Bump the "interrupt requested" count on the debugger to support cooperative interruption. If this is non-zero, InterruptRequested will return true. Interruptible operations are expected to query the InterruptRequested API periodically, and interrupt what they were doing if it returns true.
Definition at line 1556 of file Debugger.cpp.
References m_interrupt_mutex, and m_interrupt_requested.
| void Debugger::RestoreInputTerminalState | ( | ) |
Definition at line 1272 of file Debugger.cpp.
References GetSelectedExecutionContext(), m_statusline, m_statusline_mutex, and m_terminal_state.
| void Debugger::RunIOHandlerAsync | ( | const lldb::IOHandlerSP & | reader_sp, |
| bool | cancel_top_handler = true ) |
Run the given IO handler and return immediately.
Definition at line 1435 of file Debugger.cpp.
References PushIOHandler().
Referenced by lldb_private::CommandObjectGUI::DoExecute(), lldb_private::CommandInterpreter::GetLLDBCommandsFromIOHandler(), lldb_private::CommandInterpreter::GetPythonCommandsFromIOHandler(), lldb_private::ScriptInterpreterPythonImpl::Interrupt(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::Process::PushProcessIOHandler(), and lldb_private::REPL::RunLoop().
| void Debugger::RunIOHandlers | ( | ) |
Definition at line 1344 of file Debugger.cpp.
References ClearIOHandlers(), m_io_handler_stack, m_io_handler_synchronous_mutex, and PopIOHandler().
Referenced by IOHandlerThread().
| void Debugger::RunIOHandlerSync | ( | const lldb::IOHandlerSP & | reader_sp | ) |
Run the given IO handler and block until it's complete.
Definition at line 1369 of file Debugger.cpp.
References m_io_handler_stack, m_io_handler_synchronous_mutex, PopIOHandler(), and PushIOHandler().
Referenced by lldb_private::CommandInterpreter::HandleCommandsFromFile().
| Status Debugger::RunREPL | ( | lldb::LanguageType | language, |
| const char * | repl_options ) |
Definition at line 2534 of file Debugger.cpp.
References lldb_private::REPL::Create(), lldb::eLanguageTypeUnknown, lldb_private::LanguageSet::Empty(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::Language::GetLanguagesSupportingREPLs(), lldb_private::Language::GetNameForLanguageType(), GetREPLLanguage(), lldb_private::LanguageSet::GetSingularLanguage(), and lldb_private::Status::Success().
| void Debugger::SaveInputTerminalState | ( | ) |
Definition at line 1261 of file Debugger.cpp.
References lldb_private::File::GetDescriptor(), GetInputFile(), lldb_private::File::kInvalidDescriptor, m_statusline, m_statusline_mutex, and m_terminal_state.
Referenced by SetInputFile().
| void Debugger::SetAsyncExecution | ( | bool | async | ) |
Definition at line 1183 of file Debugger.cpp.
References m_command_interpreter_up.
Referenced by CommandObjectProcessContinue::DoExecute(), lldb_private::CommandInterpreter::HandleCommandsFromFile(), lldb_private::Target::HookCommandLine::HandleModuleLoaded(), lldb_private::Target::HookCommandLine::HandleStop(), lldb_private::Target::StopHookCommandLine::HandleStop(), lldb_private::StopInfoBreakpoint::PerformAction(), and lldb_private::StopInfoWatchpoint::PerformAction().
Definition at line 757 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
| void Debugger::SetDestroyCallback | ( | lldb_private::DebuggerDestroyCallback | destroy_callback, |
| void * | baton ) |
DEPRECATED: We used to only support one Destroy callback.
Now that we support Add and Remove, you should only remove callbacks that you added. Use Add and Remove instead.
Clear all previously added callbacks and only add the given one.
Definition at line 1715 of file Debugger.cpp.
References m_destroy_callback_mutex, m_destroy_callback_next_token, and m_destroy_callbacks.
| void Debugger::SetErrorFile | ( | lldb::FileSP | file | ) |
Definition at line 1255 of file Debugger.cpp.
References m_error_stream_sp, and m_output_mutex.
| bool Debugger::SetExternalEditor | ( | llvm::StringRef | editor | ) |
Definition at line 538 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
| void Debugger::SetInputFile | ( | lldb::FileSP | file | ) |
Definition at line 1241 of file Debugger.cpp.
References m_input_file_sp, and SaveInputTerminalState().
Referenced by SetInputString().
| Status Debugger::SetInputString | ( | const char * | data | ) |
Definition at line 1196 of file Debugger.cpp.
References lldb_private::File::eOpenOptionReadOnly, lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), OpenPipe(), READ, SetInputFile(), and WRITE.
|
protected |
Definition at line 2484 of file Debugger.cpp.
References m_io_handler_thread.
| void Debugger::SetLoggingCallback | ( | lldb::LogOutputCallback | log_callback, |
| void * | baton ) |
Definition at line 1692 of file Debugger.cpp.
References m_callback_handler_sp.
| void Debugger::SetOutputFile | ( | lldb::FileSP | file | ) |
Definition at line 1249 of file Debugger.cpp.
References m_output_mutex, and m_output_stream_sp.
Definition at line 768 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
|
delete |
| void Debugger::SetPrompt | ( | llvm::StringRef | p | ) |
Definition at line 437 of file Debugger.cpp.
References lldb_private::ansi::FormatAnsiTerminalCodes(), GetCommandInterpreter(), GetPrompt(), GetUseColor(), lldb_private::Properties::SetPropertyAtIndex(), and lldb_private::CommandInterpreter::UpdatePrompt().
Referenced by SetUseColor().
|
overridevirtual |
Reimplemented from lldb_private::Properties.
Definition at line 299 of file Debugger.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), lldb_private::CommandInterpreter::eBroadcastBitResetPrompt, lldb_private::eLoadScriptFromSymFileFalse, lldb_private::eLoadScriptFromSymFileTrue, lldb_private::eLoadScriptFromSymFileWarn, error(), lldb_private::DataVisualization::ForceUpdate(), lldb_private::ansi::FormatAnsiTerminalCodes(), GetAsyncErrorStream(), GetCommandInterpreter(), GetPrompt(), GetSelectedExecutionContextRef(), lldb_private::ExecutionContext::GetTargetSP(), GetUseColor(), GetUseSourceCache(), m_source_file_cache, m_statusline, m_statusline_mutex, RedrawStatusline(), lldb_private::Properties::SetPropertyValue(), SetUseColor(), StatuslineSupported(), and lldb_private::CommandInterpreter::UpdatePrompt().
| bool Debugger::SetREPLLanguage | ( | lldb::LanguageType | repl_lang | ) |
Definition at line 475 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
| bool Debugger::SetScriptLanguage | ( | lldb::ScriptLanguage | script_lang | ) |
Definition at line 465 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
| bool Debugger::SetSeparator | ( | llvm::StringRef | s | ) |
Definition at line 617 of file Debugger.cpp.
References RedrawStatusline(), and lldb_private::Properties::SetPropertyAtIndex().
Referenced by Debugger().
Definition at line 797 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
Definition at line 564 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
Referenced by lldb_private::REPL::REPL().
| bool Debugger::SetStatuslineFormat | ( | const FormatEntity::Entry & | format | ) |
Definition at line 592 of file Debugger.cpp.
References RedrawStatusline(), and lldb_private::Properties::SetPropertyAtIndex().
| bool Debugger::SetTabSize | ( | uint64_t | tab_size | ) |
Definition at line 779 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
| bool Debugger::SetTerminalDimensions | ( | uint64_t | term_width, |
| uint64_t | term_height ) |
Set the terminal width and height together, so observers are notified once with both dimensions current.
Definition at line 500 of file Debugger.cpp.
References m_io_handler_stack, m_statusline, m_statusline_mutex, and lldb_private::Properties::SetPropertyAtIndex().
Referenced by SetTerminalHeight(), and SetTerminalWidth().
| bool Debugger::SetTerminalHeight | ( | uint64_t | term_height | ) |
Definition at line 496 of file Debugger.cpp.
References GetTerminalWidth(), and SetTerminalDimensions().
| bool Debugger::SetTerminalWidth | ( | uint64_t | term_width | ) |
Definition at line 486 of file Debugger.cpp.
References GetTerminalHeight(), and SetTerminalDimensions().
|
static |
Definition at line 849 of file Debugger.cpp.
References lldb_private::Target::SettingsInitialize().
Referenced by lldb_private::SystemInitializerFull::Initialize().
|
static |
Definition at line 851 of file Debugger.cpp.
References lldb_private::Target::SettingsTerminate().
Referenced by lldb_private::SystemInitializerFull::Terminate().
Definition at line 549 of file Debugger.cpp.
References GetCommandInterpreter(), GetPrompt(), SetPrompt(), lldb_private::Properties::SetPropertyAtIndex(), and lldb_private::CommandInterpreter::UpdateUseColor().
Referenced by Debugger(), and SetPropertyValue().
Definition at line 527 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
Definition at line 667 of file Debugger.cpp.
References m_source_file_cache, and lldb_private::Properties::SetPropertyAtIndex().
| bool Debugger::StartEventHandlerThread | ( | ) |
Manually start the global event handler thread.
It is useful to plugins that directly use the lldb_private namespace and want to use the debugger's default event handler thread instead of defining their own.
Definition at line 2355 of file Debugger.cpp.
References lldb_private::ConstString::AsCString(), DefaultEventHandler(), eBroadcastBitEventThreadIsListening, g_debugger_event_thread_stack_bytes, lldb_private::ConstString::GetLength(), lldb_private::GetLog(), lldb_private::ConstString::GetStringRef(), lldb_private::Host, lldb_private::ThreadLauncher::LaunchThread(), LLDB_LOG_ERROR, m_event_handler_thread, m_sync_broadcaster, and lldb_private::Listener::MakeListener().
|
protected |
Definition at line 2490 of file Debugger.cpp.
References lldb_private::GetLog(), lldb_private::Host, IOHandlerThread(), lldb_private::ThreadLauncher::LaunchThread(), LLDB_LOG_ERROR, and m_io_handler_thread.
Referenced by lldb_private::REPL::RunLoop().
| bool Debugger::StatuslineSupported | ( | ) |
Whether the statusline can be drawn: show-statusline is enabled and the output is an escape-code-capable terminal.
Definition at line 2207 of file Debugger.cpp.
References GetShowStatusline(), and IsEscapeCodeCapableTTY().
Referenced by DefaultEventHandler(), and SetPropertyValue().
| void Debugger::StopEventHandlerThread | ( | ) |
Manually stop the debugger's default event handler.
Definition at line 2396 of file Debugger.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), lldb_private::CommandInterpreter::eBroadcastBitQuitCommandReceived, GetCommandInterpreter(), and m_event_handler_thread.
Referenced by Clear(), and IOHandlerThread().
|
protected |
Definition at line 2505 of file Debugger.cpp.
References lldb_private::File::Close(), GetInputFile(), and m_io_handler_thread.
Referenced by Clear().
|
static |
Definition at line 820 of file Debugger.cpp.
References g_debugger_list_ptr, g_thread_pool, and GetDebuggerListMutex().
Referenced by lldb_private::SystemInitializerFull::Terminate().
|
friend |
Definition at line 666 of file Debugger.h.
References CommandInterpreter.
Referenced by CommandInterpreter, Debugger(), DefaultEventHandler(), Destroy(), and GetCommandInterpreter().
|
friend |
|
friend |
Definition at line 669 of file Debugger.h.
References ProgressManager.
Referenced by ProgressManager.
|
friend |
|
friend |
Definition at line 670 of file Debugger.h.
References lldb::eBroadcastBitProgress, and Statusline.
Referenced by Statusline.
|
staticprotected |
Definition at line 805 of file Debugger.h.
Referenced by Initialize(), and LoadPlugin().
|
protected |
Public Debugger event broadcaster.
Definition at line 811 of file Debugger.h.
Referenced by Debugger(), DefaultEventHandler(), GetBroadcaster(), and GetBroadcaster().
|
protected |
Definition at line 769 of file Debugger.h.
Referenced by Clear(), Debugger(), DefaultEventHandler(), and GetBroadcasterManager().
|
protected |
Definition at line 803 of file Debugger.h.
Referenced by Debugger(), EnableLog(), and SetLoggingCallback().
|
protected |
Definition at line 813 of file Debugger.h.
Referenced by Clear(), and Debugger().
|
protected |
Definition at line 789 of file Debugger.h.
Referenced by Clear(), Debugger(), DefaultEventHandler(), GetAsyncExecution(), GetCommandInterpreter(), and SetAsyncExecution().
|
protected |
Definition at line 822 of file Debugger.h.
Referenced by AddDestroyCallback(), HandleDestroyCallback(), RemoveDestroyCallback(), and SetDestroyCallback().
|
protected |
Definition at line 823 of file Debugger.h.
Referenced by AddDestroyCallback(), and SetDestroyCallback().
|
protected |
Definition at line 834 of file Debugger.h.
Referenced by AddDestroyCallback(), HandleDestroyCallback(), RemoveDestroyCallback(), and SetDestroyCallback().
|
protected |
Definition at line 814 of file Debugger.h.
Referenced by Debugger(), GetDummyTarget(), and GetSelectedExecutionContextRef().
|
protected |
Definition at line 766 of file Debugger.h.
Referenced by Debugger(), GetErrorFileSP(), GetErrorStreamSP(), PrintAsync(), and SetErrorFile().
|
protected |
Definition at line 808 of file Debugger.h.
Referenced by Debugger(), IsHandlingEvents(), StartEventHandlerThread(), and StopEventHandlerThread().
|
protected |
Definition at line 812 of file Debugger.h.
Referenced by CancelForwardEvents(), Debugger(), DefaultEventHandler(), EnableForwardEvents(), and IsForwardingEvents().
|
protected |
Definition at line 764 of file Debugger.h.
Referenced by Debugger(), GetInputFile(), GetInputFileSP(), and SetInputFile().
|
protected |
Definition at line 804 of file Debugger.h.
Referenced by Debugger(), and GetInstanceName().
|
protected |
Definition at line 837 of file Debugger.h.
Referenced by CancelInterruptRequest(), InterruptRequested(), and RequestInterrupt().
|
protected |
Tracks interrupt requests.
Definition at line 836 of file Debugger.h.
Referenced by CancelInterruptRequest(), InterruptRequested(), and RequestInterrupt().
|
protected |
Definition at line 795 of file Debugger.h.
Referenced by AdoptTopIOHandlerFilesIfInvalid(), CheckTopIOHandlerTypes(), ClearIOHandlers(), Debugger(), DispatchInputEndOfFile(), DispatchInputInterrupt(), GetIOHandlerCommandPrefix(), GetIOHandlerHelpPrologue(), GetTopIOHandlerControlSequence(), IsTopIOHandler(), PopIOHandler(), PrintAsync(), PushIOHandler(), RefreshIOHandler(), RunIOHandlers(), RunIOHandlerSync(), and SetTerminalDimensions().
|
protected |
Definition at line 796 of file Debugger.h.
Referenced by RunIOHandlers(), and RunIOHandlerSync().
|
protected |
Definition at line 809 of file Debugger.h.
Referenced by Debugger(), HasIOHandlerThread(), IsIOHandlerThreadCurrentThread(), JoinIOHandlerThread(), SetIOHandlerThread(), StartIOHandlerThread(), and StopIOHandlerThread().
|
protected |
Definition at line 779 of file Debugger.h.
Referenced by Clear(), Debugger(), and GetListener().
|
protected |
Definition at line 807 of file Debugger.h.
Referenced by Debugger(), and LoadPlugin().
|
protected |
Definition at line 759 of file Debugger.h.
Referenced by FlushProcessOutput().
|
protected |
Definition at line 767 of file Debugger.h.
Referenced by AdoptTopIOHandlerFilesIfInvalid(), Debugger(), SetErrorFile(), and SetOutputFile().
|
protected |
Definition at line 765 of file Debugger.h.
Referenced by Debugger(), GetOutputFileSP(), GetOutputStreamSP(), PrintAsync(), and SetOutputFile().
|
protected |
Definition at line 778 of file Debugger.h.
Referenced by Debugger(), and GetPlatformList().
|
protected |
Bookkeeping for command line progress events.
Definition at line 818 of file Debugger.h.
Referenced by GetCurrentProgressReport(), and HandleProgressEvent().
|
mutableprotected |
Definition at line 819 of file Debugger.h.
Referenced by GetCurrentProgressReport(), and HandleProgressEvent().
|
protected |
Definition at line 791 of file Debugger.h.
Referenced by GetScriptInterpreter().
|
protected |
Definition at line 793 of file Debugger.h.
Referenced by GetScriptInterpreter().
|
protected |
Definition at line 784 of file Debugger.h.
Referenced by Debugger(), GetSourceFileCache(), SetPropertyValue(), and SetUseSourceCache().
|
protected |
Definition at line 780 of file Debugger.h.
Referenced by Debugger(), and GetSourceManager().
|
protected |
Definition at line 800 of file Debugger.h.
Referenced by DefaultEventHandler(), FlushStatusLine(), RedrawStatusline(), RestoreInputTerminalState(), SaveInputTerminalState(), SetPropertyValue(), and SetTerminalDimensions().
|
protected |
Mutex protecting the m_statusline member.
Definition at line 799 of file Debugger.h.
Referenced by DefaultEventHandler(), FlushStatusLine(), RedrawStatusline(), RestoreInputTerminalState(), SaveInputTerminalState(), SetPropertyValue(), and SetTerminalDimensions().
|
protected |
Definition at line 802 of file Debugger.h.
Referenced by CopyLogFilesToDirectory(), and EnableLog().
|
protected |
Private debugger synchronization.
Definition at line 810 of file Debugger.h.
Referenced by Debugger(), DefaultEventHandler(), and StartEventHandlerThread().
|
protected |
Definition at line 776 of file Debugger.h.
Referenced by Clear(), Debugger(), GetSelectedExecutionContextRef(), GetSelectedOrDummyTarget(), and GetTargetList().
|
protected |
Definition at line 775 of file Debugger.h.
Referenced by Clear(), Debugger(), RestoreInputTerminalState(), and SaveInputTerminalState().