LLDB mainline
lldb_private::Target Class Reference

#include <Target.h>

Inheritance diagram for lldb_private::Target:
[legend]

Classes

class  Arch
struct  DummySignalValues
 Add a signal for the target. More...
class  StopHook
class  StopHookCommandLine
class  StopHookScripted
class  TargetEventData

Public Types

enum  {
  eBroadcastBitBreakpointChanged = (1 << 0) , eBroadcastBitModulesLoaded = (1 << 1) , eBroadcastBitModulesUnloaded = (1 << 2) , eBroadcastBitWatchpointChanged = (1 << 3) ,
  eBroadcastBitSymbolsLoaded = (1 << 4) , eBroadcastBitSymbolsChanged = (1 << 5)
}
 Broadcaster event bits definitions. More...
typedef std::shared_ptr< StopHookStopHookSP

Public Member Functions

llvm::StringRef GetBroadcasterClass () const override
 This needs to be filled in if you are going to register the broadcaster with the broadcaster manager and do broadcaster class matching.
 ~Target () override
bool IsDummyTarget () const
const std::string & GetLabel () const
llvm::Error SetLabel (llvm::StringRef label)
 Set a label for a target.
lldb::ModuleSP GetOrCreateModule (const ModuleSpec &module_spec, bool notify, Status *error_ptr=nullptr)
 Find a binary on the system and return its Module, or return an existing Module that is already in the Target.
std::recursive_mutex & GetAPIMutex ()
void DeleteCurrentProcess ()
void CleanupProcess ()
void Dump (Stream *s, lldb::DescriptionLevel description_level)
 Dump a description of this object to a Stream.
const lldb::ProcessSPCreateProcess (lldb::ListenerSP listener_sp, llvm::StringRef plugin_name, const FileSpec *crash_file, bool can_connect)
const lldb::ProcessSPGetProcessSP () const
bool IsValid ()
void Destroy ()
Status Launch (ProcessLaunchInfo &launch_info, Stream *stream)
Status Attach (ProcessAttachInfo &attach_info, Stream *stream)
BreakpointListGetBreakpointList (bool internal=false)
const BreakpointListGetBreakpointList (bool internal=false) const
lldb::BreakpointSP GetLastCreatedBreakpoint ()
lldb::BreakpointSP GetBreakpointByID (lldb::break_id_t break_id)
lldb::BreakpointSP CreateBreakpointAtUserEntry (Status &error)
lldb::BreakpointSP CreateBreakpoint (const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, uint32_t column, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool request_hardware, LazyBool move_to_nearest_code)
lldb::BreakpointSP CreateSourceRegexBreakpoint (const FileSpecList *containingModules, const FileSpecList *source_file_list, const std::unordered_set< std::string > &function_names, RegularExpression source_regex, bool internal, bool request_hardware, LazyBool move_to_nearest_code)
lldb::BreakpointSP CreateBreakpoint (lldb::addr_t load_addr, bool internal, bool request_hardware)
lldb::BreakpointSP CreateAddressInModuleBreakpoint (lldb::addr_t file_addr, bool internal, const FileSpec &file_spec, bool request_hardware)
lldb::BreakpointSP CreateBreakpoint (const Address &addr, bool internal, bool request_hardware)
lldb::BreakpointSP CreateFuncRegexBreakpoint (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, RegularExpression func_regexp, lldb::LanguageType requested_language, LazyBool skip_prologue, bool internal, bool request_hardware)
lldb::BreakpointSP CreateBreakpoint (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_name, lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language, lldb::addr_t offset, bool offset_is_insn_count, LazyBool skip_prologue, bool internal, bool request_hardware)
lldb::BreakpointSP CreateExceptionBreakpoint (enum lldb::LanguageType language, bool catch_bp, bool throw_bp, bool internal, Args *additional_args=nullptr, Status *additional_args_error=nullptr)
lldb::BreakpointSP CreateScriptedBreakpoint (const llvm::StringRef class_name, const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, bool internal, bool request_hardware, StructuredData::ObjectSP extra_args_sp, Status *creation_error=nullptr)
lldb::BreakpointSP CreateBreakpoint (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_names[], size_t num_names, lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language, lldb::addr_t offset, LazyBool skip_prologue, bool internal, bool request_hardware)
lldb::BreakpointSP CreateBreakpoint (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const std::vector< std::string > &func_names, lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language, lldb::addr_t m_offset, LazyBool skip_prologue, bool internal, bool request_hardware)
lldb::BreakpointSP CreateBreakpoint (lldb::SearchFilterSP &filter_sp, lldb::BreakpointResolverSP &resolver_sp, bool internal, bool request_hardware, bool resolve_indirect_symbols)
lldb::WatchpointSP CreateWatchpoint (lldb::addr_t addr, size_t size, const CompilerType *type, uint32_t kind, Status &error)
lldb::WatchpointSP GetLastCreatedWatchpoint ()
WatchpointListGetWatchpointList ()
void AddNameToBreakpoint (BreakpointID &id, llvm::StringRef name, Status &error)
void AddNameToBreakpoint (lldb::BreakpointSP &bp_sp, llvm::StringRef name, Status &error)
void RemoveNameFromBreakpoint (lldb::BreakpointSP &bp_sp, ConstString name)
BreakpointNameFindBreakpointName (ConstString name, bool can_create, Status &error)
void DeleteBreakpointName (ConstString name)
void ConfigureBreakpointName (BreakpointName &bp_name, const BreakpointOptions &options, const BreakpointName::Permissions &permissions)
void ApplyNameToBreakpoints (BreakpointName &bp_name)
void AddBreakpointName (std::unique_ptr< BreakpointName > bp_name)
void GetBreakpointNames (std::vector< std::string > &names)
void RemoveAllBreakpoints (bool internal_also=false)
void RemoveAllowedBreakpoints ()
void DisableAllBreakpoints (bool internal_also=false)
void DisableAllowedBreakpoints ()
void EnableAllBreakpoints (bool internal_also=false)
void EnableAllowedBreakpoints ()
bool DisableBreakpointByID (lldb::break_id_t break_id)
bool EnableBreakpointByID (lldb::break_id_t break_id)
bool RemoveBreakpointByID (lldb::break_id_t break_id)
void ResetBreakpointHitCounts ()
 Resets the hit count of all breakpoints.
bool RemoveAllWatchpoints (bool end_to_end=true)
bool DisableAllWatchpoints (bool end_to_end=true)
bool EnableAllWatchpoints (bool end_to_end=true)
bool ClearAllWatchpointHitCounts ()
bool ClearAllWatchpointHistoricValues ()
bool IgnoreAllWatchpoints (uint32_t ignore_count)
bool DisableWatchpointByID (lldb::watch_id_t watch_id)
bool EnableWatchpointByID (lldb::watch_id_t watch_id)
bool RemoveWatchpointByID (lldb::watch_id_t watch_id)
bool IgnoreWatchpointByID (lldb::watch_id_t watch_id, uint32_t ignore_count)
Status SerializeBreakpointsToFile (const FileSpec &file, const BreakpointIDList &bp_ids, bool append)
Status CreateBreakpointsFromFile (const FileSpec &file, BreakpointIDList &new_bps)
Status CreateBreakpointsFromFile (const FileSpec &file, std::vector< std::string > &names, BreakpointIDList &new_bps)
lldb::addr_t GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class=AddressClass::eInvalid) const
 Get load_addr as a callable code load address for this target.
lldb::addr_t GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class=AddressClass::eInvalid) const
 Get load_addr as an opcode for this target.
lldb::addr_t GetBreakableLoadAddress (lldb::addr_t addr)
void ModulesDidLoad (ModuleList &module_list)
void ModulesDidUnload (ModuleList &module_list, bool delete_locations)
void SymbolsDidLoad (ModuleList &module_list)
void ClearModules (bool delete_locations)
void DidExec ()
 Called as the last function in Process::DidExec().
lldb::ModuleSP GetExecutableModule ()
 Gets the module for the main executable.
ModuleGetExecutableModulePointer ()
void SetExecutableModule (lldb::ModuleSP &module_sp, LoadDependentFiles load_dependent_files=eLoadDependentsDefault)
 Set the main executable module.
bool LoadScriptingResources (std::list< Status > &errors, Stream &feedback_stream, bool continue_on_error=true)
const ModuleListGetImages () const
 Get accessor for the images for this process.
ModuleListGetImages ()
bool ModuleIsExcludedForUnconstrainedSearches (const FileSpec &module_spec)
 Return whether this FileSpec corresponds to a module that should be considered for general searches.
bool ModuleIsExcludedForUnconstrainedSearches (const lldb::ModuleSP &module_sp)
 Return whether this module should be considered for general searches.
const ArchSpecGetArchitecture () const
llvm::StringRef GetABIName () const
 Returns the name of the target's ABI plugin.
bool SetArchitecture (const ArchSpec &arch_spec, bool set_platform=false, bool merge=true)
 Set the architecture for this target.
bool MergeArchitecture (const ArchSpec &arch_spec)
ArchitectureGetArchitecturePlugin () const
DebuggerGetDebugger () const
size_t ReadMemoryFromFileCache (const Address &addr, void *dst, size_t dst_len, Status &error)
virtual size_t ReadMemory (const Address &addr, void *dst, size_t dst_len, Status &error, bool force_live_memory=false, lldb::addr_t *load_addr_ptr=nullptr, bool *did_read_live_memory=nullptr)
size_t ReadCStringFromMemory (const Address &addr, std::string &out_str, Status &error, bool force_live_memory=false)
size_t ReadCStringFromMemory (const Address &addr, char *dst, size_t dst_max_len, Status &result_error, bool force_live_memory=false)
size_t ReadStringFromMemory (const Address &addr, char *dst, size_t max_bytes, Status &error, size_t type_width, bool force_live_memory=true)
 Read a NULL terminated string from memory.
size_t ReadScalarIntegerFromMemory (const Address &addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Status &error, bool force_live_memory=false)
int64_t ReadSignedIntegerFromMemory (const Address &addr, size_t integer_byte_size, int64_t fail_value, Status &error, bool force_live_memory=false)
uint64_t ReadUnsignedIntegerFromMemory (const Address &addr, size_t integer_byte_size, uint64_t fail_value, Status &error, bool force_live_memory=false)
bool ReadPointerFromMemory (const Address &addr, Status &error, Address &pointer_addr, bool force_live_memory=false)
bool HasLoadedSections ()
lldb::addr_t GetSectionLoadAddress (const lldb::SectionSP &section_sp)
void ClearSectionLoadList ()
void DumpSectionLoadList (Stream &s)
lldb::TargetSP CalculateTarget () override
lldb::ProcessSP CalculateProcess () override
lldb::ThreadSP CalculateThread () override
lldb::StackFrameSP CalculateStackFrame () override
void CalculateExecutionContext (ExecutionContext &exe_ctx) override
 Reconstruct the object's execution context into sc.
PathMappingListGetImageSearchPathList ()
llvm::Expected< lldb::TypeSystemSPGetScratchTypeSystemForLanguage (lldb::LanguageType language, bool create_on_demand=true)
std::vector< lldb::TypeSystemSPGetScratchTypeSystems (bool create_on_demand=true)
PersistentExpressionStateGetPersistentExpressionStateForLanguage (lldb::LanguageType language)
UserExpressionGetUserExpressionForLanguage (llvm::StringRef expr, llvm::StringRef prefix, SourceLanguage language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj, Status &error)
FunctionCallerGetFunctionCallerForLanguage (lldb::LanguageType language, const CompilerType &return_type, const Address &function_address, const ValueList &arg_value_list, const char *name, Status &error)
llvm::Expected< std::unique_ptr< UtilityFunction > > CreateUtilityFunction (std::string expression, std::string name, lldb::LanguageType language, ExecutionContext &exe_ctx)
 Creates and installs a UtilityFunction for the given language.
