LLDB  mainline
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Friends | List of all members
lldb_private::Debugger Class Reference

#include "lldb/Core/Debugger.h"

Inheritance diagram for lldb_private::Debugger:
Inheritance graph
Collaboration diagram for lldb_private::Debugger:
Collaboration graph


class  ProgressEventData

Public Types

enum  { eBroadcastBitProgress = (1 << 0) }
 Broadcaster event bits definitions. More...
enum  StopDisassemblyType { eStopDisassemblyTypeNever = 0, eStopDisassemblyTypeNoDebugInfo, eStopDisassemblyTypeNoSource, eStopDisassemblyTypeAlways }

Public Member Functions

BroadcasterGetBroadcaster ()
 Get the public broadcaster for this debugger. More...
const BroadcasterGetBroadcaster () const
 ~Debugger () override
void Clear ()
bool GetAsyncExecution ()
void SetAsyncExecution (bool async)
lldb::FileSP GetInputFileSP ()
lldb::StreamFileSP GetOutputStreamSP ()
lldb::StreamFileSP GetErrorStreamSP ()
FileGetInputFile ()
FileGetOutputFile ()
FileGetErrorFile ()
StreamFileGetOutputStream ()
StreamFileGetErrorStream ()
repro::DataRecorderGetInputRecorder ()
void SetInputFile (lldb::FileSP file, repro::DataRecorder *recorder=nullptr)
void SetOutputFile (lldb::FileSP file)
void SetErrorFile (lldb::FileSP file)
void SaveInputTerminalState ()
void RestoreInputTerminalState ()
lldb::StreamSP GetAsyncOutputStream ()
lldb::StreamSP GetAsyncErrorStream ()
CommandInterpreterGetCommandInterpreter ()
ScriptInterpreterGetScriptInterpreter (bool can_create=true, llvm::Optional< lldb::ScriptLanguage > language={})
lldb::ListenerSP GetListener ()
SourceManagerGetSourceManager ()
lldb::TargetSP GetSelectedTarget ()
ExecutionContext GetSelectedExecutionContext ()
TargetListGetTargetList ()
 Get accessor for the target list. More...
PlatformListGetPlatformList ()
void DispatchInputInterrupt ()
void DispatchInputEndOfFile ()
void AdoptTopIOHandlerFilesIfInvalid (lldb::FileSP &in, lldb::StreamFileSP &out, lldb::StreamFileSP &err)
void RunIOHandlerAsync (const lldb::IOHandlerSP &reader_sp, bool cancel_top_handler=true)
 Run the given IO handler and return immediately. More...
void RunIOHandlerSync (const lldb::IOHandlerSP &reader_sp)
 Run the given IO handler and block until it's complete. More...
bool RemoveIOHandler (const lldb::IOHandlerSP &reader_sp)
 Remove the given IO handler if it's currently active. More...
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)
ConstString GetTopIOHandlerControlSequence (char ch)
const char * GetIOHandlerCommandPrefix ()
const char * GetIOHandlerHelpPrologue ()
void ClearIOHandlers ()
bool GetCloseInputOnEOF () const
void SetCloseInputOnEOF (bool b)
bool EnableLog (llvm::StringRef channel, llvm::ArrayRef< const char * > categories, llvm::StringRef log_file, uint32_t log_options, llvm::raw_ostream &error_stream)
void SetLoggingCallback (lldb::LogOutputCallback log_callback, void *baton)
Status SetPropertyValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef property_path, llvm::StringRef value) override
bool GetAutoConfirm () const
const FormatEntity::EntryGetDisassemblyFormat () const
const FormatEntity::EntryGetFrameFormat () const
const FormatEntity::EntryGetFrameFormatUnique () const
uint32_t GetStopDisassemblyMaxSize () const
const FormatEntity::EntryGetThreadFormat () const
const FormatEntity::EntryGetThreadStopFormat () const
lldb::ScriptLanguage GetScriptLanguage () const
bool SetScriptLanguage (lldb::ScriptLanguage script_lang)
uint32_t GetTerminalWidth () const
bool SetTerminalWidth (uint32_t term_width)
llvm::StringRef GetPrompt () const
void SetPrompt (llvm::StringRef p)
void SetPrompt (const char *)=delete
llvm::StringRef GetReproducerPath () const
bool GetUseExternalEditor () const
bool SetUseExternalEditor (bool use_external_editor_p)
bool GetUseColor () const
bool SetUseColor (bool use_color)
bool GetUseAutosuggestion () const
bool GetUseSourceCache () const
bool SetUseSourceCache (bool use_source_cache)
bool GetHighlightSource () const
lldb::StopShowColumn GetStopShowColumn () const
llvm::StringRef GetStopShowColumnAnsiPrefix () const
llvm::StringRef GetStopShowColumnAnsiSuffix () const
uint32_t GetStopSourceLineCount (bool before) const
StopDisassemblyType GetStopDisassemblyDisplay () const
uint32_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)
uint32_t GetTabSize () const
bool SetTabSize (uint32_t tab_size)
bool GetEscapeNonPrintables () const
bool GetNotifyVoid () const
ConstString GetInstanceName ()
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)
TargetGetSelectedOrDummyTarget (bool prefer_dummy=false)
TargetGetDummyTarget ()
lldb::BroadcasterManagerSP GetBroadcasterManager ()
- Public Member Functions inherited from lldb_private::UserID
 UserID (lldb::user_id_t uid=LLDB_INVALID_UID)
 Construct with optional user ID. More...
 ~UserID ()=default
 Destructor. More...
