|
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> |
| using | DebuggerIterable = LockingAdaptedIterable<std::mutex, DebuggerList> |
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. | |
| TargetGroupList & | GetTargetGroupList () |
| 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 | GetLabelAnsiPrefix () const |
| llvm::StringRef | GetLabelAnsiSuffix () const |
| llvm::StringRef | GetTitleAnsiPrefix () const |
| llvm::StringRef | GetTitleAnsiSuffix () const |
| llvm::StringRef | GetDividerAnsiPrefix () const |
| llvm::StringRef | GetDividerAnsiSuffix () 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 |
| StringPoolRef | GetStringPool () const |
| The pool for strings handed out through the SB API that belong to this debugger. | |
| 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 () |
| Discard the statusline's cached frame at its next redraw. | |
| 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 () |
| bool | ShouldSuggestBugReport (llvm::StringRef failure) |
Returns true the first time this debugger sees failure while diagnostics.suggest-bugreport is on. | |
| void | SuggestBugReport (llvm::StringRef failure, Stream &strm) |
Writes the 'bugreport' note to strm if ShouldSuggestBugReport. | |
| 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, bool include_deprecated) const |
| void | Apropos (llvm::StringRef keyword, std::vector< const Property * > &matching_properties, std::vector< const Property * > &matching_property_paths) const |
| std::optional< std::string > | GetDeprecationWarning (llvm::StringRef property_path) const |
| The warning to show when the setting at property_path is changed, or std::nullopt if that setting isn't deprecated. | |
| 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 DebuggerIterable | Debuggers () |
| Get locking iterator for debuggers. | |
| 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 | ReportInternalError (std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr) |
| Report an error that may be a bug in LLDB. | |
| 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, bool internal_error=false) |
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 104 of file Debugger.h.
| using lldb_private::Debugger::DebuggerIterable = LockingAdaptedIterable<std::mutex, DebuggerList> |
Definition at line 109 of file Debugger.h.
| using lldb_private::Debugger::DebuggerList = std::vector<lldb::DebuggerSP> |
Definition at line 108 of file Debugger.h.
|
protected |
Definition at line 860 of file Debugger.h.
|
protected |
| Enumerator | |
|---|---|
| eBroadcastBitEventThreadIsListening | |
Definition at line 894 of file Debugger.h.
|
override |
Definition at line 1175 of file Debugger.cpp.
References Clear().
|
private |
Definition at line 1072 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_group_list, 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 1767 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 1474 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 1726 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 2219 of file Debugger.cpp.
References m_forward_listener_sp.
| void Debugger::CancelInterruptRequest | ( | ) |
Decrement the "interrupt requested" counter.
Definition at line 1595 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 1438 of file Debugger.cpp.
References m_io_handler_stack.
Referenced by lldb_private::REPL::IOHandlerInputComplete().
| void Debugger::Clear | ( | ) |
Definition at line 1177 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_group_list, m_target_list, m_terminal_state, StopEventHandlerThread(), and StopIOHandlerThread().
Referenced by ~Debugger().
| void Debugger::ClearIOHandlers | ( | ) |
Definition at line 1367 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 1746 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 978 of file Debugger.cpp.
References Debugger(), g_debugger_list_ptr, GetDebuggerListMutex(), lldb_private::Language::GetVersionWithLanguageInfo(), and lldb_private::telemetry::DebuggerInfo::lldb_version.
Referenced by lldb_private::mcp::DebuggerCreateTool::Call(), and lldb::SBDebugger::Create().
|
static |
Get locking iterator for debuggers.
Definition at line 1659 of file Debugger.cpp.
References g_debugger_list_ptr, and GetDebuggerListMutex().
|
static |
Definition at line 1628 of file Debugger.cpp.
References g_debugger_list_ptr, and GetDebuggerListMutex().
Referenced by DebuggersOwningModuleRequestingInterruption().
|
protected |
Definition at line 2287 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 1022 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 996 of file Debugger.cpp.
References lldb_private::telemetry::TelemetryManager::DispatchClientTelemetry(), and lldb_private::telemetry::TelemetryManager::GetInstance().
| void Debugger::DispatchInputEndOfFile | ( | ) |
Definition at line 1360 of file Debugger.cpp.
References m_io_handler_stack.
| void Debugger::DispatchInputInterrupt | ( | ) |
Definition at line 1353 of file Debugger.cpp.
References m_io_handler_stack.
| void Debugger::EnableForwardEvents | ( | const lldb::ListenerSP & | listener_sp | ) |
Definition at line 2215 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 1972 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 1667 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 1054 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 2091 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 | ( | ) |
Discard the statusline's cached frame at its next redraw.
This function is thread-safe and takes no lock, so callers may hold the target API mutex.
Definition at line 1333 of file Debugger.cpp.
References m_flush_statusline.
Referenced by lldb_private::Process::Flush().
|
static |
Definition at line 1680 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 1585 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(), DynamicLoaderDarwinKernel::KextImageInfo::FindKernel(), FlushProcessOutput(), HandleDiagnosticEvent(), HandleProcessEvent(), ProcessMachCore::LoadBinariesViaMetadata(), lldb_private::DynamicLoader::LoadBinaryInTarget(), ProcessMachCore::LoadBinaryViaLowmemUUID(), ObjectFileMachO::LoadCoreFileImages(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadStubBinaries(), lldb_private::Target::ModulesDidLoad(), PrivateReportDiagnostic(), SetPropertyValue(), and lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction().
| bool Debugger::GetAsyncExecution | ( | ) |
Definition at line 1217 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 1580 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(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadLocatedImage(), lldb_private::StopInfoWatchpoint::PerformAction(), DynamicLoaderDarwinKernel::KextImageInfo::PrepareSearch(), ProcessFreeBSDKernelCore::PrintUnreadMessage(), and ObjectFileMachO::SaveCore().
| bool Debugger::GetAutoConfirm | ( | ) | const |
Definition at line 387 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| bool Debugger::GetAutoIndent | ( | ) | const |
Definition at line 788 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::REPL::GetIOHandler().
| bool Debugger::GetAutoOneLineSummaries | ( | ) | const |
Definition at line 776 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetAutosuggestionAnsiPrefix | ( | ) | const |
Definition at line 668 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::IOHandlerEditline::IOHandlerEditline().
| llvm::StringRef Debugger::GetAutosuggestionAnsiSuffix | ( | ) | const |
Definition at line 674 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::IOHandlerEditline::IOHandlerEditline().
| AutosuggestionMode Debugger::GetAutosuggestionMode | ( | ) | const |
Definition at line 661 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 114 of file Debugger.h.
References m_broadcaster.
Referenced by PrivateReportDiagnostic(), and PrivateReportProgress().
|
inline |
Definition at line 115 of file Debugger.h.
References m_broadcaster.
|
inline |
Definition at line 576 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 2669 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 192 of file Debugger.h.
References CommandInterpreter, and m_command_interpreter_up.
Referenced by lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), CaptureCommand(), lldb_private::StructuredDataDarwinLog::DebuggerInitialize(), lldb_private::TypeSystemClang::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 2529 of file Debugger.cpp.
References m_progress_reports, and m_progress_reports_mutex.
|
static |
Definition at line 1648 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 238 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 642 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetDisabledAnsiSuffix | ( | ) | const |
Definition at line 648 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| FormatEntity::Entry Debugger::GetDisassemblyFormat | ( | ) | const |
Definition at line 393 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 770 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::GetStatus().
| llvm::StringRef Debugger::GetDividerAnsiPrefix | ( | ) | const |
Definition at line 606 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by CommandObjectScriptingExtensionList::GetSeparator().
| llvm::StringRef Debugger::GetDividerAnsiSuffix | ( | ) | const |
Definition at line 612 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by CommandObjectScriptingExtensionList::GetSeparator().
|
inline |
Definition at line 574 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 821 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::CommandObjectDWIMPrint::DoExecute().
|
inline |
Definition at line 172 of file Debugger.h.
References m_error_stream_sp.
Referenced by IOHandlerLuaInterpreter::IOHandlerLuaInterpreter(), and lldb_private::ScriptInterpreterIORedirect::ScriptInterpreterIORedirect().
|
inlineprotected |
Definition at line 767 of file Debugger.h.
References m_error_stream_sp.
Referenced by AdoptTopIOHandlerFilesIfInvalid().
| bool Debugger::GetEscapeNonPrintables | ( | ) | const |
Definition at line 782 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetExternalEditor | ( | ) | const |
Definition at line 533 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 398 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::DumpUsingSettingsFormat().
| FormatEntity::Entry Debugger::GetFrameFormatUnique | ( | ) | const |
Definition at line 403 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::DumpUsingSettingsFormat().
| bool Debugger::GetHighlightSource | ( | ) | const |
Definition at line 719 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
|
inline |
Definition at line 166 of file Debugger.h.
References m_input_file_sp.
Referenced by Clear(), SaveInputTerminalState(), and StopIOHandlerThread().
|
inline |
Definition at line 165 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 431 of file Debugger.h.
References m_instance_name.
Referenced by lldb_private::mcp::DebuggerResourceProvider::GetDebuggerResource().
| const char * Debugger::GetIOHandlerCommandPrefix | ( | ) |
Definition at line 1457 of file Debugger.cpp.
References m_io_handler_stack.
Referenced by lldb_private::CommandInterpreter::GetCommandPrefix().
| const char * Debugger::GetIOHandlerHelpPrologue | ( | ) |
Definition at line 1461 of file Debugger.cpp.
References m_io_handler_stack.
| llvm::StringRef Debugger::GetLabelAnsiPrefix | ( | ) | const |
Definition at line 582 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::ScriptedInstanceGroup::Dump(), and CommandObjectScriptingExtensionList::OutputTextFormat().
| llvm::StringRef Debugger::GetLabelAnsiSuffix | ( | ) | const |
Definition at line 588 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::ScriptedInstanceGroup::Dump(), and CommandObjectScriptingExtensionList::OutputTextFormat().
|
inline |
Definition at line 201 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 713 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 414 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::REPL::IOHandlerInputComplete().
|
static |
Definition at line 1640 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 168 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 766 of file Debugger.h.
References m_output_stream_sp.
Referenced by AdoptTopIOHandlerFilesIfInvalid(), HandleProgressEvent(), and IsEscapeCodeCapableTTY().
|
inline |
Definition at line 234 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 799 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::REPL::IOHandlerInputComplete().
| llvm::StringRef Debugger::GetPrompt | ( | ) | const |
Definition at line 420 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 426 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetPromptAnsiSuffix | ( | ) | const |
Definition at line 432 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetRegexMatchAnsiPrefix | ( | ) | const |
Definition at line 680 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 686 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 471 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 2022 of file Debugger.cpp.
References lldb_private::PluginManager::GetScriptInterpreterForLanguage(), GetScriptLanguage(), m_script_interpreter_mutex, and m_script_interpreters.
Referenced by lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), lldb_private::BreakpointOptions::CreateFromStructuredData(), lldb_private::BreakpointResolverScripted::CreateImplementationIfNeeded(), CommandObjectCommandsScriptAdd::DoExecute(), CommandObjectFrameRecognizerAdd::DoExecute(), CommandObjectPythonFunction::DoExecute(), CommandObjectScriptingExtensionGenerate::DoExecute(), CommandObjectScriptingRun::DoExecute(), CommandObjectTargetFrameProviderRegister::DoExecute(), CommandObjectPythonFunction::GetHelpLong(), GetPythonInterpreter(), 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 459 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 1336 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 1341 of file Debugger.cpp.
References m_dummy_target_sp, and m_target_list.
Referenced by DefaultEventHandler(), GetSelectedExecutionContext(), and SetPropertyValue().
Definition at line 2590 of file Debugger.cpp.
References GetDummyTarget(), and m_target_list.
| llvm::StringRef Debugger::GetSeparator | ( | ) | const |
Definition at line 636 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| bool Debugger::GetShowDontUsePoHint | ( | ) | const |
Definition at line 692 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| bool Debugger::GetShowInlineDiagnostics | ( | ) | const |
Definition at line 828 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::CommandInterpreter::IOHandlerInputComplete().
| bool Debugger::GetShowProgress | ( | ) | const |
Definition at line 559 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by HandleProgressEvent().
| llvm::StringRef Debugger::GetShowProgressAnsiPrefix | ( | ) | const |
Definition at line 570 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetShowProgressAnsiSuffix | ( | ) | const |
Definition at line 576 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| bool Debugger::GetShowStatusline | ( | ) | const |
Definition at line 618 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by StatuslineSupported().
|
inline |
Definition at line 697 of file Debugger.h.
References m_source_file_cache.
Referenced by CommandObjectSourceCacheClear::DoExecute(), and CommandObjectSourceCacheDump::DoExecute().
| SourceManager & Debugger::GetSourceManager | ( | ) |
Definition at line 2038 of file Debugger.cpp.
References m_source_manager_up.
Referenced by lldb_private::Disassembler::PrintInstructions().
|
static |
Definition at line 1067 of file Debugger.cpp.
Referenced by Debugger(), and lldb::SBDebugger::GetBroadcasterClass().
| FormatEntity::Entry Debugger::GetStatuslineFormat | ( | ) | const |
Definition at line 624 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| lldb::StopDisassemblyType Debugger::GetStopDisassemblyDisplay | ( | ) | const |
Definition at line 763 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::GetStatus().
| uint64_t Debugger::GetStopDisassemblyMaxSize | ( | ) | const |
Definition at line 408 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| StopShowColumn Debugger::GetStopShowColumn | ( | ) | const |
Definition at line 725 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by CommandObjectSourceList::DoExecute().
| llvm::StringRef Debugger::GetStopShowColumnAnsiPrefix | ( | ) | const |
Definition at line 732 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetStopShowColumnAnsiSuffix | ( | ) | const |
Definition at line 738 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetStopShowLineMarkerAnsiPrefix | ( | ) | const |
Definition at line 744 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| llvm::StringRef Debugger::GetStopShowLineMarkerAnsiSuffix | ( | ) | const |
Definition at line 750 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
| uint64_t Debugger::GetStopSourceLineCount | ( | bool | before | ) | const |
Definition at line 756 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::StackFrame::GetStatus().
|
inline |
The pool for strings handed out through the SB API that belong to this debugger.
Definition at line 435 of file Debugger.h.
References m_string_pool.
Referenced by lldb_private::GetDebuggerStringPool().
| uint64_t Debugger::GetTabSize | ( | ) | const |
Definition at line 810 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::REPL::GetIOHandler(), and lldb_private::REPL::IOHandlerFixIndentation().
|
inline |
Definition at line 232 of file Debugger.h.
References m_target_group_list.
Referenced by CommandObjectTargetGroupsList::DoExecute(), and lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAcceleratorConnection().
|
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 230 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(), CommandObjectTargetGroupsList::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 491 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by SetTerminalWidth().
| uint64_t Debugger::GetTerminalWidth | ( | ) | const |
Definition at line 481 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::CommandObjectDisassemble::DoExecute(), CommandObjectScriptingExtensionList::GetSeparator(), and SetTerminalHeight().
| FormatEntity::Entry Debugger::GetThreadFormat | ( | ) | const |
Definition at line 449 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 2643 of file Debugger.cpp.
References g_thread_pool.
Referenced by lldb_private::SymbolLocator::DownloadSymbolFileAsync(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexImpl(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), lldb_private::SymbolLocator::Locate(), lldb_private::DynamicLoaderDarwin::PreloadModulesFromImageInfos(), lldb_private::Target::RebuildModuleListWithExecutable(), and DynamicLoaderPOSIXDYLD::RefreshModules().
| FormatEntity::Entry Debugger::GetThreadStopFormat | ( | ) | const |
Definition at line 454 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::Thread::DumpUsingSettingsFormat().
| llvm::StringRef Debugger::GetTitleAnsiPrefix | ( | ) | const |
Definition at line 594 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::ScriptedInstanceGroup::Dump(), and CommandObjectScriptingExtensionList::OutputTextFormat().
| llvm::StringRef Debugger::GetTitleAnsiSuffix | ( | ) | const |
Definition at line 600 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by lldb_private::ScriptedInstanceGroup::Dump(), and CommandObjectScriptingExtensionList::OutputTextFormat().
| llvm::StringRef Debugger::GetTopIOHandlerControlSequence | ( | char | ch | ) |
Definition at line 1453 of file Debugger.cpp.
References m_io_handler_stack.
| bool Debugger::GetUseColor | ( | ) | const |
Definition at line 544 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 522 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 698 of file Debugger.cpp.
References lldb_private::Properties::GetPropertyAtIndexAs().
Referenced by SetPropertyValue().
|
protected |
Definition at line 2045 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 1002 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 2536 of file Debugger.cpp.
References GetAsyncErrorStream(), and lldb_private::DiagnosticEventData::GetEventDataFromEvent().
Referenced by DefaultEventHandler().
|
protected |
Definition at line 2111 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 2474 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 2196 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 2544 of file Debugger.cpp.
References m_io_handler_thread.
Referenced by IsIOHandlerThreadCurrentThread(), JoinIOHandlerThread(), and lldb_private::REPL::RunLoop().
|
static |
Definition at line 848 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 952 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 1601 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 515 of file Debugger.h.
References InterruptRequested(), and ReportInterruption().
|
protected |
Definition at line 2468 of file Debugger.cpp.
References RunIOHandlers(), and StopEventHandlerThread().
Referenced by StartIOHandlerThread().
|
protected |
Definition at line 2263 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 2213 of file Debugger.cpp.
References m_forward_listener_sp.
Referenced by HandleProcessEvent().
|
inline |
Definition at line 451 of file Debugger.h.
References m_event_handler_thread.
|
protected |
Definition at line 2584 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 1434 of file Debugger.cpp.
References m_io_handler_stack.
Referenced by lldb_private::Process::ProcessIOHandlerIsActive().
|
protected |
Definition at line 2576 of file Debugger.cpp.
References HasIOHandlerThread(), LLDB_INVALID_HOST_THREAD, and m_io_handler_thread.
Referenced by lldb_private::REPL::RunLoop().
Definition at line 890 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 1546 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 1443 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 1519 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 1320 of file Debugger.cpp.
References m_flush_statusline, m_statusline, and m_statusline_mutex.
Referenced by DefaultEventHandler(), SetPropertyValue(), SetSeparator(), and SetStatuslineFormat().
| void Debugger::RefreshIOHandler | ( | ) |
Definition at line 1573 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 1775 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 1465 of file Debugger.cpp.
References PopIOHandler().
Referenced by lldb_private::Process::PopProcessIOHandler().
|
staticprotected |
Definition at line 1866 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(), ReportInternalError(), 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 1914 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::BreakpointResolverScripted::CreateImplementationIfNeeded(), lldb_private::ScriptedProcess::CreateInstance(), lldb_private::ScriptedThreadPlan::DidPush(), lldb_private::ScriptedProcess::DoUpdateThreadList(), lldb_private::StructuredDataDarwinLog::EnableNow(), lldb_private::Function::GetBlock(), lldb_private::DWARFCallFrameInfo::GetFDEIndex(), lldb_private::Options::GetLongOptions(), MachSymtabSectionInfo::GetSection(), GetXcodeSDKDir(), lldb_private::ScriptedThread::LoadArtificialStackFrames(), 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(), ReportScriptedHookError(), lldb_private::CompactUnwindInfo::ScanIndex(), lldb_private::ScriptedFrame::ScriptedFrame(), and lldb_private::ScriptedStackFrameRecognizer::ScriptedStackFrameRecognizer().
|
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 1937 of file Debugger.cpp.
References lldb::eSeverityInfo, and ReportDiagnosticImpl().
|
static |
Report an error that may be a bug in LLDB.
Like ReportError, but each debugger follows the error with a note suggesting the 'bugreport' command, see ShouldSuggestBugReport.
Definition at line 1920 of file Debugger.cpp.
References lldb::eSeverityError, and ReportDiagnosticImpl().
Referenced by lldb_private::TypeSystemClang::GetObjCBitSize(), and lldb_private::Module::ReportError().
| void Debugger::ReportInterruption | ( | const InterruptionReport & | report | ) |
Definition at line 1622 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 1803 of file Debugger.cpp.
References FindDebuggerWithID(), g_debugger_list_ptr, GetDebuggerListMutex(), and PrivateReportProgress().
Referenced by lldb_private::Progress::ReportProgress().
|
static |
Definition at line 1943 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 1908 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(), RegisterContextELFCore_riscv32::RegisterContextELFCore_riscv32(), lldb_private::Module::ReportWarning(), lldb_private::Module::ReportWarningOptimization(), lldb_private::Module::ReportWarningUnsupportedLanguage(), lldb_private::InstrumentationRuntimeASan::RetrieveReportData(), lldb_private::InstrumentationRuntimeTSan::RetrieveReportData(), lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData(), lldb::SBDebugger::SetInternalVariable(), lldb_private::DynamicLoaderDarwin::UnloadModuleSections(), DisassemblerLLVMC::UpdateSubtargetFeatures(), and lldb_private::ValueObjectSynthetic::WarnAboutForeignChild().
| 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 1590 of file Debugger.cpp.
References m_interrupt_mutex, and m_interrupt_requested.
| void Debugger::RestoreInputTerminalState | ( | ) |
Definition at line 1310 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 1469 of file Debugger.cpp.
References PushIOHandler().
Referenced by lldb_private::CommandObjectGUI::DoExecute(), lldb_private::CommandInterpreter::GetLLDBCommandsFromIOHandler(), lldb_private::CommandInterpreter::GetPythonCommandsFromIOHandler(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::Process::PushProcessIOHandler(), and lldb_private::REPL::RunLoop().
| void Debugger::RunIOHandlers | ( | ) |
Definition at line 1378 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 1403 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 2598 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 1299 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 1221 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 794 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 1759 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 1293 of file Debugger.cpp.
References m_error_stream_sp, and m_output_mutex.
| bool Debugger::SetExternalEditor | ( | llvm::StringRef | editor | ) |
Definition at line 539 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
| void Debugger::SetInputFile | ( | lldb::FileSP | file | ) |
Definition at line 1279 of file Debugger.cpp.
References m_input_file_sp, and SaveInputTerminalState().
Referenced by SetInputString().
| Status Debugger::SetInputString | ( | const char * | data | ) |
Definition at line 1234 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 2548 of file Debugger.cpp.
References m_io_handler_thread.
| void Debugger::SetLoggingCallback | ( | lldb::LogOutputCallback | log_callback, |
| void * | baton ) |
Definition at line 1736 of file Debugger.cpp.
References m_callback_handler_sp.
| void Debugger::SetOutputFile | ( | lldb::FileSP | file | ) |
Definition at line 1287 of file Debugger.cpp.
References m_output_mutex, and m_output_stream_sp.
Definition at line 805 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
|
delete |
| void Debugger::SetPrompt | ( | llvm::StringRef | p | ) |
Definition at line 438 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 300 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 476 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
| bool Debugger::SetScriptLanguage | ( | lldb::ScriptLanguage | script_lang | ) |
Definition at line 466 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
| bool Debugger::SetSeparator | ( | llvm::StringRef | s | ) |
Definition at line 654 of file Debugger.cpp.
References RedrawStatusline(), and lldb_private::Properties::SetPropertyAtIndex().
Referenced by Debugger().
Definition at line 834 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
Definition at line 565 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 629 of file Debugger.cpp.
References RedrawStatusline(), and lldb_private::Properties::SetPropertyAtIndex().
| bool Debugger::SetTabSize | ( | uint64_t | tab_size | ) |
Definition at line 816 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 501 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 497 of file Debugger.cpp.
References GetTerminalWidth(), and SetTerminalDimensions().
| bool Debugger::SetTerminalWidth | ( | uint64_t | term_width | ) |
Definition at line 487 of file Debugger.cpp.
References GetTerminalHeight(), and SetTerminalDimensions().
|
static |
Definition at line 886 of file Debugger.cpp.
References lldb_private::Target::SettingsInitialize().
Referenced by lldb_private::SystemInitializerFull::Initialize().
|
static |
Definition at line 888 of file Debugger.cpp.
References lldb_private::Target::SettingsTerminate().
Referenced by lldb_private::SystemInitializerFull::Terminate().
Definition at line 550 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 528 of file Debugger.cpp.
References lldb_private::Properties::SetPropertyAtIndex().
Definition at line 704 of file Debugger.cpp.
References m_source_file_cache, and lldb_private::Properties::SetPropertyAtIndex().
| bool Debugger::ShouldSuggestBugReport | ( | llvm::StringRef | failure | ) |
Returns true the first time this debugger sees failure while diagnostics.suggest-bugreport is on.
Definition at line 1927 of file Debugger.cpp.
References lldb_private::Diagnostics::GetGlobalProperties(), lldb_private::DiagnosticsProperties::GetSuggestBugReport(), and m_suggested_bugreports.
Referenced by PrivateReportDiagnostic(), and SuggestBugReport().
| 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 2420 of file Debugger.cpp.
References DefaultEventHandler(), eBroadcastBitEventThreadIsListening, g_debugger_event_thread_stack_bytes, lldb_private::GetLog(), 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 2554 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 2272 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 2460 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 2569 of file Debugger.cpp.
References lldb_private::File::Close(), GetInputFile(), and m_io_handler_thread.
Referenced by Clear().
| void Debugger::SuggestBugReport | ( | llvm::StringRef | failure, |
| Stream & | strm ) |
Writes the 'bugreport' note to strm if ShouldSuggestBugReport.
Definition at line 1932 of file Debugger.cpp.
References lldb_private::GetBugReportNote(), and ShouldSuggestBugReport().
Referenced by lldb_private::CommandObjectDWIMPrint::DoExecute().
|
static |
Definition at line 857 of file Debugger.cpp.
References g_debugger_list_ptr, g_thread_pool, and GetDebuggerListMutex().
Referenced by lldb_private::SystemInitializerFull::Terminate().
|
friend |
Definition at line 712 of file Debugger.h.
References CommandInterpreter.
Referenced by CommandInterpreter, Debugger(), DefaultEventHandler(), Destroy(), and GetCommandInterpreter().
|
friend |
|
friend |
Definition at line 715 of file Debugger.h.
References ProgressManager.
Referenced by ProgressManager.
|
friend |
|
friend |
Definition at line 716 of file Debugger.h.
References lldb::eBroadcastBitProgress, and Statusline.
Referenced by Statusline.
|
staticprotected |
Definition at line 859 of file Debugger.h.
Referenced by Initialize(), and LoadPlugin().
|
protected |
Public Debugger event broadcaster.
Definition at line 865 of file Debugger.h.
Referenced by Debugger(), DefaultEventHandler(), GetBroadcaster(), and GetBroadcaster().
|
protected |
Definition at line 816 of file Debugger.h.
Referenced by Clear(), Debugger(), DefaultEventHandler(), and GetBroadcasterManager().
|
protected |
Definition at line 856 of file Debugger.h.
Referenced by Debugger(), EnableLog(), and SetLoggingCallback().
|
protected |
Definition at line 867 of file Debugger.h.
Referenced by Clear(), and Debugger().
|
protected |
Definition at line 837 of file Debugger.h.
Referenced by Clear(), Debugger(), DefaultEventHandler(), GetAsyncExecution(), GetCommandInterpreter(), and SetAsyncExecution().
|
protected |
Definition at line 876 of file Debugger.h.
Referenced by AddDestroyCallback(), HandleDestroyCallback(), RemoveDestroyCallback(), and SetDestroyCallback().
|
protected |
Definition at line 877 of file Debugger.h.
Referenced by AddDestroyCallback(), and SetDestroyCallback().
|
protected |
Definition at line 888 of file Debugger.h.
Referenced by AddDestroyCallback(), HandleDestroyCallback(), RemoveDestroyCallback(), and SetDestroyCallback().
|
protected |
Definition at line 868 of file Debugger.h.
Referenced by Debugger(), GetDummyTarget(), and GetSelectedExecutionContextRef().
|
protected |
Definition at line 813 of file Debugger.h.
Referenced by Debugger(), GetErrorFileSP(), GetErrorStreamSP(), PrintAsync(), and SetErrorFile().
|
protected |
Definition at line 862 of file Debugger.h.
Referenced by Debugger(), IsHandlingEvents(), StartEventHandlerThread(), and StopEventHandlerThread().
|
protected |
Raised by FlushStatusLine to request a flush at the next redraw.
Definition at line 850 of file Debugger.h.
Referenced by FlushStatusLine(), and RedrawStatusline().
|
protected |
Definition at line 866 of file Debugger.h.
Referenced by CancelForwardEvents(), Debugger(), DefaultEventHandler(), EnableForwardEvents(), and IsForwardingEvents().
|
protected |
Definition at line 811 of file Debugger.h.
Referenced by Debugger(), GetInputFile(), GetInputFileSP(), and SetInputFile().
|
protected |
Definition at line 857 of file Debugger.h.
Referenced by Debugger(), and GetInstanceName().
|
protected |
Definition at line 891 of file Debugger.h.
Referenced by CancelInterruptRequest(), InterruptRequested(), and RequestInterrupt().
|
protected |
Tracks interrupt requests.
Definition at line 890 of file Debugger.h.
Referenced by CancelInterruptRequest(), InterruptRequested(), and RequestInterrupt().
|
protected |
Definition at line 843 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 844 of file Debugger.h.
Referenced by RunIOHandlers(), and RunIOHandlerSync().
|
protected |
Definition at line 863 of file Debugger.h.
Referenced by Debugger(), HasIOHandlerThread(), IsIOHandlerThreadCurrentThread(), JoinIOHandlerThread(), SetIOHandlerThread(), StartIOHandlerThread(), and StopIOHandlerThread().
|
protected |
Definition at line 827 of file Debugger.h.
Referenced by Clear(), Debugger(), and GetListener().
|
protected |
Definition at line 861 of file Debugger.h.
Referenced by Debugger(), and LoadPlugin().
|
protected |
Definition at line 806 of file Debugger.h.
Referenced by FlushProcessOutput().
|
protected |
Definition at line 814 of file Debugger.h.
Referenced by AdoptTopIOHandlerFilesIfInvalid(), Debugger(), SetErrorFile(), and SetOutputFile().
|
protected |
Definition at line 812 of file Debugger.h.
Referenced by Debugger(), GetOutputFileSP(), GetOutputStreamSP(), PrintAsync(), and SetOutputFile().
|
protected |
Definition at line 826 of file Debugger.h.
Referenced by Debugger(), and GetPlatformList().
|
protected |
Bookkeeping for command line progress events.
Definition at line 872 of file Debugger.h.
Referenced by GetCurrentProgressReport(), and HandleProgressEvent().
|
mutableprotected |
Definition at line 873 of file Debugger.h.
Referenced by GetCurrentProgressReport(), and HandleProgressEvent().
|
protected |
Definition at line 839 of file Debugger.h.
Referenced by GetScriptInterpreter().
|
protected |
Definition at line 841 of file Debugger.h.
Referenced by GetScriptInterpreter().
|
protected |
Definition at line 832 of file Debugger.h.
Referenced by Debugger(), GetSourceFileCache(), SetPropertyValue(), and SetUseSourceCache().
|
protected |
Definition at line 828 of file Debugger.h.
Referenced by Debugger(), and GetSourceManager().
|
protected |
Definition at line 848 of file Debugger.h.
Referenced by DefaultEventHandler(), RedrawStatusline(), RestoreInputTerminalState(), SaveInputTerminalState(), SetPropertyValue(), and SetTerminalDimensions().
|
protected |
Mutex protecting the m_statusline member.
Definition at line 847 of file Debugger.h.
Referenced by DefaultEventHandler(), RedrawStatusline(), RestoreInputTerminalState(), SaveInputTerminalState(), SetPropertyValue(), and SetTerminalDimensions().
|
protected |
Definition at line 855 of file Debugger.h.
Referenced by CopyLogFilesToDirectory(), and EnableLog().
|
protected |
Definition at line 858 of file Debugger.h.
Referenced by GetStringPool().
|
protected |
Hashes of the failures this debugger already suggested 'bugreport' for.
Definition at line 853 of file Debugger.h.
Referenced by ShouldSuggestBugReport().
|
protected |
Private debugger synchronization.
Definition at line 864 of file Debugger.h.
Referenced by Debugger(), DefaultEventHandler(), and StartEventHandlerThread().
|
protected |
Definition at line 824 of file Debugger.h.
Referenced by Clear(), Debugger(), and GetTargetGroupList().
|
protected |
Definition at line 823 of file Debugger.h.
Referenced by Clear(), Debugger(), GetSelectedExecutionContextRef(), GetSelectedOrDummyTarget(), and GetTargetList().
|
protected |
Definition at line 822 of file Debugger.h.
Referenced by Clear(), Debugger(), RestoreInputTerminalState(), and SaveInputTerminalState().