Status Install (ProcessLaunchInfo *launch_info)
bool ResolveFileAddress (lldb::addr_t load_addr, Address &so_addr)
bool ResolveLoadAddress (lldb::addr_t load_addr, Address &so_addr, uint32_t stop_id=SectionLoadHistory::eStopIDNow, bool allow_section_end=false)
bool SetSectionLoadAddress (const lldb::SectionSP &section, lldb::addr_t load_addr, bool warn_multiple=false)
size_t UnloadModuleSections (const lldb::ModuleSP &module_sp)
size_t UnloadModuleSections (const ModuleList &module_list)
bool SetSectionUnloaded (const lldb::SectionSP &section_sp)
bool SetSectionUnloaded (const lldb::SectionSP &section_sp, lldb::addr_t load_addr)
void ClearAllLoadedSections ()
lldb_private::SummaryStatisticsSP GetSummaryStatisticsSPForProviderName (lldb_private::TypeSummaryImpl &summary_provider)
lldb_private::SummaryStatisticsCacheGetSummaryStatisticsCache ()
void SetTrace (const lldb::TraceSP &trace_sp)
 Set the Trace object containing processor trace information of this target.
lldb::TraceSP GetTrace ()
 Get the Trace object containing processor trace information of this target.
llvm::Expected< lldb::TraceSPCreateTrace ()
 Create a Trace object for the current target using the using the default supported tracing technology for this process.
llvm::Expected< lldb::TraceSPGetTraceOrCreate ()
 If a Trace object is present, this returns it, otherwise a new Trace is created with Trace::CreateTrace.
lldb::ExpressionResults EvaluateExpression (llvm::StringRef expression, ExecutionContextScope *exe_scope, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions &options=EvaluateExpressionOptions(), std::string *fixed_expression=nullptr, ValueObject *ctx_obj=nullptr)
lldb::ExpressionVariableSP GetPersistentVariable (ConstString name)
lldb::addr_t GetPersistentSymbol (ConstString name)
llvm::Expected< lldb_private::AddressGetEntryPointAddress ()
 This method will return the address of the starting function for this binary, e.g.
CompilerType GetRegisterType (const std::string &name, const lldb_private::RegisterFlags &flags, uint32_t byte_size)
llvm::Expected< lldb::DisassemblerSPReadInstructions (const Address &start_addr, uint32_t count, const char *flavor_string=nullptr)
StopHookSP CreateStopHook (StopHook::StopHookKind kind)
 Add an empty stop hook to the Target's stop hook list, and returns a shared pointer to it in new_hook.
void UndoCreateStopHook (lldb::user_id_t uid)
 If you tried to create a stop hook, and that failed, call this to remove the stop hook, as it will also reset the stop hook counter.
bool RunStopHooks (bool at_initial_stop=false)
size_t GetStopHookSize ()
bool SetSuppresStopHooks (bool suppress)
bool GetSuppressStopHooks ()
bool RemoveStopHookByID (lldb::user_id_t uid)
void RemoveAllStopHooks ()
StopHookSP GetStopHookByID (lldb::user_id_t uid)
bool SetStopHookActiveStateByID (lldb::user_id_t uid, bool active_state)
void SetAllStopHooksActiveState (bool active_state)
size_t GetNumStopHooks () const
StopHookSP GetStopHookAtIndex (size_t index)
lldb::PlatformSP GetPlatform ()
void SetPlatform (const lldb::PlatformSP &platform_sp)
SourceManagerGetSourceManager ()
lldb::SearchFilterSP GetSearchFilterForModule (const FileSpec *containingModule)
lldb::SearchFilterSP GetSearchFilterForModuleList (const FileSpecList *containingModuleList)
lldb::SearchFilterSP GetSearchFilterForModuleAndCUList (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles)
lldb::REPLSP GetREPL (Status &err, lldb::LanguageType language, const char *repl_options, bool can_create)
void SetREPL (lldb::LanguageType language, lldb::REPLSP repl_sp)
StackFrameRecognizerManagerGetFrameRecognizerManager ()
void SaveScriptedLaunchInfo (lldb_private::ProcessInfo &process_info)
void AddDummySignal (llvm::StringRef name, LazyBool pass, LazyBool print, LazyBool stop)
 Add a signal to the Target's list of stored signals/actions.
void UpdateSignalsFromDummy (lldb::UnixSignalsSP signals_sp, lldb::StreamSP warning_stream_sp)
 Updates the signals in signals_sp using the stored dummy signals.
void ClearDummySignals (Args &signal_names)
 Clear the dummy signals in signal_names from the target, or all signals if signal_names is empty.
void PrintDummySignals (Stream &strm, Args &signals)
 Print all the signals set in this target.
llvm::json::Value ReportStatistics (const lldb_private::StatisticsOptions &options)
 Get metrics associated with this target in JSON format.
void ResetStatistics ()
TargetStatsGetStatistics ()
Public Member Functions inherited from lldb_private::TargetProperties
 TargetProperties (Target *target)
 ~TargetProperties () override
ArchSpec GetDefaultArchitecture () const
void SetDefaultArchitecture (const ArchSpec &arch)
bool GetMoveToNearestCode () const
lldb::DynamicValueType GetPreferDynamicValue () const
bool SetPreferDynamicValue (lldb::DynamicValueType d)
bool GetPreloadSymbols () const
void SetPreloadSymbols (bool b)
bool GetDisableASLR () const
void SetDisableASLR (bool b)
bool GetInheritTCC () const
void SetInheritTCC (bool b)
bool GetDetachOnError () const
void SetDetachOnError (bool b)
bool GetDisableSTDIO () const
void SetDisableSTDIO (bool b)
llvm::StringRef GetLaunchWorkingDirectory () const
bool GetParallelModuleLoad () const
const char * GetDisassemblyFlavor () const
const char * GetDisassemblyCPU () const
const char * GetDisassemblyFeatures () const
InlineStrategy GetInlineStrategy () const
RealpathPrefixes GetSourceRealpathPrefixes () const
llvm::StringRef GetArg0 () const
void SetArg0 (llvm::StringRef arg)
bool GetRunArguments (Args &args) const
void SetRunArguments (const Args &args)
Environment GetEnvironment () const
Environment GetInheritedEnvironment () const
Environment GetTargetEnvironment () const
void SetEnvironment (Environment env)
bool GetSkipPrologue () const
PathMappingListGetSourcePathMap () const
PathMappingListGetObjectPathMap () const
bool GetAutoSourceMapRelative () const
FileSpecList GetExecutableSearchPaths ()
void AppendExecutableSearchPaths (const FileSpec &)
FileSpecList GetDebugFileSearchPaths ()
FileSpecList GetClangModuleSearchPaths ()
bool GetEnableAutoImportClangModules () const
ImportStdModule GetImportStdModule () const
DynamicClassInfoHelper GetDynamicClassInfoHelper () const
bool GetEnableAutoApplyFixIts () const
uint64_t GetNumberOfRetriesWithFixits () const
bool GetEnableNotifyAboutFixIts () const
FileSpec GetSaveJITObjectsDir () const
bool GetEnableSyntheticValue () const
bool ShowHexVariableValuesWithLeadingZeroes () const
uint32_t GetMaxZeroPaddingInFloatFormat () const
uint32_t GetMaximumNumberOfChildrenToDisplay () const
std::pair< uint32_t, boolGetMaximumDepthOfChildrenToDisplay () const
 Get the max depth value, augmented with a bool to indicate whether the depth is the default.
uint32_t GetMaximumSizeOfStringSummary () const
uint32_t GetMaximumMemReadSize () const
FileSpec GetStandardInputPath () const
FileSpec GetStandardErrorPath () const
FileSpec GetStandardOutputPath () const
void SetStandardInputPath (llvm::StringRef path)
void SetStandardOutputPath (llvm::StringRef path)
void SetStandardErrorPath (llvm::StringRef path)
void SetStandardInputPath (const char *path)=delete
void SetStandardOutputPath (const char *path)=delete
void SetStandardErrorPath (const char *path)=delete
bool GetBreakpointsConsultPlatformAvoidList ()
SourceLanguage GetLanguage () const
llvm::StringRef GetExpressionPrefixContents ()
uint64_t GetExprErrorLimit () const
uint64_t GetExprAllocAddress () const
uint64_t GetExprAllocSize () const
uint64_t GetExprAllocAlign () const
bool GetUseHexImmediates () const
bool GetUseFastStepping () const
bool GetDisplayExpressionsInCrashlogs () const
LoadScriptFromSymFile GetLoadScriptFromSymbolFile () const
LoadCWDlldbinitFile GetLoadCWDlldbinitFile () const
Disassembler::HexImmediateStyle GetHexImmediateStyle () const
MemoryModuleLoadLevel GetMemoryModuleLoadLevel () const
bool GetUserSpecifiedTrapHandlerNames (Args &args) const
void SetUserSpecifiedTrapHandlerNames (const Args &args)
bool GetDisplayRuntimeSupportValues () const
void SetDisplayRuntimeSupportValues (bool b)
bool GetDisplayRecognizedArguments () const
void SetDisplayRecognizedArguments (bool b)
const ProcessLaunchInfoGetProcessLaunchInfo () const
void SetProcessLaunchInfo (const ProcessLaunchInfo &launch_info)
bool GetInjectLocalVariables (ExecutionContext *exe_ctx) const
bool GetUseDIL (ExecutionContext *exe_ctx) const
void SetUseDIL (ExecutionContext *exe_ctx, bool b)
void SetRequireHardwareBreakpoints (bool b)
bool GetRequireHardwareBreakpoints () const
bool GetAutoInstallMainExecutable () const
void UpdateLaunchInfoFromProperties ()
void SetDebugUtilityExpression (bool debug)
bool GetDebugUtilityExpression () const
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 SetPropertyValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef property_path, llvm::StringRef value)
virtual Status DumpPropertyValue (const ExecutionContext *exe_ctx, Stream &strm, llvm::StringRef property_path, uint32_t dump_mask, bool is_json=false)
virtual void DumpAllPropertyValues (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask, bool is_json=false)
virtual void DumpAllDescriptions (CommandInterpreter &interpreter, Stream &strm) const
size_t Apropos (llvm::StringRef keyword, std::vector< const Property * > &matching_properties) const
template<typename 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
Public Member Functions inherited from lldb_private::Broadcaster
 Broadcaster (lldb::BroadcasterManagerSP manager_sp, std::string name)
 Construct with a broadcaster with a name.
virtual ~Broadcaster ()
 Destructor.
void CheckInWithManager ()
void BroadcastEvent (lldb::EventSP &event_sp)
 Broadcast an event which has no associated data.
void BroadcastEventIfUnique (lldb::EventSP &event_sp)
void BroadcastEvent (uint32_t event_type, const lldb::EventDataSP &event_data_sp)
void BroadcastEvent (uint32_t event_type)
void BroadcastEventIfUnique (uint32_t event_type)
void Clear ()
virtual void AddInitialEventsToListener (const lldb::ListenerSP &listener_sp, uint32_t requested_events)
uint32_t AddListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask)
 Listen for any events specified by event_mask.