void Clear ()
 Clears the object state. More...
lldb::user_id_t GetID () const
 Get accessor for the user ID. More...
void SetID (lldb::user_id_t uid)
 Set accessor for the user ID. More...
- Public Member Functions inherited from lldb_private::Properties
 Properties ()=default
 Properties (const lldb::OptionValuePropertiesSP &collection_sp)
virtual ~Properties ()=default
virtual lldb::OptionValuePropertiesSP GetValueProperties () const
virtual lldb::OptionValueSP GetPropertyValue (const ExecutionContext *exe_ctx, llvm::StringRef property_path, bool will_modify, Status &error) const
virtual Status DumpPropertyValue (const ExecutionContext *exe_ctx, Stream &strm, llvm::StringRef property_path, uint32_t dump_mask)
virtual void DumpAllPropertyValues (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask)
virtual void DumpAllDescriptions (CommandInterpreter &interpreter, Stream &strm) const
size_t Apropos (llvm::StringRef keyword, std::vector< const Property * > &matching_properties) const
lldb::OptionValuePropertiesSP GetSubProperty (const ExecutionContext *exe_ctx, ConstString name)

Static Public Member Functions

static ConstString GetStaticBroadcasterClass ()
static lldb::DebuggerSP CreateInstance (lldb::LogOutputCallback log_callback=nullptr, void *baton=nullptr)
static lldb::TargetSP FindTargetWithProcessID (lldb::pid_t pid)
static lldb::TargetSP FindTargetWithProcess (Process *process)
static void Initialize (LoadPluginCallbackType load_plugin_callback)
static void Terminate ()
static void SettingsInitialize ()
static void SettingsTerminate ()
static void Destroy (lldb::DebuggerSP &debugger_sp)
static lldb::DebuggerSP FindDebuggerWithID (lldb::user_id_t id)
static lldb::DebuggerSP FindDebuggerWithInstanceName (ConstString 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 Public Member Functions inherited from lldb_private::Properties
static const char * GetExperimentalSettingsName ()
static bool IsSettingExperimental (llvm::StringRef setting)

Protected Types

enum  { eBroadcastBitEventThreadIsListening = (1 << 0) }
typedef std::vector< llvm::sys::DynamicLibrary > LoadedPluginsList

Protected Member Functions

bool StartEventHandlerThread ()
void StopEventHandlerThread ()
void PushIOHandler (const lldb::IOHandlerSP &reader_sp, bool cancel_top_handler=true)
bool PopIOHandler (const lldb::IOHandlerSP &reader_sp)
bool HasIOHandlerThread ()
bool StartIOHandlerThread ()
void StopIOHandlerThread ()
void JoinIOHandlerThread ()
void DefaultEventHandler ()
void HandleBreakpointEvent (const lldb::EventSP &event_sp)
void HandleProcessEvent (const lldb::EventSP &event_sp)
void HandleThreadEvent (const lldb::EventSP &event_sp)
void FlushProcessOutput (Process &process, bool flush_stdout, bool flush_stderr)
SourceManager::SourceFileCacheGetSourceFileCache ()
void InstanceInitialize ()

Static Protected Member Functions

static void ReportProgress (uint64_t progress_id, const std::string &message, uint64_t completed, uint64_t total, llvm::Optional< lldb::user_id_t > debugger_id)
 Report progress events. More...
static lldb::thread_result_t EventHandlerThread (lldb::thread_arg_t arg)
static lldb::thread_result_t IOHandlerThread (lldb::thread_arg_t arg)

Protected Attributes

std::mutex m_output_flush_mutex
lldb::FileSP m_input_file_sp
lldb::StreamFileSP m_output_stream_sp
lldb::StreamFileSP m_error_stream_sp
 Used for shadowing the input file when capturing a reproducer. More...
lldb::BroadcasterManagerSP m_broadcaster_manager_sp
TerminalState m_terminal_state
TargetList m_target_list
PlatformList m_platform_list
lldb::ListenerSP m_listener_sp
std::unique_ptr< SourceManagerm_source_manager_up
SourceManager::SourceFileCache m_source_file_cache
std::unique_ptr< CommandInterpreterm_command_interpreter_up
std::recursive_mutex m_script_interpreter_mutex
std::array< lldb::ScriptInterpreterSP, lldb::eScriptLanguageUnknownm_script_interpreters
IOHandlerStack m_io_handler_stack
std::recursive_mutex m_io_handler_synchronous_mutex
llvm::StringMap< std::weak_ptr< llvm::raw_ostream > > m_log_streams
std::shared_ptr< llvm::raw_ostream > m_log_callback_stream_sp
ConstString m_instance_name
LoadedPluginsList m_loaded_plugins
HostThread m_event_handler_thread
HostThread m_io_handler_thread
Broadcaster m_sync_broadcaster
 Private debugger synchronization. More...
Broadcaster m_broadcaster
 Public Debugger event broadcaster. More...
lldb::ListenerSP m_forward_listener_sp
llvm::once_flag m_clear_once
lldb::TargetSP m_dummy_target_sp
- Protected Attributes inherited from lldb_private::UserID
lldb::user_id_t m_uid
 The user ID that uniquely identifies an object. More...
- Protected Attributes inherited from lldb_private::Properties
lldb::OptionValuePropertiesSP m_collection_sp

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 Debuggeroperator= (const Debugger &)=delete


class SourceManager
class CommandInterpreter
class REPL
class Progress

Detailed Description

A class to manage flag bits.

Provides a global root objects for the debugger core.

Definition at line 70 of file Debugger.h.

Member Typedef Documentation

◆ LoadedPluginsList

typedef std::vector<llvm::sys::DynamicLibrary> lldb_private::Debugger::LoadedPluginsList

Definition at line 509 of file Debugger.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Broadcaster event bits definitions.


Definition at line 77 of file Debugger.h.

◆ anonymous enum

anonymous enum

Definition at line 520 of file Debugger.h.

◆ StopDisassemblyType


Definition at line 274 of file Debugger.h.

Constructor & Destructor Documentation

◆ ~Debugger()

Debugger::~Debugger ( )

Definition at line 760 of file Debugger.cpp.

References Clear().

◆ Debugger() [1/2]

Debugger::Debugger ( lldb::LogOutputCallback  m_log_callback,
void *  baton 

◆ Debugger() [2/2]

lldb_private::Debugger::Debugger ( const Debugger )

Member Function Documentation

◆ AdoptTopIOHandlerFilesIfInvalid()

void Debugger::AdoptTopIOHandlerFilesIfInvalid ( lldb::FileSP &  in,
lldb::StreamFileSP &  out,
lldb::StreamFileSP &  err 

◆ CancelForwardEvents()

void Debugger::CancelForwardEvents ( const lldb::ListenerSP &  listener_sp)

Definition at line 1471 of file Debugger.cpp.

References m_forward_listener_sp.

◆ CheckTopIOHandlerTypes()

bool Debugger::CheckTopIOHandlerTypes ( IOHandler::Type  top_type,
IOHandler::Type  second_top_type 

◆ Clear()

void Debugger::Clear ( )

◆ ClearIOHandlers()

void Debugger::ClearIOHandlers ( )

◆ CreateInstance()

DebuggerSP Debugger::CreateInstance ( lldb::LogOutputCallback  log_callback = nullptr,
void *  baton = nullptr 

Definition at line 593 of file Debugger.cpp.

References g_debugger_list_mutex_ptr, and g_debugger_list_ptr.

Referenced by lldb::SBDebugger::Create().

◆ DefaultEventHandler()

void Debugger::DefaultEventHandler ( )

◆ Destroy()

void Debugger::Destroy ( lldb::DebuggerSP &  debugger_sp)

◆ DispatchInputEndOfFile()

void Debugger::DispatchInputEndOfFile ( )

◆ DispatchInputInterrupt()

void Debugger::DispatchInputInterrupt ( )

◆ EnableForwardEvents()

void Debugger::EnableForwardEvents ( const lldb::ListenerSP &  listener_sp)

Definition at line 1467 of file Debugger.cpp.

References m_forward_listener_sp.

◆ EnableLog()

bool Debugger::EnableLog ( llvm::StringRef  channel,
llvm::ArrayRef< const char * >  categories,
llvm::StringRef  log_file,
uint32_t  log_options,
llvm::raw_ostream &  error_stream 

◆ EventHandlerThread()

lldb::thread_result_t Debugger::EventHandlerThread ( lldb::thread_arg_t  arg)

Definition at line 1563 of file Debugger.cpp.

Referenced by StartEventHandlerThread().

◆ FindDebuggerWithID()

DebuggerSP Debugger::FindDebuggerWithID ( lldb::user_id_t  id)

◆ FindDebuggerWithInstanceName()

DebuggerSP Debugger::FindDebuggerWithInstanceName ( ConstString  instance_name)

◆ FindTargetWithProcess()

TargetSP Debugger::FindTargetWithProcess ( Process process)

Definition at line 662 of file Debugger.cpp.

References g_debugger_list_mutex_ptr, and g_debugger_list_ptr.

◆ FindTargetWithProcessID()

TargetSP Debugger::FindTargetWithProcessID ( lldb::pid_t  pid)

◆ FlushProcessOutput()

void Debugger::FlushProcessOutput ( Process process,
bool  flush_stdout,
bool  flush_stderr 

◆ FormatDisassemblerAddress()

bool Debugger::FormatDisassemblerAddress ( const FormatEntity::Entry format,
const SymbolContext sc,
const SymbolContext prev_sc,
const ExecutionContext exe_ctx,
const Address addr,
Stream s 

◆ GetAsyncErrorStream()

StreamSP Debugger::GetAsyncErrorStream ( )

◆ GetAsyncExecution()

bool Debugger::GetAsyncExecution ( )

◆ GetAsyncOutputStream()

StreamSP Debugger::GetAsyncOutputStream ( )

◆ GetAutoConfirm()

bool Debugger::GetAutoConfirm ( ) const

Definition at line 241 of file Debugger.cpp.

◆ GetAutoIndent()

bool Debugger::GetAutoIndent ( ) const

Definition at line 438 of file Debugger.cpp.

Referenced by lldb_private::REPL::GetIOHandler().

◆ GetAutoOneLineSummaries()

bool Debugger::GetAutoOneLineSummaries ( ) const

Definition at line 428 of file Debugger.cpp.

◆ GetBroadcaster() [1/2]

Broadcaster& lldb_private::Debugger::GetBroadcaster ( )

Get the public broadcaster for this debugger.

Definition at line 84 of file Debugger.h.

References m_broadcaster.

Referenced by PrivateReportProgress().

◆ GetBroadcaster() [2/2]

const Broadcaster& lldb_private::Debugger::GetBroadcaster ( ) const

Definition at line 85 of file Debugger.h.

References m_broadcaster.

◆ GetBroadcasterManager()

lldb::BroadcasterManagerSP lldb_private::Debugger::GetBroadcasterManager ( )

◆ GetCloseInputOnEOF()

bool Debugger::GetCloseInputOnEOF ( ) const

Definition at line 794 of file Debugger.cpp.

◆ GetCommandInterpreter()

CommandInterpreter& lldb_private::Debugger::GetCommandInterpreter ( )

◆ GetDebuggerAtIndex()

lldb::DebuggerSP Debugger::GetDebuggerAtIndex ( size_t  index)

◆ GetDisassemblyFormat()

const FormatEntity::Entry * Debugger::GetDisassemblyFormat ( ) const

◆ GetDisassemblyLineCount()

uint32_t Debugger::GetDisassemblyLineCount ( ) const

Definition at line 422 of file Debugger.cpp.

Referenced by lldb_private::StackFrame::GetStatus().

◆ GetDummyTarget()

Target& lldb_private::Debugger::GetDummyTarget ( )

◆ GetErrorFile()

File& lldb_private::Debugger::GetErrorFile ( )

Definition at line 171 of file Debugger.h.

References m_error_stream_sp.

Referenced by IOHandlerLuaInterpreter::IOHandlerLuaInterpreter().

◆ GetErrorStream()

StreamFile& lldb_private::Debugger::GetErrorStream ( )

◆ GetErrorStreamSP()

lldb::StreamFileSP lldb_private::Debugger::GetErrorStreamSP ( )

Definition at line 165 of file Debugger.h.

References m_error_stream_sp.

Referenced by AdoptTopIOHandlerFilesIfInvalid().

◆ GetEscapeNonPrintables()

bool Debugger::GetEscapeNonPrintables ( ) const

Definition at line 433 of file Debugger.cpp.

◆ GetFrameFormat()

const FormatEntity::Entry * Debugger::GetFrameFormat ( ) const

Definition at line 252 of file Debugger.cpp.

Referenced by lldb_private::StackFrame::DumpUsingSettingsFormat().

◆ GetFrameFormatUnique()

const FormatEntity::Entry * Debugger::GetFrameFormatUnique ( ) const

Definition at line 257 of file Debugger.cpp.

Referenced by lldb_private::StackFrame::DumpUsingSettingsFormat().

◆ GetHighlightSource()

bool Debugger::GetHighlightSource ( ) const

Definition at line 376 of file Debugger.cpp.

◆ GetInputFile()

File& lldb_private::Debugger::GetInputFile ( )

◆ GetInputFileSP()

lldb::FileSP lldb_private::Debugger::GetInputFileSP ( )

◆ GetInputRecorder()

repro::DataRecorder * Debugger::GetInputRecorder ( )

Definition at line 811 of file Debugger.cpp.

References m_input_recorder.

◆ GetInstanceName()

ConstString lldb_private::Debugger::GetInstanceName ( )

Definition at line 364 of file Debugger.h.

References m_instance_name.

◆ GetIOHandlerCommandPrefix()

const char * Debugger::GetIOHandlerCommandPrefix ( )

◆ GetIOHandlerHelpPrologue()

const char * Debugger::GetIOHandlerHelpPrologue ( )

◆ GetListener()

lldb::ListenerSP lldb_private::Debugger::GetListener ( )

◆ GetNotifyVoid()

bool Debugger::GetNotifyVoid ( ) const

Definition at line 268 of file Debugger.cpp.

Referenced by lldb_private::REPL::IOHandlerInputComplete().

◆ GetNumDebuggers()

size_t Debugger::GetNumDebuggers ( )

◆ GetOutputFile()

File& lldb_private::Debugger::GetOutputFile ( )

◆ GetOutputStream()

StreamFile& lldb_private::Debugger::GetOutputStream ( )

◆ GetOutputStreamSP()

lldb::StreamFileSP lldb_private::Debugger::GetOutputStreamSP ( )

◆ GetPlatformList()

PlatformList& lldb_private::Debugger::GetPlatformList ( )

◆ GetPrintDecls()

bool Debugger::GetPrintDecls ( ) const

Definition at line 448 of file Debugger.cpp.

Referenced by lldb_private::REPL::IOHandlerInputComplete().

◆ GetPrompt()

llvm::StringRef Debugger::GetPrompt ( ) const

Definition at line 274 of file Debugger.cpp.

◆ GetReproducerPath()

llvm::StringRef Debugger::GetReproducerPath ( ) const

Definition at line 291 of file Debugger.cpp.

◆ GetScriptInterpreter()

ScriptInterpreter * Debugger::GetScriptInterpreter ( bool  can_create = true,
llvm::Optional< lldb::ScriptLanguage language = {} 

◆ GetScriptLanguage()

lldb::ScriptLanguage Debugger::GetScriptLanguage ( ) const

◆ GetSelectedExecutionContext()

ExecutionContext Debugger::GetSelectedExecutionContext ( )

Definition at line 840 of file Debugger.cpp.

References GetSelectedTarget().

◆ GetSelectedOrDummyTarget()

Target & Debugger::GetSelectedOrDummyTarget ( bool  prefer_dummy = false)

◆ GetSelectedTarget()

lldb::TargetSP lldb_private::Debugger::GetSelectedTarget ( )

◆ GetSourceFileCache()

SourceManager::SourceFileCache& lldb_private::Debugger::GetSourceFileCache ( )

Definition at line 462 of file Debugger.h.

References m_source_file_cache.

◆ GetSourceManager()

SourceManager & Debugger::GetSourceManager ( )

Definition at line 1291 of file Debugger.cpp.

References m_source_manager_up.

Referenced by lldb_private::Disassembler::PrintInstructions().

◆ GetStaticBroadcasterClass()

ConstString Debugger::GetStaticBroadcasterClass ( )

Definition at line 676 of file Debugger.cpp.

Referenced by lldb::SBDebugger::GetBroadcasterClass().

◆ GetStopDisassemblyDisplay()

Debugger::StopDisassemblyType Debugger::GetStopDisassemblyDisplay ( ) const

Definition at line 415 of file Debugger.cpp.

Referenced by lldb_private::StackFrame::GetStatus().

◆ GetStopDisassemblyMaxSize()

uint32_t Debugger::GetStopDisassemblyMaxSize ( ) const

Definition at line 262 of file Debugger.cpp.

◆ GetStopShowColumn()

StopShowColumn Debugger::GetStopShowColumn ( ) const

Definition at line 382 of file Debugger.cpp.

◆ GetStopShowColumnAnsiPrefix()

llvm::StringRef Debugger::GetStopShowColumnAnsiPrefix ( ) const

Definition at line 388 of file Debugger.cpp.

◆ GetStopShowColumnAnsiSuffix()

llvm::StringRef Debugger::GetStopShowColumnAnsiSuffix ( ) const

Definition at line 393 of file Debugger.cpp.

◆ GetStopShowLineMarkerAnsiPrefix()

llvm::StringRef Debugger::GetStopShowLineMarkerAnsiPrefix ( ) const

Definition at line 398 of file Debugger.cpp.

◆ GetStopShowLineMarkerAnsiSuffix()

llvm::StringRef Debugger::GetStopShowLineMarkerAnsiSuffix ( ) const

Definition at line 403 of file Debugger.cpp.

◆ GetStopSourceLineCount()

uint32_t Debugger::GetStopSourceLineCount ( bool  before) const

Definition at line 408 of file Debugger.cpp.

Referenced by lldb_private::StackFrame::GetStatus().

◆ GetTabSize()

uint32_t Debugger::GetTabSize ( ) const

◆ GetTargetList()

TargetList& lldb_private::Debugger::GetTargetList ( )

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.

A global shared target list.

Definition at line 223 of file Debugger.h.

References m_target_list.

Referenced by PlatformPOSIX::Attach(), lldb_private::PlatformWindows::Attach(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::Attach(), lldb_private::Platform::DoConnectProcess(), CommandObjectTargetCreate::DoExecute(), and lldb_private::Process::HandleProcessStateChangedEvent().

◆ GetTerminalWidth()

uint32_t Debugger::GetTerminalWidth ( ) const

Definition at line 318 of file Debugger.cpp.

Referenced by lldb_private::CommandObjectDisassemble::DoExecute().

◆ GetThreadFormat()

const FormatEntity::Entry * Debugger::GetThreadFormat ( ) const

Definition at line 296 of file Debugger.cpp.

Referenced by lldb_private::Thread::DumpUsingSettingsFormat().

◆ GetThreadStopFormat()

const FormatEntity::Entry * Debugger::GetThreadStopFormat ( ) const

Definition at line 301 of file Debugger.cpp.

Referenced by lldb_private::Thread::DumpUsingSettingsFormat().

◆ GetTopIOHandlerControlSequence()

ConstString Debugger::GetTopIOHandlerControlSequence ( char  ch)

◆ GetUseAutosuggestion()

bool Debugger::GetUseAutosuggestion ( ) const

Definition at line 356 of file Debugger.cpp.

Referenced by lldb_private::IOHandlerEditline::IOHandlerEditline().

◆ GetUseColor()

bool Debugger::GetUseColor ( ) const

◆ GetUseExternalEditor()

bool Debugger::GetUseExternalEditor ( ) const

Definition at line 332 of file Debugger.cpp.

Referenced by lldb_private::Thread::GetStatus().

◆ GetUseSourceCache()

bool Debugger::GetUseSourceCache ( ) const

Definition at line 362 of file Debugger.cpp.

◆ HandleBreakpointEvent()

void Debugger::HandleBreakpointEvent ( const lldb::EventSP &  event_sp)

◆ HandleProcessEvent()

void Debugger::HandleProcessEvent ( const lldb::EventSP &  event_sp)

◆ HandleThreadEvent()

void Debugger::HandleThreadEvent ( const lldb::EventSP &  event_sp)

◆ HasIOHandlerThread()

bool Debugger::HasIOHandlerThread ( )

◆ Initialize()

void Debugger::Initialize ( LoadPluginCallbackType  load_plugin_callback)

◆ InstanceInitialize()

void Debugger::InstanceInitialize ( )

Definition at line 567 of file Debugger.cpp.

References LoadPluginCallback(), and PATH_MAX.

◆ IOHandlerThread()

lldb::thread_result_t Debugger::IOHandlerThread ( lldb::thread_arg_t  arg)

Definition at line 1616 of file Debugger.cpp.

References RunIOHandlers(), and StopEventHandlerThread().

Referenced by StartIOHandlerThread().

◆ IsForwardingEvents()

bool Debugger::IsForwardingEvents ( )

Definition at line 1465 of file Debugger.cpp.

References m_forward_listener_sp.

Referenced by HandleProcessEvent().

◆ IsHandlingEvents()

bool lldb_private::Debugger::IsHandlingEvents ( ) const

Definition at line 376 of file Debugger.h.

References lldb_private::HostThread::IsJoinable(), and m_event_handler_thread.

◆ IsTopIOHandler()

bool Debugger::IsTopIOHandler ( const lldb::IOHandlerSP &  reader_sp)

◆ JoinIOHandlerThread()

void Debugger::JoinIOHandlerThread ( )

◆ LoadPlugin()

bool Debugger::LoadPlugin ( const FileSpec spec,
Status error 

Definition at line 505 of file Debugger.cpp.

References error().

Referenced by LoadPluginCallback().

◆ operator=()

const Debugger& lldb_private::Debugger::operator= ( const Debugger )

◆ PopIOHandler()

bool Debugger::PopIOHandler ( const lldb::IOHandlerSP &  reader_sp)

◆ PrintAsync()

void Debugger::PrintAsync ( const char *  s,
size_t  len,
bool  is_stdout 

◆ PushIOHandler()

void Debugger::PushIOHandler ( const lldb::IOHandlerSP &  reader_sp,
bool  cancel_top_handler = true 

◆ RemoveIOHandler()

bool Debugger::RemoveIOHandler ( const lldb::IOHandlerSP &  reader_sp)

Remove the given IO handler if it's currently active.

Definition at line 957 of file Debugger.cpp.

References PopIOHandler().

Referenced by lldb_private::Process::PopProcessIOHandler().

◆ ReportProgress()

void Debugger::ReportProgress ( uint64_t  progress_id,
const std::string message,
uint64_t  completed,
uint64_t  total,
llvm::Optional< lldb::user_id_t debugger_id 

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_idThe unique integer identifier for the progress to report.
[in]messageThe title of the progress dialog to display in the UI.
[in]completedThe amount of work completed. If completed is zero, then this event is a progress started event. If completed is equal to total, then this event is a progress end event. Otherwise completed indicates the current progress compare to the total value.
[in]totalThe total amount of work units that need to be completed. If this value is UINT64_MAX, then an indeterminate progress indicator should be displayed.
[in]debugger_idIf 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 1200 of file Debugger.cpp.

References FindDebuggerWithID(), g_debugger_list_mutex_ptr, g_debugger_list_ptr, message(), and PrivateReportProgress().

Referenced by lldb_private::Progress::ReportProgress().

◆ RestoreInputTerminalState()

void Debugger::RestoreInputTerminalState ( )

Definition at line 838 of file Debugger.cpp.

References m_terminal_state.

◆ RunIOHandlerAsync()

void Debugger::RunIOHandlerAsync ( const lldb::IOHandlerSP &  reader_sp,
bool  cancel_top_handler = true 

◆ RunIOHandlers()

void Debugger::RunIOHandlers ( )

◆ RunIOHandlerSync()

void Debugger::RunIOHandlerSync ( const lldb::IOHandlerSP &  reader_sp)

Run the given IO handler and block until it's complete.

Definition at line 896 of file Debugger.cpp.

References m_io_handler_stack, m_io_handler_synchronous_mutex, PopIOHandler(), PushIOHandler(), and lldb_private::IOHandlerStack::Top().

◆ RunREPL()

Status Debugger::RunREPL ( lldb::LanguageType  language,
const char *  repl_options 

◆ SaveInputTerminalState()

void Debugger::SaveInputTerminalState ( )

◆ SetAsyncExecution()

void Debugger::SetAsyncExecution ( bool  async)

◆ SetAutoIndent()

bool Debugger::SetAutoIndent ( bool  b)

Definition at line 443 of file Debugger.cpp.

◆ SetCloseInputOnEOF()

void Debugger::SetCloseInputOnEOF ( bool  b)

Definition at line 799 of file Debugger.cpp.

◆ SetErrorFile()

void Debugger::SetErrorFile ( lldb::FileSP  file)

Definition at line 827 of file Debugger.cpp.

References m_error_stream_sp.

◆ SetInputFile()

void Debugger::SetInputFile ( lldb::FileSP  file,
repro::DataRecorder recorder = nullptr 

Definition at line 813 of file Debugger.cpp.

References m_input_file_sp, m_input_recorder, and SaveInputTerminalState().

◆ SetLoggingCallback()

void Debugger::SetLoggingCallback ( lldb::LogOutputCallback  log_callback,
void *  baton 

Definition at line 1147 of file Debugger.cpp.

References m_log_callback_stream_sp.

◆ SetOutputFile()

void Debugger::SetOutputFile ( lldb::FileSP  file)

Definition at line 822 of file Debugger.cpp.

References m_output_stream_sp.

◆ SetPrintDecls()

bool Debugger::SetPrintDecls ( bool  b)

Definition at line 453 of file Debugger.cpp.

◆ SetPrompt() [1/2]

void lldb_private::Debugger::SetPrompt ( const char *  )

◆ SetPrompt() [2/2]

void Debugger::SetPrompt ( llvm::StringRef  p)

Definition at line 280 of file Debugger.cpp.

References lldb_private::ansi::FormatAnsiTerminalCodes(), and string().

◆ SetPropertyValue()

Status Debugger::SetPropertyValue ( const ExecutionContext exe_ctx,
VarSetOperationType  op,
llvm::StringRef  property_path,
llvm::StringRef  value 

◆ SetScriptLanguage()

bool Debugger::SetScriptLanguage ( lldb::ScriptLanguage  script_lang)

Definition at line 312 of file Debugger.cpp.

◆ SetTabSize()

bool Debugger::SetTabSize ( uint32_t  tab_size)

Definition at line 464 of file Debugger.cpp.

◆ SetTerminalWidth()

bool Debugger::SetTerminalWidth ( uint32_t  term_width)

Definition at line 324 of file Debugger.cpp.

◆ SettingsInitialize()

void Debugger::SettingsInitialize ( )

Definition at line 501 of file Debugger.cpp.

Referenced by lldb_private::SystemInitializerFull::Initialize().

◆ SettingsTerminate()

void Debugger::SettingsTerminate ( )

Definition at line 503 of file Debugger.cpp.

Referenced by lldb_private::SystemInitializerFull::Terminate().

◆ SetUseColor()

bool Debugger::SetUseColor ( bool  use_color)

Definition at line 349 of file Debugger.cpp.

Referenced by Debugger().

◆ SetUseExternalEditor()

bool Debugger::SetUseExternalEditor ( bool  use_external_editor_p)

Definition at line 338 of file Debugger.cpp.

◆ SetUseSourceCache()

bool Debugger::SetUseSourceCache ( bool  use_source_cache)

Definition at line 368 of file Debugger.cpp.

◆ StartEventHandlerThread()

bool Debugger::StartEventHandlerThread ( )

◆ StartIOHandlerThread()

bool Debugger::StartIOHandlerThread ( )

◆ StopEventHandlerThread()

void Debugger::StopEventHandlerThread ( )

◆ StopIOHandlerThread()

void Debugger::StopIOHandlerThread ( )

◆ Terminate()

void Debugger::Terminate ( )

Friends And Related Function Documentation

◆ CommandInterpreter

friend class CommandInterpreter

Definition at line 391 of file Debugger.h.

◆ Progress

friend class Progress

Definition at line 393 of file Debugger.h.


friend class REPL

Definition at line 392 of file Debugger.h.

◆ SourceManager

friend class SourceManager

Definition at line 73 of file Debugger.h.

Member Data Documentation

◆ g_load_plugin_callback

LoadPluginCallbackType Debugger::g_load_plugin_callback = nullptr

Definition at line 508 of file Debugger.h.

◆ m_broadcaster

Broadcaster lldb_private::Debugger::m_broadcaster

Public Debugger event broadcaster.

Definition at line 514 of file Debugger.h.

Referenced by GetBroadcaster().

◆ m_broadcaster_manager_sp

lldb::BroadcasterManagerSP lldb_private::Debugger::m_broadcaster_manager_sp

Definition at line 476 of file Debugger.h.

Referenced by Clear(), DefaultEventHandler(), and GetBroadcasterManager().

◆ m_clear_once

llvm::once_flag lldb_private::Debugger::m_clear_once

Definition at line 516 of file Debugger.h.

Referenced by Clear().

◆ m_command_interpreter_up

std::unique_ptr<CommandInterpreter> lldb_private::Debugger::m_command_interpreter_up

◆ m_dummy_target_sp

lldb::TargetSP lldb_private::Debugger::m_dummy_target_sp

Definition at line 517 of file Debugger.h.

Referenced by Debugger(), and GetDummyTarget().

◆ m_error_stream_sp

lldb::StreamFileSP lldb_private::Debugger::m_error_stream_sp

Definition at line 471 of file Debugger.h.

Referenced by GetErrorFile(), GetErrorStream(), GetErrorStreamSP(), and SetErrorFile().

◆ m_event_handler_thread

HostThread lldb_private::Debugger::m_event_handler_thread

Definition at line 511 of file Debugger.h.

Referenced by IsHandlingEvents(), StartEventHandlerThread(), and StopEventHandlerThread().

◆ m_forward_listener_sp

lldb::ListenerSP lldb_private::Debugger::m_forward_listener_sp

◆ m_input_file_sp

lldb::FileSP lldb_private::Debugger::m_input_file_sp

Definition at line 469 of file Debugger.h.

Referenced by GetInputFile(), GetInputFileSP(), and SetInputFile().

◆ m_input_recorder

repro::DataRecorder* lldb_private::Debugger::m_input_recorder

Used for shadowing the input file when capturing a reproducer.

Definition at line 474 of file Debugger.h.

Referenced by GetInputRecorder(), and SetInputFile().

◆ m_instance_name

ConstString lldb_private::Debugger::m_instance_name

Definition at line 507 of file Debugger.h.

Referenced by Debugger(), and GetInstanceName().

◆ m_io_handler_stack

IOHandlerStack lldb_private::Debugger::m_io_handler_stack

◆ m_io_handler_synchronous_mutex

std::recursive_mutex lldb_private::Debugger::m_io_handler_synchronous_mutex

Definition at line 503 of file Debugger.h.

Referenced by RunIOHandlers(), and RunIOHandlerSync().

◆ m_io_handler_thread

HostThread lldb_private::Debugger::m_io_handler_thread

◆ m_listener_sp

lldb::ListenerSP lldb_private::Debugger::m_listener_sp

Definition at line 486 of file Debugger.h.

Referenced by Clear(), and GetListener().

◆ m_loaded_plugins

LoadedPluginsList lldb_private::Debugger::m_loaded_plugins

Definition at line 510 of file Debugger.h.

◆ m_log_callback_stream_sp

std::shared_ptr<llvm::raw_ostream> lldb_private::Debugger::m_log_callback_stream_sp

Definition at line 506 of file Debugger.h.

Referenced by Debugger(), EnableLog(), and SetLoggingCallback().

◆ m_log_streams

llvm::StringMap<std::weak_ptr<llvm::raw_ostream> > lldb_private::Debugger::m_log_streams

Definition at line 505 of file Debugger.h.

Referenced by EnableLog().

◆ m_output_flush_mutex

std::mutex lldb_private::Debugger::m_output_flush_mutex

Definition at line 458 of file Debugger.h.

Referenced by FlushProcessOutput().

◆ m_output_stream_sp

lldb::StreamFileSP lldb_private::Debugger::m_output_stream_sp

Definition at line 470 of file Debugger.h.

Referenced by GetOutputFile(), GetOutputStream(), GetOutputStreamSP(), and SetOutputFile().

◆ m_platform_list

PlatformList lldb_private::Debugger::m_platform_list

Definition at line 485 of file Debugger.h.

Referenced by Debugger(), and GetPlatformList().

◆ m_script_interpreter_mutex

std::recursive_mutex lldb_private::Debugger::m_script_interpreter_mutex

Definition at line 498 of file Debugger.h.

Referenced by GetScriptInterpreter().

◆ m_script_interpreters

std::array<lldb::ScriptInterpreterSP, lldb::eScriptLanguageUnknown> lldb_private::Debugger::m_script_interpreters

Definition at line 500 of file Debugger.h.

Referenced by GetScriptInterpreter().

◆ m_source_file_cache

SourceManager::SourceFileCache lldb_private::Debugger::m_source_file_cache

Definition at line 491 of file Debugger.h.

Referenced by GetSourceFileCache().

◆ m_source_manager_up

std::unique_ptr<SourceManager> lldb_private::Debugger::m_source_manager_up

Definition at line 487 of file Debugger.h.

Referenced by GetSourceManager().

◆ m_sync_broadcaster

Broadcaster lldb_private::Debugger::m_sync_broadcaster

Private debugger synchronization.

Definition at line 513 of file Debugger.h.

Referenced by DefaultEventHandler(), and StartEventHandlerThread().

◆ m_target_list

TargetList lldb_private::Debugger::m_target_list

Definition at line 483 of file Debugger.h.

Referenced by Clear(), GetSelectedOrDummyTarget(), GetSelectedTarget(), and GetTargetList().

◆ m_terminal_state

TerminalState lldb_private::Debugger::m_terminal_state

Definition at line 482 of file Debugger.h.

Referenced by Clear(), RestoreInputTerminalState(), and SaveInputTerminalState().

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