const std::string & GetBroadcasterName ()
 Get this broadcaster's name.
bool GetEventNames (Stream &s, const uint32_t event_mask, bool prefix_with_broadcaster_name) const
 Get the event name(s) for one or more event bits.
void SetEventName (uint32_t event_mask, const char *name)
 Set the name for an event bit.
const char * GetEventName (uint32_t event_mask) const
bool EventTypeHasListeners (uint32_t event_type)
bool RemoveListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX)
 Removes a Listener from this broadcasters list and frees the event bits specified by event_mask that were previously acquired by listener (assuming listener was listening to this object) for other listener objects to use.
bool HijackBroadcaster (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX)
 Provides a simple mechanism to temporarily redirect events from broadcaster.
bool IsHijackedForEvent (uint32_t event_mask)
void RestoreBroadcaster ()
 Restore the state of the Broadcaster from a previous hijack attempt.
lldb::BroadcasterManagerSP GetManager ()
void SetPrimaryListener (lldb::ListenerSP listener_sp)
lldb::ListenerSP GetPrimaryListener ()
Public Member Functions inherited from lldb_private::ExecutionContextScope
virtual ~ExecutionContextScope ()=default
Public Member Functions inherited from lldb_private::ModuleList::Notifier
virtual ~Notifier ()=default

Static Public Member Functions

static llvm::StringRef GetStaticBroadcasterClass ()
static void SettingsInitialize ()
static void SettingsTerminate ()
static FileSpecList GetDefaultExecutableSearchPaths ()
static FileSpecList GetDefaultDebugFileSearchPaths ()
static ArchSpec GetDefaultArchitecture ()
static void SetDefaultArchitecture (const ArchSpec &arch)
static TargetPropertiesGetGlobalProperties ()
static TargetGetTargetFromContexts (const ExecutionContext *exe_ctx_ptr, const SymbolContext *sc_ptr)
Static Public Member Functions inherited from lldb_private::Properties
static llvm::StringRef GetExperimentalSettingsName ()
static bool IsSettingExperimental (llvm::StringRef setting)

Protected Types

using DummySignalElement = llvm::StringMapEntry<DummySignalValues>
using BreakpointNameList
typedef std::map< lldb::LanguageType, lldb::REPLSPREPLMap
typedef std::map< lldb::user_id_t, StopHookSPStopHookCollection
Protected Types inherited from lldb_private::Broadcaster
typedef std::shared_ptr< BroadcasterImplBroadcasterImplSP
typedef std::weak_ptr< BroadcasterImplBroadcasterImplWP

Protected Member Functions

void NotifyModuleAdded (const ModuleList &module_list, const lldb::ModuleSP &module_sp) override
 Implementing of ModuleList::Notifier.
void NotifyModuleRemoved (const ModuleList &module_list, const lldb::ModuleSP &module_sp) override
void NotifyModuleUpdated (const ModuleList &module_list, const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp) override
void NotifyWillClearList (const ModuleList &module_list) override
void NotifyModulesRemoved (lldb_private::ModuleList &module_list) override
 Target (Debugger &debugger, const ArchSpec &target_arch, const lldb::PlatformSP &platform_sp, bool is_dummy_target)
 Construct with optional file and arch.
bool ProcessIsValid ()
void PrimeFromDummyTarget (Target &target)
void AddBreakpoint (lldb::BreakpointSP breakpoint_sp, bool internal)
void FinalizeFileActions (ProcessLaunchInfo &info)
lldb::addr_t GetReasonableReadSize (const Address &addr)
 Return a recommended size for memory reads at addr, optimizing for cache usage.
 Target (const Target &)=delete
const Targetoperator= (const Target &)=delete
SectionLoadListGetSectionLoadList ()
Protected Member Functions inherited from lldb_private::Broadcaster
BroadcasterImplSP GetBroadcasterImpl ()
const char * GetHijackingListenerName ()

Static Protected Member Functions

static bool UpdateSignalFromDummy (lldb::UnixSignalsSP signals_sp, const DummySignalElement &element)
static bool ResetSignalFromDummy (lldb::UnixSignalsSP signals_sp, const DummySignalElement &element)
static void ImageSearchPathsChanged (const PathMappingList &path_list, void *baton)

Protected Attributes

Debuggerm_debugger
lldb::PlatformSP m_platform_sp
 The platform for this target.
std::recursive_mutex m_mutex
 An API mutex that is used by the lldb::SB* classes make the SB interface thread safe.
std::recursive_mutex m_private_mutex
 When the private state thread calls SB API's - usually because it is running OS plugin or Python ThreadPlan code - it should not block on the API mutex that is held by the code that kicked off the sequence of events that led us to run the code.
Arch m_arch
std::string m_label
ModuleList m_images
 The list of images for this process (shared libraries and anything dynamically loaded).
SummaryStatisticsCache m_summary_statistics_cache
SectionLoadHistory m_section_load_history
BreakpointList m_breakpoint_list
BreakpointList m_internal_breakpoint_list
BreakpointNameList m_breakpoint_names
lldb::BreakpointSP m_last_created_breakpoint
WatchpointList m_watchpoint_list
lldb::WatchpointSP m_last_created_watchpoint
lldb::ProcessSP m_process_sp
lldb::SearchFilterSP m_search_filter_sp
PathMappingList m_image_search_paths
TypeSystemMap m_scratch_type_system_map
REPLMap m_repl_map
lldb::SourceManagerUP m_source_manager_up
StopHookCollection m_stop_hooks
lldb::user_id_t m_stop_hook_next_id
uint32_t m_latest_stop_hook_id
bool m_valid
 This records the last natural stop at which we ran a stop-hook.
bool m_suppress_stop_hooks
bool m_is_dummy_target
 Used to not run stop hooks for expressions.
unsigned m_next_persistent_variable_index = 0
lldb::TraceSP m_trace_sp
 An optional lldb_private::Trace object containing processor trace information of this target.
lldb::StackFrameRecognizerManagerUP m_frame_recognizer_manager_up
 Stores the frame recognizers of this target.
llvm::StringMap< DummySignalValuesm_dummy_signals
 These are used to set the signal state when you don't have a process and more usefully in the Dummy target where you can't know exactly what signals you will have.
Protected Attributes inherited from lldb_private::Properties
lldb::OptionValuePropertiesSP m_collection_sp

Private Attributes

TargetStats m_stats

Friends

class TargetList
class Debugger

Detailed Description

Definition at line 523 of file Target.h.

Member Typedef Documentation

◆ BreakpointNameList

Initial value:
std::map<ConstString, std::unique_ptr<BreakpointName>>

Definition at line 1625 of file Target.h.

◆ DummySignalElement

using lldb_private::Target::DummySignalElement = llvm::StringMapEntry<DummySignalValues>
protected

Definition at line 1552 of file Target.h.

◆ REPLMap

Definition at line 1640 of file Target.h.

◆ StopHookCollection

Definition at line 1645 of file Target.h.

◆ StopHookSP

typedef std::shared_ptr<StopHook> lldb_private::Target::StopHookSP

Definition at line 1460 of file Target.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Broadcaster event bits definitions.

Enumerator
eBroadcastBitBreakpointChanged 
eBroadcastBitModulesLoaded 
eBroadcastBitModulesUnloaded 
eBroadcastBitWatchpointChanged 
eBroadcastBitSymbolsLoaded 
eBroadcastBitSymbolsChanged 

Definition at line 533 of file Target.h.

Constructor & Destructor Documentation

◆ ~Target()

Target::~Target ( )
override

◆ Target() [1/2]

Target::Target ( Debugger & debugger,
const ArchSpec & target_arch,
const lldb::PlatformSP & platform_sp,
bool is_dummy_target )
protected

◆ Target() [2/2]

lldb_private::Target::Target ( const Target & )
protecteddelete

References Target().

Member Function Documentation

◆ AddBreakpoint()

◆ AddBreakpointName()

void Target::AddBreakpointName ( std::unique_ptr< BreakpointName > bp_name)

Definition at line 848 of file Target.cpp.

References m_breakpoint_names.

Referenced by PrimeFromDummyTarget().

◆ AddDummySignal()

void Target::AddDummySignal ( llvm::StringRef name,
LazyBool pass,
LazyBool print,
LazyBool stop )

Add a signal to the Target's list of stored signals/actions.

These values will get copied into any processes launched from this target.

Definition at line 3764 of file Target.cpp.

References lldb_private::eLazyBoolCalculate, and m_dummy_signals.

Referenced by CommandObjectProcessHandle::DoExecute().

◆ AddNameToBreakpoint() [1/2]

◆ AddNameToBreakpoint() [2/2]

void Target::AddNameToBreakpoint ( lldb::BreakpointSP & bp_sp,
llvm::StringRef name,
Status & error )

◆ ApplyNameToBreakpoints()

◆ Attach()

◆ CalculateExecutionContext()

void Target::CalculateExecutionContext ( ExecutionContext & exe_ctx)
overridevirtual

Reconstruct the object's execution context into sc.

The object should fill in as much of the ExecutionContextScope as it can so function calls that require a execution context can be made for the given object.

Parameters
[out]exe_ctxA reference to an execution context object that gets filled in.

Implements lldb_private::ExecutionContextScope.

Definition at line 2588 of file Target.cpp.

References lldb_private::ExecutionContext::Clear(), and lldb_private::ExecutionContext::SetTargetPtr().

Referenced by EvaluateExpression().

◆ CalculateProcess()

ProcessSP Target::CalculateProcess ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2582 of file Target.cpp.

References m_process_sp.

Referenced by CommandObjectTargetModulesLoad::DoExecute().

◆ CalculateStackFrame()

StackFrameSP Target::CalculateStackFrame ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2586 of file Target.cpp.

◆ CalculateTarget()

TargetSP Target::CalculateTarget ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2580 of file Target.cpp.

Referenced by lldb_private::ABI::GetReturnValueObject().

◆ CalculateThread()

ThreadSP Target::CalculateThread ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2584 of file Target.cpp.

◆ CleanupProcess()

◆ ClearAllLoadedSections()

void Target::ClearAllLoadedSections ( )

◆ ClearAllWatchpointHistoricValues()

bool Target::ClearAllWatchpointHistoricValues ( )

Definition at line 1415 of file Target.cpp.

References lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, and lldb_private::Watchpoints.

Referenced by CleanupProcess().

◆ ClearAllWatchpointHitCounts()

bool Target::ClearAllWatchpointHitCounts ( )

Definition at line 1401 of file Target.cpp.

References lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, and lldb_private::Watchpoints.

Referenced by CleanupProcess().

◆ ClearDummySignals()

void Target::ClearDummySignals ( Args & signal_names)

Clear the dummy signals in signal_names from the target, or all signals if signal_names is empty.

Also remove the behaviors they set from the process's signals if it exists.

Definition at line 3833 of file Target.cpp.

References lldb_private::Args::GetArgumentCount(), GetProcessSP(), m_dummy_signals, and ResetSignalFromDummy().

Referenced by Destroy(), and CommandObjectProcessHandle::DoExecute().

◆ ClearModules()

void Target::ClearModules ( bool delete_locations)

◆ ClearSectionLoadList()

void Target::ClearSectionLoadList ( )

◆ ConfigureBreakpointName()

◆ CreateAddressInModuleBreakpoint()

lldb::BreakpointSP Target::CreateAddressInModuleBreakpoint ( lldb::addr_t file_addr,
bool internal,
const FileSpec & file_spec,
bool request_hardware )

Definition at line 570 of file Target.cpp.

References CreateBreakpoint().

Referenced by CommandObjectBreakpointSet::DoExecute().

◆ CreateBreakpoint() [1/7]

BreakpointSP Target::CreateBreakpoint ( const Address & addr,
bool internal,
bool request_hardware )

Definition at line 559 of file Target.cpp.

References CreateBreakpoint().

◆ CreateBreakpoint() [2/7]

BreakpointSP Target::CreateBreakpoint ( const FileSpecList * containingModules,
const FileSpec & file,
uint32_t line_no,
uint32_t column,
lldb::addr_t offset,
LazyBool check_inlines,
LazyBool skip_prologue,
bool internal,
bool request_hardware,
LazyBool move_to_nearest_code )

Definition at line 481 of file Target.cpp.

References lldb_private::FileSpecList::Append(), CreateBreakpoint(), lldb_private::eInlineBreakpointsAlways, lldb_private::eInlineBreakpointsHeaders, lldb_private::eInlineBreakpointsNever, lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::TargetProperties::GetInlineStrategy(), lldb_private::TargetProperties::GetMoveToNearestCode(), GetSearchFilterForModuleAndCUList(), GetSearchFilterForModuleList(), lldb_private::TargetProperties::GetSkipPrologue(), lldb_private::TargetProperties::GetSourcePathMap(), lldb_private::FileSpec::IsSourceImplementationFile(), and lldb_private::PathMappingList::ReverseRemapPath().

Referenced by lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::StructuredDataDarwinLog::AddInitCompletionHook(), CreateAddressInModuleBreakpoint(), CreateBreakpoint(), CreateBreakpoint(), CreateBreakpoint(), CreateBreakpointAtUserEntry(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionBreakpoint(), lldb_private::LanguageRuntime::CreateExceptionBreakpoint(), lldb_private::Breakpoint::CreateFromStructuredData(), CreateFuncRegexBreakpoint(), CreateScriptedBreakpoint(), CreateSourceRegexBreakpoint(), CommandObjectBreakpointSet::DoExecute(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), lldb_private::ThreadPlanRunToAddress::SetInitialBreakpoints(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), lldb_private::PlatformDarwin::SetThreadCreationBreakpoint(), lldb_private::ReportRetriever::SetupBreakpoint(), and lldb_private::ThreadPlanStepOut::SetupReturnAddress().

◆ CreateBreakpoint() [3/7]

lldb::BreakpointSP lldb_private::Target::CreateBreakpoint ( const FileSpecList * containingModules,
const FileSpecList * containingSourceFiles,
const char * func_name,
lldb::FunctionNameType func_name_type_mask,
lldb::LanguageType language,
lldb::addr_t offset,
bool offset_is_insn_count,
LazyBool skip_prologue,
bool internal,
bool request_hardware )

◆ CreateBreakpoint() [4/7]

lldb::BreakpointSP lldb_private::Target::CreateBreakpoint ( const FileSpecList * containingModules,
const FileSpecList * containingSourceFiles,
const char * func_names[],
size_t num_names,
lldb::FunctionNameType func_name_type_mask,
lldb::LanguageType language,
lldb::addr_t offset,
LazyBool skip_prologue,
bool internal,
bool request_hardware )

◆ CreateBreakpoint() [5/7]

lldb::BreakpointSP lldb_private::Target::CreateBreakpoint ( const FileSpecList * containingModules,
const FileSpecList * containingSourceFiles,
const std::vector< std::string > & func_names,
lldb::FunctionNameType func_name_type_mask,
lldb::LanguageType language,
lldb::addr_t m_offset,
LazyBool skip_prologue,
bool internal,
bool request_hardware )

References error().

◆ CreateBreakpoint() [6/7]

◆ CreateBreakpoint() [7/7]

BreakpointSP Target::CreateBreakpoint ( lldb::SearchFilterSP & filter_sp,
lldb::BreakpointResolverSP & resolver_sp,
bool internal,
bool request_hardware,
bool resolve_indirect_symbols )

◆ CreateBreakpointAtUserEntry()

◆ CreateBreakpointsFromFile() [1/2]

Status Target::CreateBreakpointsFromFile ( const FileSpec & file,
BreakpointIDList & new_bps )

◆ CreateBreakpointsFromFile() [2/2]

◆ CreateExceptionBreakpoint()

lldb::BreakpointSP Target::CreateExceptionBreakpoint ( enum lldb::LanguageType language,
bool catch_bp,
bool throw_bp,
bool internal,
Args * additional_args = nullptr,
Status * additional_args_error = nullptr )

◆ CreateFuncRegexBreakpoint()

BreakpointSP Target::CreateFuncRegexBreakpoint ( const FileSpecList * containingModules,
const FileSpecList * containingSourceFiles,
RegularExpression func_regexp,
lldb::LanguageType requested_language,
LazyBool skip_prologue,
bool internal,
bool request_hardware )

◆ CreateProcess()

◆ CreateScriptedBreakpoint()

lldb::BreakpointSP Target::CreateScriptedBreakpoint ( const llvm::StringRef class_name,
const FileSpecList * containingModules,
const FileSpecList * containingSourceFiles,
bool internal,
bool request_hardware,
StructuredData::ObjectSP extra_args_sp,
Status * creation_error = nullptr )

◆ CreateSourceRegexBreakpoint()

BreakpointSP Target::CreateSourceRegexBreakpoint ( const FileSpecList * containingModules,
const FileSpecList * source_file_list,
const std::unordered_set< std::string > & function_names,
RegularExpression source_regex,
bool internal,
bool request_hardware,
LazyBool move_to_nearest_code )

◆ CreateStopHook()

Target::StopHookSP Target::CreateStopHook ( StopHook::StopHookKind kind)

Add an empty stop hook to the Target's stop hook list, and returns a shared pointer to it in new_hook.

Returns the id of the new hook.

Definition at line 3041 of file Target.cpp.

References lldb_private::Target::StopHook::CommandBased, m_stop_hook_next_id, m_stop_hooks, and lldb_private::Target::StopHook::ScriptBased.

◆ CreateTrace()

llvm::Expected< TraceSP > Target::CreateTrace ( )

Create a Trace object for the current target using the using the default supported tracing technology for this process.

Returns
The new Trace or an llvm::Error if a Trace already exists or the trace couldn't be created.

Definition at line 3562 of file Target.cpp.

References lldb_private::Trace::FindPluginForLiveProcess(), m_process_sp, and m_trace_sp.

Referenced by GetTraceOrCreate().

◆ CreateUtilityFunction()

◆ CreateWatchpoint()

◆ DeleteBreakpointName()

void Target::DeleteBreakpointName ( ConstString name)

◆ DeleteCurrentProcess()

void Target::DeleteCurrentProcess ( )

Definition at line 272 of file Target.cpp.

References CleanupProcess(), m_process_sp, m_section_load_history, and m_trace_sp.

Referenced by CreateProcess(), Destroy(), Launch(), and ~Target().

◆ Destroy()

◆ DidExec()

void Target::DidExec ( )

Called as the last function in Process::DidExec().

Process::DidExec() will clear a lot of state in the process, then try to reload a dynamic loader plugin to discover what binaries are currently available and then this function should be called to allow the target to do any cleanup after everything has been figured out. It can remove breakpoints that no longer make sense as the exec might have changed the target architecture, and unloaded some modules that might get deleted.

Definition at line 1562 of file Target.cpp.

References m_arch, m_breakpoint_list, and m_internal_breakpoint_list.

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

◆ DisableAllBreakpoints()

void Target::DisableAllBreakpoints ( bool internal_also = false)

◆ DisableAllowedBreakpoints()

void Target::DisableAllowedBreakpoints ( )

◆ DisableAllWatchpoints()

◆ DisableBreakpointByID()

◆ DisableWatchpointByID()

◆ Dump()

void Target::Dump ( Stream * s,
lldb::DescriptionLevel description_level )

Dump a description of this object to a Stream.

Dump a description of the contents of this object to the supplied stream s. The dumped content will be only what has been loaded or parsed up to this point at which this function is called, so this is a good way to see what has been parsed in a target.

Parameters
[in]sThe stream to which to dump the object description.

Definition at line 237 of file Target.cpp.

References lldb::eDescriptionLevelBrief, lldb_private::ConstString::GetCString(), GetExecutableModulePointer(), lldb_private::FileSpec::GetFilename(), lldb_private::Module::GetFileSpec(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_breakpoint_list, m_images, m_internal_breakpoint_list, and lldb_private::Stream::PutCString().

◆ DumpSectionLoadList()

void Target::DumpSectionLoadList ( Stream & s)

◆ EnableAllBreakpoints()

void Target::EnableAllBreakpoints ( bool internal_also = false)

◆ EnableAllowedBreakpoints()

void Target::EnableAllowedBreakpoints ( )

◆ EnableAllWatchpoints()

◆ EnableBreakpointByID()

◆ EnableWatchpointByID()

◆ EvaluateExpression()

◆ FinalizeFileActions()

◆ FindBreakpointName()

◆ GetABIName()

llvm::StringRef Target::GetABIName ( ) const

Returns the name of the target's ABI plugin.

Definition at line 389 of file Target.cpp.

References lldb_private::ABI::FindPlugin(), GetArchitecture(), and m_process_sp.

◆ GetAPIMutex()

std::recursive_mutex & Target::GetAPIMutex ( )

◆ GetArchitecture()

const ArchSpec & lldb_private::Target::GetArchitecture ( ) const
inline

Definition at line 1056 of file Target.h.

References m_arch.

Referenced by MinidumpFileBuilder::AddHeaderAndCalculateDirectories(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), MinidumpFileBuilder::AddThreadList(), lldb_private::Process::AdvanceAddressToNextBranchInstruction(), lldb_private::VariableAnnotator::annotate(), lldb_private::AppleObjCDeclVendor::AppleObjCDeclVendor(), lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), BuildProcessSection(), CalculateDisass(), ThreadMachCore::CalculateStopInfo(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), DynamicLoaderDarwinKernel::CreateInstance(), DynamicLoaderFreeBSDKernel::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), JITLoaderGDB::CreateInstance(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), lldb_private::GNUstepObjCRuntime::CreateInstance(), lldb_private::StructuredDataDarwinLog::CreateInstance(), lldb_private::TypeSystemClang::CreateInstance(), ThreadFreeBSDKernel::CreateRegisterContextForFrame(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::PlatformQemuUser::DebugProcess(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), CommandObjectMemoryRead::DoExecute(), CommandObjectMemoryWrite::DoExecute(), CommandObjectProcessAttach::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectTargetModulesAdd::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), lldb_private::CommandObjectDisassemble::DoExecute(), ProcessElfCore::DoLoadCore(), lldb_private::Address::Dump(), lldb_private::AddressRange::Dump(), lldb_private::StackFrame::Dump(), DumpAddressAndContent(), CommandObjectSourceInfo::DumpLinesInFunctions(), DumpTargetInfo(), lldb::SBInstruction::EmulateWithFrame(), lldb_private::process_gdb_remote::ProcessGDBRemote::EnableWatchpoint(), lldb_private::DWARFExpression::Evaluate(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), OptionGroupReadMemory::FinalizeSettings(), FindModulesByName(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::FormatEntity::Format(), GetABIName(), lldb_private::Process::GetAddressByteSize(), lldb_private::ProcessTrace::GetArchitecture(), lldb_private::ScriptedProcess::GetArchitecture(), ProcessElfCore::GetArchitecture(), lldb_private::Process::GetByteOrder(), lldb_private::FuncUnwinders::GetDebugFrameAugmentedUnwindPlan(), lldb_private::StopInfoMachException::GetDescription(), lldb_private::FuncUnwinders::GetEHFrameAugmentedUnwindPlan(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), GetModuleConfig(), lldb_private::AppleObjCRuntime::GetObjCVersion(), lldb_private::GetPreferredAsanModule(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABIWindows_x86_64::GetReturnValueObjectImpl(), lldb_private::Thread::GetSiginfoValue(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformDarwin::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode(), lldb_private::StackFrame::GetStatus(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::FuncUnwinders::GetUnwindAssemblyProfiler(), lldb_private::Value::GetValueAsData(), lldb_private::Process::GetWatchpointReportedAfter(), lldb_private::InferiorCallMmap(), isLoadBiasIncorrect(), lldb_private::ThreadPlanStepInstruction::IsPlanStale(), Launch(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::CommandObjectDisassemble::CommandOptions::OptionParsingStarting(), CommandObjectTargetModulesList::PrintModule(), ReadInstructions(), ReadJITEntry(), lldb_private::AssertFrameRecognizer::RecognizeFrame(), lldb_private::RegisterAssertFrameRecognizer(), lldb_private::RegisterContextUnifiedCore::RegisterContextUnifiedCore(), ObjectFileMachO::SaveCore(), DynamicLoaderDarwinKernel::SearchForKernelNearPC(), DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), SetupTargetOpts(), DisassemblerLLVMC::SymbolLookup(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), and lldb_private::DynamicLoaderDarwin::UseDYLDSPI().

◆ GetArchitecturePlugin()

◆ GetBreakableLoadAddress()

lldb::addr_t Target::GetBreakableLoadAddress ( lldb::addr_t addr)

Definition at line 2998 of file Target.cpp.

References GetArchitecturePlugin().

Referenced by CreateBreakpoint().

◆ GetBreakpointByID()

◆ GetBreakpointList() [1/2]

◆ GetBreakpointList() [2/2]

const BreakpointList & Target::GetBreakpointList ( bool internal = false) const

Definition at line 407 of file Target.cpp.

References m_breakpoint_list, and m_internal_breakpoint_list.

◆ GetBreakpointNames()

void Target::GetBreakpointNames ( std::vector< std::string > & names)

Definition at line 915 of file Target.cpp.

References m_breakpoint_names.

Referenced by CommandObjectBreakpointNameList::DoExecute().

◆ GetBroadcasterClass()

llvm::StringRef lldb_private::Target::GetBroadcasterClass ( ) const
inlineoverridevirtual

This needs to be filled in if you are going to register the broadcaster with the broadcaster manager and do broadcaster class matching.

FIXME: Probably should make a ManagedBroadcaster subclass with all the bits needed to work with the BroadcasterManager, so that it is clearer how to add one.

Reimplemented from lldb_private::Broadcaster.

Definition at line 546 of file Target.h.

References GetStaticBroadcasterClass().

◆ GetCallableLoadAddress()

lldb::addr_t Target::GetCallableLoadAddress ( lldb::addr_t load_addr,
AddressClass addr_class = AddressClass::eInvalid ) const

Get load_addr as a callable code load address for this target.

Take load_addr and potentially add any address bits that are needed to make the address callable. For ARM this can set bit zero (if it already isn't) if load_addr is a thumb function. If addr_class is set to AddressClass::eInvalid, then the address adjustment will always happen. If it is set to an address class that doesn't have code in it, LLDB_INVALID_ADDRESS will be returned.

Definition at line 2983 of file Target.cpp.

References GetArchitecturePlugin().

Referenced by lldb_private::Address::GetCallableLoadAddress(), and lldb_private::Address::SetCallableLoadAddress().

◆ GetDebugger()

Debugger & lldb_private::Target::GetDebugger ( ) const
inline

Definition at line 1097 of file Target.h.

References Debugger, and m_debugger.

Referenced by lldb_private::ClangUserExpression::AddArguments(), Attach(), lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), lldb_private::Process::CompleteAttach(), lldb_private::Process::CreateBreakpointSite(), lldb_private::BreakpointOptions::CreateFromStructuredData(), CreateProcess(), ProcessKDP::DoConnectRemote(), lldb_private::InstructionList::Dump(), lldb_private::StackFrame::DumpUsingSettingsFormat(), lldb_private::Thread::DumpUsingSettingsFormat(), lldb_private::UserExpression::Execute(), lldb_private::FunctionCaller::ExecuteFunction(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::StackFrame::GetStatus(), lldb_private::Thread::GetStatus(), lldb_private::mcp::DebuggerResourceProvider::GetTargetResource(), lldb::SBFrame::GetVariables(), lldb_private::StructuredDataDarwinLog::HandleArrivalOfStructuredData(), lldb_private::Target::StopHookCommandLine::HandleStop(), IRInterpreter::Interpret(), Launch(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), LoadScriptingResourceForModule(), lldb_private::Module::LoadScriptingResourceInTarget(), lldb_private::PlatformDarwin::LocateExecutableScriptingResources(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::StopInfoWatchpoint::PerformAction(), lldb_private::Process::PopProcessIOHandler(), lldb_private::Disassembler::PrintInstructions(), lldb_private::Process::ProcessIOHandlerIsActive(), lldb_private::Process::PushProcessIOHandler(), ResumeNewPlan(), RunScriptFormatKeyword(), ObjectFileMachO::SaveCore(), SetArchitecture(), SetLabel(), and lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction().

◆ GetDefaultArchitecture()

◆ GetDefaultDebugFileSearchPaths()

◆ GetDefaultExecutableSearchPaths()

◆ GetEntryPointAddress()

llvm::Expected< lldb_private::Address > Target::GetEntryPointAddress ( )

This method will return the address of the starting function for this binary, e.g.

main() or its equivalent. This can be used as an address of a function that is not called once a binary has started running - e.g. as a return address for inferior function calls that are unambiguous completion of the function call, not called during the course of the inferior function code running.

If no entry point can be found, an invalid address is returned.

Parameters
[out]errThis object will be set to failure if no entry address could be found, and may contain a helpful error message.
Returns
Returns the entry address for this program, or an error if none can be found.

Definition at line 2949 of file Target.cpp.

References lldb_private::ObjectFile::GetEntryPointAddress(), GetExecutableModulePointer(), lldb_private::FileSpec::GetFilename(), lldb_private::Module::GetFileSpec(), GetImages(), lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::Module::GetObjectFile(), lldb_private::ModuleList::GetSize(), lldb_private::ConstString::GetStringRef(), and lldb_private::Address::IsValid().

Referenced by lldb_private::ThreadPlanCallFunction::ConstructorSetup().

◆ GetExecutableModule()

ModuleSP Target::GetExecutableModule ( )

Gets the module for the main executable.

Each process has a notion of a main executable that is the file that will be executed or attached to. Executable files can have dependent modules that are discovered from the object files, or discovered at runtime as things are dynamically loaded.

Returns
The shared pointer to the executable module which can contains a nullptr Module object if no executable has been set.
See also
DynamicLoader
ObjectFile::GetDependentModules (FileSpecList&)
Process::SetExecutableModule(lldb::ModuleSP&)

Definition at line 1517 of file Target.cpp.

References lldb_private::ObjectFile::eTypeExecutable, lldb_private::ObjectFile::GetType(), and m_images.

Referenced by lldb_private::PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(), Attach(), PlatformPOSIX::Attach(), lldb_private::Process::CompleteAttach(), CreateBreakpointAtUserEntry(), ProcessKDP::DoConnectRemote(), CommandObjectProcessAttach::DoExecute(), CommandObjectProcessLaunch::DoExecute(), ProcessElfCore::DoLoadCore(), ProcessMachCore::DoLoadCore(), ProcessFreeBSDKernel::FindSymbol(), GetExecutableModulePointer(), lldb_private::ProcessWindows::GetImageInfoAddress(), ProcessElfCore::GetImageInfoAddress(), lldb_private::minidump::ProcessMinidump::GetProcessInfo(), lldb_private::ProcessTrace::GetProcessInfo(), lldb_private::ScriptedProcess::GetProcessInfo(), ProcessElfCore::GetProcessInfo(), lldb_private::PlatformMacOSX::GetSDKDirectory(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), ImageSearchPathsChanged(), Install(), lldb_private::process_gdb_remote::ProcessGDBRemote::MaybeLoadExecutableModule(), DYLDRendezvous::ResolveRendezvousAddress(), ResolveSDKPathFromDebugInfo(), SetArchitecture(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules().

◆ GetExecutableModulePointer()

◆ GetFrameRecognizerManager()

◆ GetFunctionCallerForLanguage()

FunctionCaller * Target::GetFunctionCallerForLanguage ( lldb::LanguageType language,
const CompilerType & return_type,
const Address & function_address,
const ValueList & arg_value_list,
const char * name,
Status & error )

◆ GetGlobalProperties()

◆ GetImages() [1/2]

ModuleList & lldb_private::Target::GetImages ( )
inline

Definition at line 1016 of file Target.h.

References m_images.

◆ GetImages() [2/2]

const ModuleList & lldb_private::Target::GetImages ( ) const
inline

Get accessor for the images for this process.

Each process has a notion of a main executable that is the file that will be executed or attached to. Executable files can have dependent modules that are discovered from the object files, or discovered at runtime as things are dynamically loaded. After a main executable has been set, the images will contain a list of all the files that the executable depends upon as far as the object files know. These images will usually contain valid file virtual addresses only. When the process is launched or attached to, the DynamicLoader plug-in will discover where these images were loaded in memory and will resolve the load virtual addresses is each image, and also in images that are loaded by code.

Returns
A list of Module objects in a module list.

Definition at line 1014 of file Target.h.

References m_images.

Referenced by AddLinkMapSections(), MinidumpFileBuilder::AddModuleList(), lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), lldb_private::AppleObjCRuntime::AppleObjCRuntime(), lldb_private::OptionValueUUID::AutoComplete(), lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), BuildModulesSection(), lldb_private::AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing(), DynamicLoaderMacOS::CanLoadImage(), lldb_private::TargetStats::CollectStats(), CreateAllImageInfosPayload(), lldb_private::GNUstepObjCRuntime::CreateInstance(), JITLoaderGDB::DidAttach(), JITLoaderGDB::DidLaunch(), CommandObjectMemoryRead::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesDumpClangAST::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectTargetVariable::DoExecute(), lldb_private::Address::Dump(), CommandObjectSourceInfo::DumpLinesForAddress(), CommandObjectSourceInfo::DumpLinesForFile(), CommandObjectSourceInfo::DumpLinesInFunctions(), Evaluate_DW_OP_entry_value(), lldb_private::PlatformDarwin::ExtractCrashInfoAnnotations(), lldb_private::Language::ImageListTypeScavenger::Find_Impl(), lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb_private::ClangExpressionDeclMap::FindGlobalVariable(), lldb_private::IRExecutionUnit::FindInSymbols(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), CommandObjectSourceList::FindMatchingFunctions(), CommandObjectSourceList::FindMatchingFunctionSymbols(), DYLDRendezvous::FindMetadata(), HexagonDYLDRendezvous::FindMetadata(), FindModulesByName(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::CommandObjectDisassemble::GetContainingAddressRanges(), GetEntryPointAddress(), lldb_private::platform_android::PlatformAndroid::GetLibdlFunctionDeclarations(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), lldb_private::CommandObjectDisassemble::GetNameRanges(), lldb_private::AppleObjCRuntime::GetObjCModule(), lldb_private::AppleObjCRuntime::GetObjCVersion(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), lldb_private::GetPreferredAsanModule(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::AppleObjCRuntimeV2::GetValuesForGlobalCFBooleans(), CommandObjectTargetVariable::GetVariableCallback(), lldb_private::GNUstepObjCRuntime::GNUstepObjCRuntime(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), lldb_private::ClangUtilityFunction::Install(), Install(), lldb_private::Thread::JumpToLine(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), lldb_private::ClangExpressionDeclMap::LookupFunction(), ModuleIsExcludedForUnconstrainedSearches(), lldb_private::CommandCompletions::ModuleUUIDs(), DynamicLoaderMacOS::NotifyBreakpointHit(), lldb_private::ClangUserExpression::Parse(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), JITLoaderGDB::ReadJITDescriptorImpl(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), lldb_private::DebuggerStats::ReportStatistics(), lldb_private::DebuggerStats::ResetStatistics(), ResolveAddress(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), lldb::SBModule::SBModule(), lldb_private::BreakpointResolverAddress::SearchCallback(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups(), lldb_private::DynamicLoaderDarwin::UnloadAllImages(), lldb_private::DynamicLoaderDarwin::UpdateDYLDImageInfoFromNewImageInfo(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules(), and lldb_private::FunctionCaller::WriteFunctionWrapper().

◆ GetImageSearchPathList()

◆ GetLabel()

const std::string & lldb_private::Target::GetLabel ( ) const
inline

Definition at line 603 of file Target.h.

References m_label.

Referenced by DumpTargetInfo().

◆ GetLastCreatedBreakpoint()

lldb::BreakpointSP lldb_private::Target::GetLastCreatedBreakpoint ( )
inline

◆ GetLastCreatedWatchpoint()

lldb::WatchpointSP lldb_private::Target::GetLastCreatedWatchpoint ( )
inline

◆ GetNumStopHooks()

size_t lldb_private::Target::GetNumStopHooks ( ) const
inline

Definition at line 1496 of file Target.h.

References m_stop_hooks.

Referenced by CommandObjectTargetStopHookList::DoExecute(), and GetStopHookAtIndex().

◆ GetOpcodeLoadAddress()

lldb::addr_t Target::GetOpcodeLoadAddress ( lldb::addr_t load_addr,
AddressClass addr_class = AddressClass::eInvalid ) const

Get load_addr as an opcode for this target.

Take load_addr and potentially strip any address bits that are needed to make the address point to an opcode. For ARM this can clear bit zero (if it already isn't) if load_addr is a thumb function and load_addr is in code. If addr_class is set to AddressClass::eInvalid, then the address adjustment will always happen. If it is set to an address class that doesn't have code in it, LLDB_INVALID_ADDRESS will be returned.

Definition at line 2991 of file Target.cpp.

References GetArchitecturePlugin().

Referenced by lldb_private::Address::GetOpcodeLoadAddress(), lldb::SBFrame::GetPC(), lldb_private::RegisterContext::GetPC(), lldb_private::Address::SetOpcodeLoadAddress(), and lldb_private::ThreadPlanRunToAddress::ThreadPlanRunToAddress().

◆ GetOrCreateModule()

ModuleSP Target::GetOrCreateModule ( const ModuleSpec & module_spec,
bool notify,
Status * error_ptr = nullptr )

Find a binary on the system and return its Module, or return an existing Module that is already in the Target.

Given a ModuleSpec, find a binary satisifying that specification, or identify a matching Module already present in the Target, and return a shared pointer to it.

Parameters
[in]module_specThe criteria that must be matched for the binary being loaded. e.g. UUID, architecture, file path.
[in]notifyIf notify is true, and the Module is new to this Target, Target::ModulesDidLoad will be called. If notify is false, it is assumed that the caller is adding multiple Modules and will call ModulesDidLoad with the full list at the end. ModulesDidLoad must be called when a Module/Modules have been added to the target, one way or the other.
[out]error_ptrOptional argument, pointing to a Status object to fill in with any results / messages while attempting to find/load this binary. Many callers will be internal functions that will handle / summarize the failures in a custom way and don't use these messages.
Returns
An empty ModuleSP will be returned if no matching file was found. If error_ptr was non-nullptr, an error message will likely be provided.

A core file that has a checkpoint of a program's execution state

A normal executable

The platform's dynamic linker executable

An intermediate object file

A shared library that can be used during execution

An object file that contains only debug information

A library that can be linked against but not used for execution

Definition at line 2339 of file Target.cpp.

References lldb_private::Stream::AsRawOstream(), lldb_private::UUID::Clear(), lldb_private::Continue, lldb_private::UUID::Dump(), error(), lldb_private::ObjectFile::eTypeCoreFile, lldb_private::ObjectFile::eTypeDebugInfo, lldb_private::ObjectFile::eTypeDynamicLinker, lldb_private::ObjectFile::eTypeExecutable, lldb_private::ObjectFile::eTypeObjectFile, lldb_private::ObjectFile::eTypeSharedLibrary, lldb_private::ObjectFile::eTypeStubLibrary, lldb_private::ModuleList::ForEach(), lldb_private::Status::FromErrorString(), lldb_private::FileSpec::GetDirectory(), lldb_private::TargetProperties::GetExecutableSearchPaths(), lldb_private::FileSpec::GetFilename(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::GetLog(), lldb_private::TargetProperties::GetObjectPathMap(), lldb_private::FileSpec::GetPath(), lldb_private::TargetProperties::GetPreloadSymbols(), lldb_private::ModuleList::GetSharedModule(), lldb_private::StreamString::GetString(), lldb_private::ObjectFile::GetType(), lldb_private::ModuleSpec::GetUUID(), lldb_private::ConstString::IsEmpty(), lldb_private::UUID::IsValid(), LLDB_INVALID_INDEX32, m_image_search_paths, m_images, m_platform_sp, m_process_sp, lldb_private::Modules, lldb_private::PathMappingList::RemapPath(), lldb_private::ModuleList::RemoveSharedModuleIfOrphaned(), lldb_private::FileSpec::SetDirectory(), lldb_private::FileSpec::SetFilename(), lldb_private::FileSpec::SetPath(), and lldb_private::Target.

Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), CommandObjectTargetModulesAdd::DoExecute(), ProcessElfCore::DoLoadCore(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), lldb_private::trace_intel_pt::TraceIntelPTBundleLoader::ParseModule(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), and SetExecutableModule().

◆ GetPersistentExpressionStateForLanguage()

◆ GetPersistentSymbol()

lldb::addr_t Target::GetPersistentSymbol ( ConstString name)

Definition at line 2929 of file Target.cpp.

References LLDB_INVALID_ADDRESS, and m_scratch_type_system_map.

◆ GetPersistentVariable()

lldb::ExpressionVariableSP Target::GetPersistentVariable ( ConstString name)

◆ GetPlatform()

◆ GetProcessSP()

◆ GetReasonableReadSize()

addr_t Target::GetReasonableReadSize ( const Address & addr)
protected

Return a recommended size for memory reads at addr, optimizing for cache usage.

Definition at line 2196 of file Target.cpp.

References lldb_private::Address::GetLoadAddress(), LLDB_INVALID_ADDRESS, and m_process_sp.

Referenced by ReadStringFromMemory().

◆ GetRegisterType()

CompilerType Target::GetRegisterType ( const std::string & name,
const lldb_private::RegisterFlags & flags,
uint32_t byte_size )

◆ GetREPL()

◆ GetScratchTypeSystemForLanguage()

◆ GetScratchTypeSystems()

◆ GetSearchFilterForModule()

SearchFilterSP Target::GetSearchFilterForModule ( const FileSpec * containingModule)

Definition at line 664 of file Target.cpp.

References m_search_filter_sp.

◆ GetSearchFilterForModuleAndCUList()

SearchFilterSP Target::GetSearchFilterForModuleAndCUList ( const FileSpecList * containingModules,
const FileSpecList * containingSourceFiles )

◆ GetSearchFilterForModuleList()

◆ GetSectionLoadAddress()

◆ GetSectionLoadList()

SectionLoadList & lldb_private::Target::GetSectionLoadList ( )
inlineprotected

◆ GetSourceManager()

◆ GetStaticBroadcasterClass()

llvm::StringRef Target::GetStaticBroadcasterClass ( )
static

◆ GetStatistics()

◆ GetStopHookAtIndex()

StopHookSP lldb_private::Target::GetStopHookAtIndex ( size_t index)
inline

Definition at line 1498 of file Target.h.

References GetNumStopHooks(), and m_stop_hooks.

Referenced by CommandObjectTargetStopHookList::DoExecute().

◆ GetStopHookByID()

Target::StopHookSP Target::GetStopHookByID ( lldb::user_id_t uid)

Definition at line 3070 of file Target.cpp.

References m_stop_hooks.

◆ GetStopHookSize()

size_t lldb_private::Target::GetStopHookSize ( )

◆ GetSummaryStatisticsCache()

SummaryStatisticsCache & Target::GetSummaryStatisticsCache ( )

◆ GetSummaryStatisticsSPForProviderName()

lldb_private::SummaryStatisticsSP Target::GetSummaryStatisticsSPForProviderName ( lldb_private::TypeSummaryImpl & summary_provider)

Definition at line 3369 of file Target.cpp.

References m_summary_statistics_cache.

◆ GetSuppressStopHooks()

bool lldb_private::Target::GetSuppressStopHooks ( )
inline

Definition at line 1484 of file Target.h.

References m_suppress_stop_hooks.

◆ GetTargetFromContexts()

◆ GetTrace()

TraceSP Target::GetTrace ( )

Get the Trace object containing processor trace information of this target.

Returns
The trace object. It might be undefined.

Definition at line 3560 of file Target.cpp.

References m_trace_sp.

Referenced by BuildThreadsSection(), and lldb_private::CommandObject::CheckRequirements().

◆ GetTraceOrCreate()

llvm::Expected< TraceSP > Target::GetTraceOrCreate ( )

If a Trace object is present, this returns it, otherwise a new Trace is created with Trace::CreateTrace.

Definition at line 3587 of file Target.cpp.

References CreateTrace(), and m_trace_sp.

◆ GetUserExpressionForLanguage()

◆ GetWatchpointList()

◆ HasLoadedSections()

◆ IgnoreAllWatchpoints()

bool Target::IgnoreAllWatchpoints ( uint32_t ignore_count)

◆ IgnoreWatchpointByID()

bool Target::IgnoreWatchpointByID ( lldb::watch_id_t watch_id,
uint32_t ignore_count )

◆ ImageSearchPathsChanged()

void Target::ImageSearchPathsChanged ( const PathMappingList & path_list,
void * baton )
staticprotected

Definition at line 2597 of file Target.cpp.

References lldb_private::eLoadDependentsYes, GetExecutableModule(), SetExecutableModule(), and Target().

Referenced by Target().

◆ Install()

◆ IsDummyTarget()

bool lldb_private::Target::IsDummyTarget ( ) const
inline

Definition at line 601 of file Target.h.

References m_is_dummy_target.

◆ IsValid()

bool lldb_private::Target::IsValid ( )
inline

Definition at line 679 of file Target.h.

References m_valid.

Referenced by lldb_private::TypeSystemClang::CreateInstance().

◆ Launch()

◆ LoadScriptingResources()

bool lldb_private::Target::LoadScriptingResources ( std::list< Status > & errors,
Stream & feedback_stream,
bool continue_on_error = true )
inline

Definition at line 990 of file Target.h.

References m_images.

◆ MergeArchitecture()

◆ ModuleIsExcludedForUnconstrainedSearches() [1/2]

bool Target::ModuleIsExcludedForUnconstrainedSearches ( const FileSpec & module_spec)

Return whether this FileSpec corresponds to a module that should be considered for general searches.

This API will be consulted by the SearchFilterForUnconstrainedSearches and any module that returns true will not be searched. Note the SearchFilterForUnconstrainedSearches is the search filter that gets used in the CreateBreakpoint calls when no modules is provided.

The target call at present just consults the Platform's call of the same name.

Parameters
[in]module_specPath to the module.
Returns
true if the module should be excluded, false otherwise.

Definition at line 1927 of file Target.cpp.

References lldb_private::ModuleList::FindModules(), lldb_private::TargetProperties::GetBreakpointsConsultPlatformAvoidList(), GetImages(), lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetSize(), and ModuleIsExcludedForUnconstrainedSearches().

Referenced by ModuleIsExcludedForUnconstrainedSearches().

◆ ModuleIsExcludedForUnconstrainedSearches() [2/2]

bool Target::ModuleIsExcludedForUnconstrainedSearches ( const lldb::ModuleSP & module_sp)

Return whether this module should be considered for general searches.

This API will be consulted by the SearchFilterForUnconstrainedSearches and any module that returns true will not be searched. Note the SearchFilterForUnconstrainedSearches is the search filter that gets used in the CreateBreakpoint calls when no modules is provided.

The target call at present just consults the Platform's call of the same name.

FIXME: When we get time we should add a way for the user to set modules that they don't want searched, in addition to or instead of the platform ones.

Parameters
[in]module_spA shared pointer reference to the module that checked.
Returns
true if the module should be excluded, false otherwise.

Definition at line 1949 of file Target.cpp.

References lldb_private::TargetProperties::GetBreakpointsConsultPlatformAvoidList(), and m_platform_sp.

◆ ModulesDidLoad()

◆ ModulesDidUnload()

◆ NotifyModuleAdded()

void Target::NotifyModuleAdded ( const ModuleList & module_list,
const lldb::ModuleSP & module_sp )
overrideprotectedvirtual

◆ NotifyModuleRemoved()

void Target::NotifyModuleRemoved ( const ModuleList & module_list,
const lldb::ModuleSP & module_sp )
overrideprotectedvirtual

◆ NotifyModulesRemoved()

void Target::NotifyModulesRemoved ( lldb_private::ModuleList & module_list)
overrideprotectedvirtual

Implements lldb_private::ModuleList::Notifier.

Definition at line 1847 of file Target.cpp.

References ModulesDidUnload().

◆ NotifyModuleUpdated()

void Target::NotifyModuleUpdated ( const ModuleList & module_list,
const lldb::ModuleSP & old_module_sp,
const lldb::ModuleSP & new_module_sp )
overrideprotectedvirtual

◆ NotifyWillClearList()

void Target::NotifyWillClearList ( const ModuleList & module_list)
overrideprotectedvirtual

Implements lldb_private::ModuleList::Notifier.

Definition at line 1813 of file Target.cpp.

◆ operator=()

const Target & lldb_private::Target::operator= ( const Target & )
protecteddelete

References Target().

◆ PrimeFromDummyTarget()

◆ PrintDummySignals()

◆ ProcessIsValid()

◆ ReadCStringFromMemory() [1/2]

size_t Target::ReadCStringFromMemory ( const Address & addr,
char * dst,
size_t dst_max_len,
Status & result_error,
bool force_live_memory = false )

◆ ReadCStringFromMemory() [2/2]

size_t Target::ReadCStringFromMemory ( const Address & addr,
std::string & out_str,
Status & error,
bool force_live_memory = false )

◆ ReadInstructions()

◆ ReadMemory()

◆ ReadMemoryFromFileCache()

◆ ReadPointerFromMemory()

◆ ReadScalarIntegerFromMemory()

size_t Target::ReadScalarIntegerFromMemory ( const Address & addr,
uint32_t byte_size,
bool is_signed,
Scalar & scalar,
Status & error,
bool force_live_memory = false )

◆ ReadSignedIntegerFromMemory()

int64_t Target::ReadSignedIntegerFromMemory ( const Address & addr,
size_t integer_byte_size,
int64_t fail_value,
Status & error,
bool force_live_memory = false )

◆ ReadStringFromMemory()

size_t Target::ReadStringFromMemory ( const Address & addr,
char * dst,
size_t max_bytes,
Status & error,
size_t type_width,
bool force_live_memory = true )

Read a NULL terminated string from memory.

This function will read a cache page at a time until a NULL string terminator is found. It will stop reading if an aligned sequence of NULL termination type_width bytes is not found before reading cstr_max_len bytes. The results are always guaranteed to be NULL terminated, and that no more than (max_bytes - type_width) bytes will be read.

Parameters
[in]addrThe address to start the memory read.
[in]dstA character buffer containing at least max_bytes.
[in]max_bytesThe maximum number of bytes to read.
[in]errorThe error status of the read operation.
[in]type_widthThe size of the null terminator (1 to 4 bytes per character). Defaults to 1.
Returns
The error status or the number of bytes prior to the null terminator.

Definition at line 2209 of file Target.cpp.

References error(), GetReasonableReadSize(), ReadMemory(), and lldb_private::Address::Slide().

◆ ReadUnsignedIntegerFromMemory()

uint64_t Target::ReadUnsignedIntegerFromMemory ( const Address & addr,
size_t integer_byte_size,
uint64_t fail_value,
Status & error,
bool force_live_memory = false )

◆ RemoveAllBreakpoints()

void Target::RemoveAllBreakpoints ( bool internal_also = false)

◆ RemoveAllowedBreakpoints()

void Target::RemoveAllowedBreakpoints ( )

◆ RemoveAllStopHooks()

void Target::RemoveAllStopHooks ( )

Definition at line 3068 of file Target.cpp.

References m_stop_hooks.

Referenced by CommandObjectTargetStopHookDelete::DoExecute().

◆ RemoveAllWatchpoints()

◆ RemoveBreakpointByID()

◆ RemoveNameFromBreakpoint()

void Target::RemoveNameFromBreakpoint ( lldb::BreakpointSP & bp_sp,
ConstString name )

◆ RemoveStopHookByID()

bool Target::RemoveStopHookByID ( lldb::user_id_t uid)

Definition at line 3063 of file Target.cpp.

References m_stop_hooks.

Referenced by CommandObjectTargetStopHookDelete::DoExecute(), and UndoCreateStopHook().

◆ RemoveWatchpointByID()

◆ ReportStatistics()

llvm::json::Value Target::ReportStatistics ( const lldb_private::StatisticsOptions & options)

Get metrics associated with this target in JSON format.

Target metrics help measure timings and information that is contained in a target. These are designed to help measure performance of a debug session as well as represent the current state of the target, like information on the currently modules, currently set breakpoints and more.

Returns
Returns a JSON value that contains all target metrics.

Definition at line 5227 of file Target.cpp.

References m_stats.

◆ ResetBreakpointHitCounts()

void Target::ResetBreakpointHitCounts ( )

Resets the hit count of all breakpoints.

Definition at line 1156 of file Target.cpp.

References GetBreakpointList(), and lldb_private::BreakpointList::ResetHitCounts().

Referenced by CleanupProcess().

◆ ResetSignalFromDummy()

bool Target::ResetSignalFromDummy ( lldb::UnixSignalsSP signals_sp,
const DummySignalElement & element )
staticprotected

Definition at line 3806 of file Target.cpp.

References lldb_private::eLazyBoolCalculate, and LLDB_INVALID_SIGNAL_NUMBER.

Referenced by ClearDummySignals().

◆ ResetStatistics()

void Target::ResetStatistics ( )

Definition at line 5231 of file Target.cpp.

References m_stats.

Referenced by lldb_private::DebuggerStats::ResetStatistics().

◆ ResolveFileAddress()

bool Target::ResolveFileAddress ( lldb::addr_t load_addr,
Address & so_addr )

Definition at line 3291 of file Target.cpp.

References m_images.

Referenced by lldb_private::ArchitectureMips::GetBreakableLoadAddress().

◆ ResolveLoadAddress()

◆ RunStopHooks()

◆ SaveScriptedLaunchInfo()

◆ SerializeBreakpointsToFile()

◆ SetAllStopHooksActiveState()

void Target::SetAllStopHooksActiveState ( bool active_state)

Definition at line 3091 of file Target.cpp.

References m_stop_hooks.

Referenced by CommandObjectTargetStopHookEnableDisable::DoExecute().

◆ SetArchitecture()

bool Target::SetArchitecture ( const ArchSpec & arch_spec,
bool set_platform = false,
bool merge = true )

Set the architecture for this target.

If the current target has no Images read in, then this just sets the architecture, which will be used to select the architecture of the ExecutableModule when that is set. If the current target has an ExecutableModule, then calling SetArchitecture with a different architecture from the currently selected one will reset the ExecutableModule to that slice of the file backing the ExecutableModule. If the file backing the ExecutableModule does not contain a fork of this architecture, then this code will return false, and the architecture won't be changed. If the input arch_spec is the same as the already set architecture, this is a no-op.

Parameters
[in]arch_specThe new architecture.
[in]set_platformIf true, then the platform will be adjusted if the currently selected platform is not compatible with the architecture being set. If false, then just the architecture will be set even if the currently selected platform isn't compatible (in case it might be manually set following this function call).
[in]mergedIf true, arch_spec is merged with the current architecture. Otherwise it's replaced.
Returns
true if the architecture was successfully set, false otherwise.

Definition at line 1697 of file Target.cpp.

References ClearModules(), lldb_private::ArchSpec::CompatibleMatch, lldb_private::eLoadDependentsYes, error(), lldb_private::ArchSpec::GetArchitectureName(), GetDebugger(), GetExecutableModule(), lldb_private::TargetProperties::GetExecutableSearchPaths(), lldb_private::GetLog(), GetPlatform(), lldb_private::ModuleList::GetSharedModule(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsValid(), LLDB_LOG, LLDB_LOGF, m_arch, lldb_private::ArchSpec::MergeFrom(), SetExecutableModule(), SetPlatform(), and lldb_private::Target.

Referenced by DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), ProcessElfCore::DoLoadCore(), ProcessMachCore::DoLoadCore(), ProcessMachCore::LoadBinariesViaExhaustiveSearch(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), MergeArchitecture(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::ReadMemoryModule(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules().

◆ SetDefaultArchitecture()

◆ SetExecutableModule()

void Target::SetExecutableModule ( lldb::ModuleSP & module_sp,
LoadDependentFiles load_dependent_files = eLoadDependentsDefault )

Set the main executable module.

Each process has a notion of a main executable that is the file that will be executed or attached to. Executable files can have dependent modules that are discovered from the object files, or discovered at runtime as things are dynamically loaded.

Setting the executable causes any of the current dependent image information to be cleared and replaced with the static dependent image information found by calling ObjectFile::GetDependentModules (FileSpecList&) on the main executable and any modules on which it depends. Calling Process::GetImages() will return the newly found images that were obtained from all of the object files.

Parameters
[in]module_spA shared pointer reference to the module that will become the main executable for this process.
[in]load_dependent_filesIf true then ask the object files to track down any known dependent files.
See also
ObjectFile::GetDependentModules (FileSpecList&)
Process::GetImages()

Definition at line 1568 of file Target.cpp.

References lldb_private::ModuleList::AppendIfNeeded(), lldb_private::FileSpecList::AppendIfUnique(), ClearModules(), lldb_private::telemetry::ScopedDispatcher< Info >::DispatchNow(), lldb_private::telemetry::ScopedDispatcher< Info >::DispatchOnExit(), elapsed(), lldb_private::eLoadDependentsDefault, lldb_private::eLoadDependentsNo, lldb_private::eLoadDependentsYes, lldb_private::telemetry::ExecutableModuleInfo::exec_mod, lldb_private::ObjectFile::GetDependentModules(), lldb_private::FileSpecList::GetFileSpecAtIndex(), lldb_private::GetLog(), GetOrCreateModule(), GetProcessSP(), lldb_private::FileSpecList::GetSize(), lldb_private::Debugger::GetThreadPool(), lldb_private::telemetry::ExecutableModuleInfo::is_start_entry, LLDB_INVALID_PROCESS_ID, LLDB_LOG, LLDB_SCOPED_TIMERF, m_arch, m_debugger, m_images, m_platform_sp, m_stats, ModulesDidLoad(), lldb_private::telemetry::ExecutableModuleInfo::pid, lldb_private::Target, lldb_private::telemetry::ExecutableModuleInfo::triple, and lldb_private::telemetry::ExecutableModuleInfo::uuid.

Referenced by lldb_private::Process::CompleteAttach(), ProcessKDP::DoConnectRemote(), ProcessElfCore::DoLoadCore(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), ImageSearchPathsChanged(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::ProcessWindows::OnDebuggerConnected(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), SetArchitecture(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules().

◆ SetLabel()

llvm::Error Target::SetLabel ( llvm::StringRef label)

Set a label for a target.

The label cannot be used by another target or be only integral.

Returns
The label for this target or an error if the label didn't match the requirements.

Definition at line 2808 of file Target.cpp.

References GetDebugger(), lldb_private::TargetList::GetNumTargets(), lldb_private::TargetList::GetTargetAtIndex(), lldb_private::Debugger::GetTargetList(), LLDB_INVALID_INDEX32, m_label, and TargetList.

◆ SetPlatform()

void lldb_private::Target::SetPlatform ( const lldb::PlatformSP & platform_sp)
inline

◆ SetREPL()

void Target::SetREPL ( lldb::LanguageType language,
lldb::REPLSP repl_sp )

Definition at line 359 of file Target.cpp.

References lldbassert, and m_repl_map.

Referenced by lldb_private::ClangREPL::CreateInstance().

◆ SetSectionLoadAddress()

◆ SetSectionUnloaded() [1/2]

◆ SetSectionUnloaded() [2/2]

bool Target::SetSectionUnloaded ( const lldb::SectionSP & section_sp,
lldb::addr_t load_addr )

Definition at line 3355 of file Target.cpp.

References GetProcessSP(), and m_section_load_history.

◆ SetStopHookActiveStateByID()

bool Target::SetStopHookActiveStateByID ( lldb::user_id_t uid,
bool active_state )

Definition at line 3080 of file Target.cpp.

References m_stop_hooks.

Referenced by CommandObjectTargetStopHookEnableDisable::DoExecute().

◆ SetSuppresStopHooks()

bool lldb_private::Target::SetSuppresStopHooks ( bool suppress)
inline

Definition at line 1478 of file Target.h.

References m_suppress_stop_hooks.

◆ SettingsInitialize()

void Target::SettingsInitialize ( )
static

◆ SettingsTerminate()

void Target::SettingsTerminate ( )
static

◆ SetTrace()

void Target::SetTrace ( const lldb::TraceSP & trace_sp)

Set the Trace object containing processor trace information of this target.

Parameters
[in]trace_spThe trace object.

Definition at line 3558 of file Target.cpp.

References m_trace_sp.

Referenced by lldb_private::trace_intel_pt::TraceIntelPT::CreateInstanceForLiveProcess().

◆ SymbolsDidLoad()

◆ UndoCreateStopHook()

void Target::UndoCreateStopHook ( lldb::user_id_t uid)

If you tried to create a stop hook, and that failed, call this to remove the stop hook, as it will also reset the stop hook counter.

Definition at line 3056 of file Target.cpp.

References m_stop_hook_next_id, and RemoveStopHookByID().

◆ UnloadModuleSections() [1/2]

size_t Target::UnloadModuleSections ( const lldb::ModuleSP & module_sp)

◆ UnloadModuleSections() [2/2]

size_t Target::UnloadModuleSections ( const ModuleList & module_list)

◆ UpdateSignalFromDummy()

bool Target::UpdateSignalFromDummy ( lldb::UnixSignalsSP signals_sp,
const DummySignalElement & element )
staticprotected

◆ UpdateSignalsFromDummy()

void Target::UpdateSignalsFromDummy ( lldb::UnixSignalsSP signals_sp,
lldb::StreamSP warning_stream_sp )

Updates the signals in signals_sp using the stored dummy signals.

If warning_stream_sp is not null, if any stored signals are not found in the current process, a warning will be emitted here.

Definition at line 3821 of file Target.cpp.

References m_dummy_signals, and UpdateSignalFromDummy().

Referenced by lldb_private::Process::CompleteAttach(), and lldb_private::Process::LaunchPrivate().

◆ Debugger

friend class Debugger
friend

◆ TargetList

friend class TargetList
friend

Definition at line 529 of file Target.h.

References TargetList.

Referenced by SetLabel(), and TargetList.

Member Data Documentation

◆ m_arch

◆ m_breakpoint_list

◆ m_breakpoint_names

BreakpointNameList lldb_private::Target::m_breakpoint_names
protected

◆ m_debugger

Debugger& lldb_private::Target::m_debugger
protected

Definition at line 1607 of file Target.h.

Referenced by GetDebugger(), GetREPL(), RunStopHooks(), SetExecutableModule(), and Target().

◆ m_dummy_signals

llvm::StringMap<DummySignalValues> lldb_private::Target::m_dummy_signals
protected

These are used to set the signal state when you don't have a process and more usefully in the Dummy target where you can't know exactly what signals you will have.

Definition at line 1662 of file Target.h.

Referenced by AddDummySignal(), ClearDummySignals(), PrimeFromDummyTarget(), PrintDummySignals(), and UpdateSignalsFromDummy().

◆ m_frame_recognizer_manager_up

lldb::StackFrameRecognizerManagerUP lldb_private::Target::m_frame_recognizer_manager_up
protected

Stores the frame recognizers of this target.

Definition at line 1658 of file Target.h.

Referenced by GetFrameRecognizerManager(), PrimeFromDummyTarget(), and Target().

◆ m_image_search_paths

PathMappingList lldb_private::Target::m_image_search_paths
protected

Definition at line 1637 of file Target.h.

Referenced by Destroy(), GetImageSearchPathList(), GetOrCreateModule(), and Target().

◆ m_images

ModuleList lldb_private::Target::m_images
protected

The list of images for this process (shared libraries and anything dynamically loaded).

Definition at line 1619 of file Target.h.

Referenced by ClearModules(), Dump(), GetExecutableModule(), GetImages(), GetImages(), GetOrCreateModule(), LoadScriptingResources(), ReadMemory(), ReadPointerFromMemory(), ResolveFileAddress(), SetExecutableModule(), and Target().

◆ m_internal_breakpoint_list

◆ m_is_dummy_target

bool lldb_private::Target::m_is_dummy_target
protected

Used to not run stop hooks for expressions.

Definition at line 1652 of file Target.h.

Referenced by IsDummyTarget(), and Target().

◆ m_label

std::string lldb_private::Target::m_label
protected

Definition at line 1618 of file Target.h.

Referenced by GetLabel(), and SetLabel().

◆ m_last_created_breakpoint

lldb::BreakpointSP lldb_private::Target::m_last_created_breakpoint
protected

◆ m_last_created_watchpoint

lldb::WatchpointSP lldb_private::Target::m_last_created_watchpoint
protected

◆ m_latest_stop_hook_id

uint32_t lldb_private::Target::m_latest_stop_hook_id
protected

Definition at line 1648 of file Target.h.

Referenced by CleanupProcess(), RunStopHooks(), and Target().

◆ m_mutex

std::recursive_mutex lldb_private::Target::m_mutex
protected

An API mutex that is used by the lldb::SB* classes make the SB interface thread safe.

Definition at line 1609 of file Target.h.

Referenced by Destroy(), GetAPIMutex(), and Target().

◆ m_next_persistent_variable_index

unsigned lldb_private::Target::m_next_persistent_variable_index = 0
protected

Definition at line 1653 of file Target.h.

◆ m_platform_sp

lldb::PlatformSP lldb_private::Target::m_platform_sp
protected

◆ m_private_mutex

std::recursive_mutex lldb_private::Target::m_private_mutex
protected

When the private state thread calls SB API's - usually because it is running OS plugin or Python ThreadPlan code - it should not block on the API mutex that is held by the code that kicked off the sequence of events that led us to run the code.

We hand out this mutex instead when we detect that code is running on the private state thread.

Definition at line 1616 of file Target.h.

Referenced by GetAPIMutex().

◆ m_process_sp

◆ m_repl_map

REPLMap lldb_private::Target::m_repl_map
protected

Definition at line 1641 of file Target.h.

Referenced by Destroy(), GetREPL(), and SetREPL().

◆ m_scratch_type_system_map

TypeSystemMap lldb_private::Target::m_scratch_type_system_map
protected

◆ m_search_filter_sp

lldb::SearchFilterSP lldb_private::Target::m_search_filter_sp
protected

Definition at line 1636 of file Target.h.

Referenced by Destroy(), GetSearchFilterForModule(), GetSearchFilterForModuleList(), and Target().

◆ m_section_load_history

◆ m_source_manager_up

lldb::SourceManagerUP lldb_private::Target::m_source_manager_up
protected

Definition at line 1643 of file Target.h.

Referenced by GetSourceManager(), and Target().

◆ m_stats

TargetStats lldb_private::Target::m_stats
private

◆ m_stop_hook_next_id

lldb::user_id_t lldb_private::Target::m_stop_hook_next_id
protected

Definition at line 1647 of file Target.h.

Referenced by CreateStopHook(), Destroy(), PrimeFromDummyTarget(), Target(), and UndoCreateStopHook().

◆ m_stop_hooks

◆ m_summary_statistics_cache

SummaryStatisticsCache lldb_private::Target::m_summary_statistics_cache
protected

Definition at line 1621 of file Target.h.

Referenced by GetSummaryStatisticsCache(), and GetSummaryStatisticsSPForProviderName().

◆ m_suppress_stop_hooks

bool lldb_private::Target::m_suppress_stop_hooks
protected

◆ m_trace_sp

lldb::TraceSP lldb_private::Target::m_trace_sp
protected

An optional lldb_private::Trace object containing processor trace information of this target.

Definition at line 1656 of file Target.h.

Referenced by CreateTrace(), DeleteCurrentProcess(), GetTrace(), GetTraceOrCreate(), and SetTrace().

◆ m_valid

bool lldb_private::Target::m_valid
protected

◆ m_watchpoint_list


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