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

#include <Target.h>

Inheritance diagram for lldb_private::Target:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::Target:
Collaboration graph
[legend]

Classes

class  Arch
 
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)
}
 Broadcaster event bits definitions. More...
 
typedef std::shared_ptr< StopHookStopHookSP
 

Public Member Functions

ConstStringGetBroadcasterClass () 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. More...
 
 ~Target () override
 
bool IsDummyTarget () const
 
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. More...
 
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. More...
 
const lldb::ProcessSP & CreateProcess (lldb::ListenerSP listener_sp, llvm::StringRef plugin_name, const FileSpec *crash_file, bool can_connect)
 
const lldb::ProcessSP & GetProcessSP () 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 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, 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, const char *name, Status &error)
 
void AddNameToBreakpoint (lldb::BreakpointSP &bp_sp, const char *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 (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)
 
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. More...
 
lldb::addr_t GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class=AddressClass::eInvalid) const
 Get load_addr as an opcode for this target. More...
 
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(). More...
 
lldb::ModuleSP GetExecutableModule ()
 Gets the module for the main executable. More...
 
ModuleGetExecutableModulePointer ()
 
void SetExecutableModule (lldb::ModuleSP &module_sp, LoadDependentFiles load_dependent_files=eLoadDependentsDefault)
 Set the main executable module. More...
 
bool LoadScriptingResources (std::list< Status > &errors, Stream *feedback_stream=nullptr, bool continue_on_error=true)
 
const ModuleListGetImages () const
 Get accessor for the images for this process. More...
 
ModuleListGetImages ()
 
bool ModuleIsExcludedForUnconstrainedSearches (const FileSpec &module_spec)
 Return whether this FileSpec corresponds to a module that should be considered for general searches. More...
 
bool ModuleIsExcludedForUnconstrainedSearches (const lldb::ModuleSP &module_sp)
 Return whether this module should be considered for general searches. More...
 
const ArchSpecGetArchitecture () const
 
bool SetArchitecture (const ArchSpec &arch_spec, bool set_platform=false)
 Set the architecture for this target. More...
 
bool MergeArchitecture (const ArchSpec &arch_spec)
 
ArchitectureGetArchitecturePlugin () const
 
DebuggerGetDebugger ()
 
size_t ReadMemoryFromFileCache (const Address &addr, void *dst, size_t dst_len, Status &error)
 
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)
 
size_t ReadCStringFromMemory (const Address &addr, std::string &out_str, Status &error)
 
size_t ReadCStringFromMemory (const Address &addr, char *dst, size_t dst_max_len, Status &result_error)
 
size_t ReadScalarIntegerFromMemory (const Address &addr, uint32_t byte_size, bool is_signed, Scalar &scalar, 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)
 
SectionLoadListGetSectionLoadList ()
 
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. More...
 
PathMappingListGetImageSearchPathList ()
 
llvm::Expected< TypeSystem & > GetScratchTypeSystemForLanguage (lldb::LanguageType language, bool create_on_demand=true)
 
std::vector< TypeSystem * > GetScratchTypeSystems (bool create_on_demand=true)
 
PersistentExpressionStateGetPersistentExpressionStateForLanguage (lldb::LanguageType language)
 
UserExpressionGetUserExpressionForLanguage (llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType 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. More...
 
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 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 ()
 
void SetTrace (const lldb::TraceSP &trace_sp)
 Set the Trace object containing processor trace information of this target. More...
 
lldb::TraceSP GetTrace ()
 Get the Trace object containing processor trace information of this target. More...
 
llvm::Expected< lldb::TraceSP > CreateTrace ()
 Create a Trace object for the current target using the using the default supported tracing technology for this process. More...
 
llvm::Expected< lldb::TraceSP > GetTraceOrCreate ()
 If a Trace object is present, this returns it, otherwise a new Trace is created with Trace::CreateTrace. More...
 
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. More...
 
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. More...
 
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. More...
 
bool RunStopHooks ()
 
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 SetCollectingStats (bool v)
 
bool GetCollectingStats ()
 
void IncrementStats (lldb_private::StatisticKind key)
 
std::vector< uint32_tGetStatistics ()
 
- 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)
 
const char * GetDisassemblyFlavor () const
 
InlineStrategy GetInlineStrategy () 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
 
FileSpecList GetExecutableSearchPaths ()
 
void AppendExecutableSearchPaths (const FileSpec &)
 
FileSpecList GetDebugFileSearchPaths ()
 
FileSpecList GetClangModuleSearchPaths ()
 
bool GetEnableAutoImportClangModules () const
 
ImportStdModule GetImportStdModule () const
 
bool GetEnableAutoApplyFixIts () const
 
uint64_t GetNumberOfRetriesWithFixits () const
 
bool GetEnableNotifyAboutFixIts () const
 
bool GetEnableSaveObjects () const
 
bool GetEnableSyntheticValue () const
 
uint32_t GetMaxZeroPaddingInFloatFormat () const
 
uint32_t GetMaximumNumberOfChildrenToDisplay () const
 
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 ()
 
lldb::LanguageType GetLanguage () const
 
llvm::StringRef GetExpressionPrefixContents ()
 
uint64_t GetExprErrorLimit () 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 GetNonStopModeEnabled () const
 
void SetNonStopModeEnabled (bool b)
 
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
 
void SetInjectLocalVariables (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 ()=default
 
 Properties (const lldb::OptionValuePropertiesSP &collection_sp)
 
virtual ~Properties ()=default
 
virtual lldb::OptionValuePropertiesSP GetValueProperties () const
 
virtual lldb::OptionValueSP GetPropertyValue (const ExecutionContext *exe_ctx, llvm::StringRef property_path, bool will_modify, Status &error) const
 
virtual Status 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)
 
virtual void DumpAllPropertyValues (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask)
 
virtual void DumpAllDescriptions (CommandInterpreter &interpreter, Stream &strm) const
 
size_t Apropos (llvm::StringRef keyword, std::vector< const Property * > &matching_properties) const
 
lldb::OptionValuePropertiesSP GetSubProperty (const ExecutionContext *exe_ctx, ConstString name)
 
- Public Member Functions inherited from lldb_private::Broadcaster
 Broadcaster (lldb::BroadcasterManagerSP manager_sp, const char *name)
 Construct with a broadcaster with a name. More...
 
virtual ~Broadcaster ()
 Destructor. More...
 
void CheckInWithManager ()
 
void BroadcastEvent (lldb::EventSP &event_sp)
 Broadcast an event which has no associated data. More...
 
void BroadcastEventIfUnique (lldb::EventSP &event_sp)
 
void BroadcastEvent (uint32_t event_type, const lldb::EventDataSP &event_data_sp)
 
void BroadcastEvent (uint32_t event_type, EventData *event_data=nullptr)
 
void BroadcastEventIfUnique (uint32_t event_type, EventData *event_data=nullptr)
 
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. More...
 
ConstString GetBroadcasterName ()
 Get the NULL terminated C string name of this Broadcaster object. More...
 
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. More...
 
void SetEventName (uint32_t event_mask, const char *name)
 Set the name for an event bit. More...
 
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. More...
 
bool HijackBroadcaster (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX)
 Provides a simple mechanism to temporarily redirect events from broadcaster. More...
 
bool IsHijackedForEvent (uint32_t event_mask)
 
void RestoreBroadcaster ()
 Restore the state of the Broadcaster from a previous hijack attempt. More...
 
lldb::BroadcasterManagerSP GetManager ()
 
- 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 ConstStringGetStaticBroadcasterClass ()
 
static void SettingsInitialize ()
 
static void SettingsTerminate ()
 
static FileSpecList GetDefaultExecutableSearchPaths ()
 
static FileSpecList GetDefaultDebugFileSearchPaths ()
 
static ArchSpec GetDefaultArchitecture ()
 
static void SetDefaultArchitecture (const ArchSpec &arch)
 
static const lldb::TargetPropertiesSP & GetGlobalProperties ()
 
static TargetGetTargetFromContexts (const ExecutionContext *exe_ctx_ptr, const SymbolContext *sc_ptr)
 
- Static Public Member Functions inherited from lldb_private::Properties
static const char * GetExperimentalSettingsName ()
 
static bool IsSettingExperimental (llvm::StringRef setting)
 

Protected Types

using BreakpointNameList = std::map< ConstString, BreakpointName * >
 
typedef std::map< lldb::LanguageType, lldb::REPLSP > REPLMap
 
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. More...
 
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
 
- Protected Member Functions inherited from lldb_private::Broadcaster
BroadcasterImplSP GetBroadcasterImpl ()
 
const char * GetHijackingListenerName ()
 

Static Protected Member Functions

static void ImageSearchPathsChanged (const PathMappingList &path_list, void *baton)
 

Protected Attributes

Debuggerm_debugger
 
lldb::PlatformSP m_platform_sp
 The platform for this target. More...
 
std::recursive_mutex m_mutex
 An API mutex that is used by the lldb::SB* classes make the SB interface thread safe. More...
 
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. More...
 
Arch m_arch
 
ModuleList m_images
 The list of images for this process (shared libraries and anything dynamically loaded). More...
 
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. More...
 
bool m_suppress_stop_hooks
 
bool m_is_dummy_target
 Used to not run stop hooks for expressions. More...
 
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. More...
 
lldb::StackFrameRecognizerManagerUP m_frame_recognizer_manager_up
 Stores the frame recognizers of this target. More...
 
- Protected Attributes inherited from lldb_private::Properties
lldb::OptionValuePropertiesSP m_collection_sp
 

Private Member Functions

 Target (Debugger &debugger, const ArchSpec &target_arch, const lldb::PlatformSP &platform_sp, bool is_dummy_target)
 Construct with optional file and arch. More...
 
bool ProcessIsValid ()
 
void PrimeFromDummyTarget (Target &target)
 
void AddBreakpoint (lldb::BreakpointSP breakpoint_sp, bool internal)
 
void FinalizeFileActions (ProcessLaunchInfo &info)
 
 Target (const Target &)=delete
 
const Targetoperator= (const Target &)=delete
 

Private Attributes

std::vector< uint32_tm_stats_storage
 
bool m_collecting_stats = false
 

Friends

class TargetList
 
class Debugger
 

Detailed Description

Definition at line 454 of file Target.h.

Member Typedef Documentation

◆ BreakpointNameList

Definition at line 1419 of file Target.h.

◆ REPLMap

typedef std::map<lldb::LanguageType, lldb::REPLSP> lldb_private::Target::REPLMap
protected

Definition at line 1433 of file Target.h.

◆ StopHookCollection

Definition at line 1438 of file Target.h.

◆ StopHookSP

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

Definition at line 1297 of file Target.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Broadcaster event bits definitions.

Enumerator
eBroadcastBitBreakpointChanged 
eBroadcastBitModulesLoaded 
eBroadcastBitModulesUnloaded 
eBroadcastBitWatchpointChanged 
eBroadcastBitSymbolsLoaded 

Definition at line 464 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 
)
private

Construct with optional file and arch.

This member is private. Clients must use TargetList::CreateTarget(const FileSpec*, const ArchSpec*) so all targets can be tracked from the central target list.

See also
TargetList::CreateTarget(const FileSpec*, const ArchSpec*)

Definition at line 87 of file Target.cpp.

References lldb_private::Broadcaster::CheckInWithManager(), eBroadcastBitBreakpointChanged, eBroadcastBitModulesLoaded, eBroadcastBitModulesUnloaded, eBroadcastBitSymbolsLoaded, eBroadcastBitWatchpointChanged, lldb_private::ArchSpec::GetArchitectureName(), lldb_private::GetLogIfAllCategoriesSet(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsValid(), LIBLLDB_LOG_OBJECT, LIBLLDB_LOG_TARGET, LLDB_LOG, lldb_private::Broadcaster::SetEventName(), and lldb_private::TargetProperties::UpdateLaunchInfoFromProperties().

◆ Target() [2/2]

lldb_private::Target::Target ( const Target )
privatedelete

Member Function Documentation

◆ AddBreakpoint()

void Target::AddBreakpoint ( lldb::BreakpointSP  breakpoint_sp,
bool  internal 
)
private

◆ AddBreakpointName()

void Target::AddBreakpointName ( BreakpointName bp_name)

Definition at line 695 of file Target.cpp.

References lldb_private::BreakpointName::GetName(), and m_breakpoint_names.

Referenced by PrimeFromDummyTarget().

◆ AddNameToBreakpoint() [1/2]

void Target::AddNameToBreakpoint ( BreakpointID id,
const char *  name,
Status error 
)

◆ AddNameToBreakpoint() [2/2]

void lldb_private::Target::AddNameToBreakpoint ( lldb::BreakpointSP &  bp_sp,
const char *  name,
Status error 
)

◆ ApplyNameToBreakpoints()

void Target::ApplyNameToBreakpoints ( BreakpointName bp_name)

◆ Attach()

Status Target::Attach ( ProcessAttachInfo attach_info,
Stream stream 
)

◆ 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 2184 of file Target.cpp.

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

Referenced by lldb_private::TraceInstructionDumper::DumpInstructions(), and EvaluateExpression().

◆ CalculateProcess()

ProcessSP Target::CalculateProcess ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2178 of file Target.cpp.

References m_process_sp.

Referenced by CommandObjectTargetModulesLoad::DoExecute().

◆ CalculateStackFrame()

StackFrameSP Target::CalculateStackFrame ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2182 of file Target.cpp.

◆ CalculateTarget()

TargetSP Target::CalculateTarget ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2176 of file Target.cpp.

◆ CalculateThread()

ThreadSP Target::CalculateThread ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2180 of file Target.cpp.

◆ CleanupProcess()

void Target::CleanupProcess ( )

◆ ClearAllLoadedSections()

void Target::ClearAllLoadedSections ( )

◆ ClearAllWatchpointHistoricValues()

bool Target::ClearAllWatchpointHistoricValues ( )

◆ ClearAllWatchpointHitCounts()

bool Target::ClearAllWatchpointHitCounts ( )

◆ ClearModules()

void Target::ClearModules ( bool  delete_locations)

◆ ConfigureBreakpointName()

void Target::ConfigureBreakpointName ( BreakpointName bp_name,
const BreakpointOptions options,
const BreakpointName::Permissions permissions 
)

◆ CreateAddressInModuleBreakpoint()

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

Definition at line 417 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 407 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 331 of file Target.cpp.

References 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(), and lldb_private::FileSpec::IsSourceImplementationFile().

Referenced by lldb_private::InstrumentationRuntimeASan::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::StructuredDataDarwinLog::AddInitCompletionHook(), lldb_private::AppleThreadPlanStepThroughDirectDispatch::AppleThreadPlanStepThroughDirectDispatch(), CreateAddressInModuleBreakpoint(), CreateBreakpoint(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionBreakpoint(), lldb_private::LanguageRuntime::CreateExceptionBreakpoint(), lldb_private::Breakpoint::CreateFromStructuredData(), CreateFuncRegexBreakpoint(), lldb_private::RenderScriptRuntime::CreateKernelBreakpoint(), lldb_private::RenderScriptRuntime::CreateReductionBreakpoint(), CreateScriptedBreakpoint(), lldb_private::RenderScriptRuntime::CreateScriptGroupBreakpoint(), CreateSourceRegexBreakpoint(), CommandObjectBreakpointSet::DoExecute(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), lldb_private::RenderScriptRuntime::LoadRuntimeHooks(), DynamicLoaderPOSIXDYLD::ProbeEntry(), lldb_private::ThreadPlanRunToAddress::SetInitialBreakpoints(), JITLoaderGDB::SetJITBreakpoint(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), DynamicLoaderMacOS::SetNotificationBreakpoint(), DynamicLoaderMacOSXDYLD::SetNotificationBreakpoint(), DynamicLoaderDarwinKernel::SetNotificationBreakpointIfNeeded(), DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), PlatformDarwin::SetThreadCreationBreakpoint(), lldb_private::ThreadPlanStepOut::ThreadPlanStepOut(), and lldb_private::ThreadPlanStepThrough::ThreadPlanStepThrough().

◆ 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,
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 
)

◆ CreateBreakpoint() [6/7]

BreakpointSP Target::CreateBreakpoint ( lldb::addr_t  load_addr,
bool  internal,
bool  request_hardware 
)

◆ CreateBreakpoint() [7/7]

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

◆ CreateBreakpointsFromFile() [1/2]

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

Definition at line 1083 of file Target.cpp.

Referenced by CommandObjectBreakpointRead::DoExecute().

◆ CreateBreakpointsFromFile() [2/2]

Status Target::CreateBreakpointsFromFile ( const FileSpec file,
std::vector< std::string > &  names,
BreakpointIDList new_bps 
)

◆ 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()

const lldb::ProcessSP & Target::CreateProcess ( lldb::ListenerSP  listener_sp,
llvm::StringRef  plugin_name,
const FileSpec crash_file,
bool  can_connect 
)

◆ 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 2545 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 3090 of file Target.cpp.

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

Referenced by GetTraceOrCreate().

◆ CreateUtilityFunction()

llvm::Expected< std::unique_ptr< UtilityFunction > > Target::CreateUtilityFunction ( std::string  expression,
std::string  name,
lldb::LanguageType  language,
ExecutionContext exe_ctx 
)

◆ CreateWatchpoint()

WatchpointSP Target::CreateWatchpoint ( lldb::addr_t  addr,
size_t  size,
const CompilerType type,
uint32_t  kind,
Status error 
)

◆ DeleteBreakpointName()

void Target::DeleteBreakpointName ( ConstString  name)

◆ DeleteCurrentProcess()

void Target::DeleteCurrentProcess ( )

◆ Destroy()

void 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 1391 of file Target.cpp.

References lldb_private::Target::Arch::GetSpec(), m_arch, m_breakpoint_list, m_internal_breakpoint_list, and lldb_private::BreakpointList::RemoveInvalidLocations().

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

◆ DisableAllBreakpoints()

void Target::DisableAllBreakpoints ( bool  internal_also = false)

◆ DisableAllowedBreakpoints()

void Target::DisableAllowedBreakpoints ( )

◆ DisableAllWatchpoints()

bool Target::DisableAllWatchpoints ( bool  end_to_end = true)

◆ DisableBreakpointByID()

bool Target::DisableBreakpointByID ( lldb::break_id_t  break_id)

◆ DisableWatchpointByID()

bool Target::DisableWatchpointByID ( lldb::watch_id_t  watch_id)

◆ 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 154 of file Target.cpp.

References lldb_private::BreakpointList::Dump(), lldb_private::ModuleList::Dump(), 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().

◆ EnableAllBreakpoints()

void Target::EnableAllBreakpoints ( bool  internal_also = false)

◆ EnableAllowedBreakpoints()

void Target::EnableAllowedBreakpoints ( )

◆ EnableAllWatchpoints()

bool Target::EnableAllWatchpoints ( bool  end_to_end = true)

◆ EnableBreakpointByID()

bool Target::EnableBreakpointByID ( lldb::break_id_t  break_id)

◆ EnableWatchpointByID()

bool Target::EnableWatchpointByID ( lldb::watch_id_t  watch_id)

◆ EvaluateExpression()

ExpressionResults Target::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 
)

◆ FinalizeFileActions()

void Target::FinalizeFileActions ( ProcessLaunchInfo info)
private

◆ FindBreakpointName()

BreakpointName * Target::FindBreakpointName ( ConstString  name,
bool  can_create,
Status error 
)

◆ GetAPIMutex()

std::recursive_mutex & Target::GetAPIMutex ( )

◆ GetArchitecture()

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

Definition at line 970 of file Target.h.

References lldb_private::Target::Arch::GetSpec(), and m_arch.

Referenced by CommandObjectTargetSymbolsAdd::AddModuleSymbols(), CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), lldb_private::Process::AdvanceAddressToNextBranchInstruction(), lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::TraceSessionSaver::BuildProcessesSection(), ThreadMachCore::CalculateStopInfo(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), lldb_private::wasm::DynamicLoaderWasmDYLD::CreateInstance(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), JITLoaderGDB::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), DynamicLoaderDarwinKernel::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), lldb_private::StructuredDataDarwinLog::CreateInstance(), lldb_private::TypeSystemClang::CreateInstance(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::Platform::DoConnectProcess(), ProcessKDP::DoConnectRemote(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), lldb_private::CommandObjectDisassemble::DoExecute(), CommandObjectMemoryRead::DoExecute(), CommandObjectProcessAttach::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectMemoryWrite::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesAdd::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), ProcessElfCore::DoLoadCore(), lldb_private::AddressRange::Dump(), lldb_private::Address::Dump(), lldb_private::StackFrame::Dump(), DumpAddressAndContent(), lldb_private::TraceInstructionDumper::DumpInstructions(), CommandObjectSourceInfo::DumpLinesInFunctions(), DumpTargetInfo(), lldb_private::Type::DumpValueInMemory(), lldb::SBInstruction::EmulateWithFrame(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), OptionGroupReadMemory::FinalizeSettings(), FindModulesByName(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::FormatEntity::Format(), 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::ThreadPlanAssemblyTracer::GetDisassembler(), lldb_private::FuncUnwinders::GetEHFrameAugmentedUnwindPlan(), DynamicLoaderPOSIXDYLD::GetEntryPoint(), lldb_private::AppleObjCRuntime::GetObjCVersion(), ABIWindows_x86_64::GetReturnValueObjectImpl(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), PlatformDarwin::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::StackFrame::GetStatus(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::FuncUnwinders::GetUnwindAssemblyProfiler(), lldb_private::Value::GetValueAsData(), lldb_private::InferiorCallMmap(), isLoadBiasIncorrect(), lldb_private::ThreadPlanStepInstruction::IsPlanStale(), Launch(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), lldb_private::DynamicLoader::LoadModuleAtAddress(), lldb_private::RenderScriptRuntime::LoadRuntimeHooks(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::CommandObjectDisassemble::CommandOptions::OptionParsingStarting(), CommandObjectTargetModulesList::PrintModule(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), JITLoaderGDB::ReadJITDescriptor(), DYLDRendezvous::ReadSOEntryFromMemory(), lldb_private::AssertFrameRecognizer::RecognizeFrame(), lldb_private::RegisterAssertFrameRecognizer(), ObjectFileMinidump::SaveCore(), ObjectFileMachO::SaveCore(), DynamicLoaderDarwinKernel::SearchForKernelNearPC(), DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), DYLDRendezvous::SOEntryIsMainExecutable(), DisassemblerLLVMC::SymbolLookup(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::DynamicLoaderDarwin::UseDYLDSPI(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes().

◆ GetArchitecturePlugin()

Architecture* lldb_private::Target::GetArchitecturePlugin ( ) const
inline

◆ GetBreakableLoadAddress()

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

Definition at line 2534 of file Target.cpp.

References GetArchitecturePlugin().

Referenced by CreateBreakpoint().

◆ GetBreakpointByID()

BreakpointSP Target::GetBreakpointByID ( lldb::break_id_t  break_id)

◆ GetBreakpointList() [1/2]

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

◆ GetBreakpointList() [2/2]

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

Definition at line 296 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 760 of file Target.cpp.

References m_breakpoint_names.

Referenced by CommandObjectBreakpointNameList::DoExecute().

◆ GetBroadcasterClass()

ConstString& 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 476 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 2519 of file Target.cpp.

References GetArchitecturePlugin().

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

◆ GetCollectingStats()

bool lldb_private::Target::GetCollectingStats ( )
inline

◆ GetDebugger()

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

Definition at line 1003 of file Target.h.

References m_debugger.

Referenced by lldb_private::ClangUserExpression::AddArguments(), Attach(), lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::Process::CreateBreakpointSite(), lldb_private::BreakpointOptions::CreateFromStructuredData(), CreateProcess(), ProcessKDP::DoConnectRemote(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), lldb_private::InstructionList::Dump(), lldb_private::StackFrame::DumpUsingSettingsFormat(), lldb_private::Thread::DumpUsingSettingsFormat(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::REPL::GetIOHandler(), lldb_private::ThreadPlanPython::GetScriptInterpreter(), lldb_private::StackFrame::GetStatus(), lldb_private::Thread::GetStatus(), lldb_private::StructuredDataDarwinLog::HandleArrivalOfStructuredData(), lldb_private::Target::StopHookCommandLine::HandleStop(), lldb_private::REPL::IOHandlerComplete(), lldb_private::REPL::IOHandlerInputComplete(), Launch(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), LoadScriptingResourceForModule(), lldb_private::Module::LoadScriptingResourceInTarget(), PlatformDarwin::LocateExecutableScriptingResources(), lldb_private::ThreadPlanAssemblyTracer::Log(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), DynamicLoaderDarwinKernel::ParseKextSummaries(), 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::PrintWarning(), lldb_private::Process::ProcessIOHandlerIsActive(), lldb_private::Process::PushProcessIOHandler(), DynamicLoaderDarwinKernel::ReadKextSummaryHeader(), lldb_private::REPL::REPL(), lldb::SBThread::ResumeNewPlan(), lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData(), lldb_private::REPL::RunLoop(), RunScriptFormatKeyword(), ObjectFileMachO::SaveCore(), and lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction().

◆ GetDefaultArchitecture()

ArchSpec Target::GetDefaultArchitecture ( )
static

◆ GetDefaultDebugFileSearchPaths()

FileSpecList Target::GetDefaultDebugFileSearchPaths ( )
static

Definition at line 2354 of file Target.cpp.

References GetGlobalProperties().

◆ GetDefaultExecutableSearchPaths()

FileSpecList Target::GetDefaultExecutableSearchPaths ( )
static

Definition at line 2347 of file Target.cpp.

References GetGlobalProperties().

Referenced by lldb_private::TargetList::CreateTargetInternal().

◆ 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 2483 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().

◆ 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 1348 of file Target.cpp.

References lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetSize(), lldb_private::ObjectFile::GetType(), and m_images.

Referenced by PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(), PlatformPOSIX::Attach(), Attach(), lldb_private::Process::CompleteAttach(), DynamicLoaderPOSIXDYLD::ComputeLoadOffset(), ProcessKDP::DoConnectRemote(), CommandObjectProcessLaunch::DoExecute(), CommandObjectProcessAttach::DoExecute(), ProcessElfCore::DoLoadCore(), DynamicLoaderHexagonDYLD::GetEntryPoint(), GetExecutableModulePointer(), lldb_private::ProcessWindows::GetImageInfoAddress(), ProcessElfCore::GetImageInfoAddress(), lldb_private::ProcessTrace::GetProcessInfo(), lldb_private::minidump::ProcessMinidump::GetProcessInfo(), lldb_private::ScriptedProcess::GetProcessInfo(), ProcessElfCore::GetProcessInfo(), PlatformMacOSX::GetSDKDirectory(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), ImageSearchPathsChanged(), Install(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), lldb_private::process_gdb_remote::ProcessGDBRemote::MaybeLoadExecutableModule(), lldb_private::ProcessWindows::OnDebuggerConnected(), DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule(), DYLDRendezvous::ResolveRendezvousAddress(), SetArchitecture(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos().

◆ GetExecutableModulePointer()

Module * Target::GetExecutableModulePointer ( )

◆ GetFrameRecognizerManager()

StackFrameRecognizerManager& lldb_private::Target::GetFrameRecognizerManager ( )
inline

◆ 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()

const TargetPropertiesSP & Target::GetGlobalProperties ( )
static

◆ GetImages() [1/2]

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

Definition at line 930 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 928 of file Target.h.

References m_images.

Referenced by MinidumpFileBuilder::AddModuleList(), lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), lldb_private::AppleObjCRuntime::AppleObjCRuntime(), lldb_private::OptionValueUUID::AutoComplete(), SystemRuntimeMacOSX::BacktraceRecordingHeadersInitialized(), lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), lldb_private::TraceSessionSaver::BuildModulesSection(), lldb_private::AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing(), DynamicLoaderMacOS::CanLoadImage(), lldb_private::SourceManager::File::CommonInitializer(), CreateAllImageInfosPayload(), lldb_private::MemoryHistoryASan::CreateInstance(), JITLoaderGDB::DidAttach(), JITLoaderGDB::DidLaunch(), CommandObjectMemoryRead::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectTargetVariable::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpClangAST::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), lldb_private::Address::Dump(), CommandObjectSourceInfo::DumpLinesForAddress(), CommandObjectSourceInfo::DumpLinesForFile(), CommandObjectSourceInfo::DumpLinesInFunctions(), Evaluate_DW_OP_entry_value(), PlatformDarwin::ExtractCrashInfoAnnotations(), lldb_private::Language::ImageListTypeScavenger::Find_Impl(), lldb_private::ClangExpressionDeclMap::FindGlobalVariable(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), CommandObjectSourceList::FindMatchingFunctions(), CommandObjectSourceList::FindMatchingFunctionSymbols(), HexagonDYLDRendezvous::FindMetadata(), DYLDRendezvous::FindMetadata(), FindModulesByName(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::AppleObjCRuntimeV2::GetByteOffsetForIvar(), lldb_private::AppleObjCRuntimeV2::GetCFBooleanValuesIfNeeded(), lldb_private::CommandObjectDisassemble::GetContainingAddressRanges(), GetEntryPointAddress(), lldb_private::AppleObjCRuntime::GetFoundationVersion(), lldb_private::platform_android::PlatformAndroid::GetLibdlFunctionDeclarations(), lldb_private::CommandObjectDisassemble::GetNameRanges(), lldb_private::AppleObjCRuntime::GetObjCModule(), lldb_private::AppleObjCRuntime::GetObjCVersion(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), lldb_private::AppleObjCRuntime::GetPrintForDebuggerAddr(), lldb_private::DynamicLoaderDarwin::GetPThreadLibraryModule(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::ItaniumABILanguageRuntime::GetTypeInfoFromVTableAddress(), CommandObjectTargetVariable::GetVariableCallback(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), lldb_private::ClangUtilityFunction::Install(), Install(), lldb_private::Thread::JumpToLine(), load_standalone_binary(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::DynamicLoader::LoadModuleAtAddress(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), DynamicLoaderPOSIXDYLD::LoadVDSO(), lldb_private::ClangExpressionDeclMap::LookupFunction(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), ModuleIsExcludedForUnconstrainedSearches(), lldb_private::CommandCompletions::ModuleUUIDs(), lldb_private::ClangUserExpression::Parse(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), JITLoaderGDB::ReadJITDescriptorImpl(), SystemRuntimeMacOSX::ReadLibdispatchOffsetsAddress(), SystemRuntimeMacOSX::ReadLibdispatchTSDIndexesAddress(), SystemRuntimeMacOSX::ReadLibpthreadOffsetsAddress(), DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(), lldb_private::RenderScriptRuntime::RenderScriptRuntime(), 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::UnloadImages(), lldb_private::DynamicLoaderDarwin::UpdateDYLDImageInfoFromNewImageInfo(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), lldb_private::FunctionCaller::WriteFunctionWrapper(), and lldb_private::LLVMUserExpression::~LLVMUserExpression().

◆ GetImageSearchPathList()

PathMappingList & Target::GetImageSearchPathList ( )

◆ 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 1331 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 2527 of file Target.cpp.

References GetArchitecturePlugin().

Referenced by lldb_private::Address::GetOpcodeLoadAddress(), 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 1979 of file Target.cpp.

References lldb_private::ModuleList::Append(), lldb_private::UUID::Clear(), 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::FindFirstModule(), lldb_private::ModuleList::FindModules(), lldb_private::ModuleList::ForEach(), lldb_private::FileSpec::GetDirectory(), lldb_private::TargetProperties::GetExecutableSearchPaths(), lldb_private::FileSpec::GetFilename(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::ModuleList::GetIndexForModule(), lldb_private::GetLogIfAnyCategoriesSet(), lldb_private::TargetProperties::GetPreloadSymbols(), lldb_private::ModuleList::GetSharedModule(), lldb_private::PathMappingList::GetSize(), lldb_private::ObjectFile::GetType(), lldb_private::ModuleSpec::GetUUID(), lldb_private::ConstString::IsEmpty(), lldb_private::UUID::IsValid(), LIBLLDB_LOG_MODULES, LIBLLDB_LOG_TARGET, LLDB_INVALID_INDEX32, m_image_search_paths, m_images, m_platform_sp, m_process_sp, message(), lldb_private::PathMappingList::RemapPath(), lldb_private::ModuleList::Remove(), lldb_private::ModuleList::RemoveSharedModuleIfOrphaned(), lldb_private::ModuleList::ReplaceModule(), and lldb_private::Status::SetErrorString().

Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), CommandObjectTargetModulesAdd::DoExecute(), ProcessElfCore::DoLoadCore(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), lldb_private::DynamicLoader::LoadModuleAtAddress(), lldb_private::ProcessWindows::OnDebuggerConnected(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), and SetExecutableModule().

◆ GetPersistentExpressionStateForLanguage()

PersistentExpressionState * Target::GetPersistentExpressionStateForLanguage ( lldb::LanguageType  language)

◆ GetPersistentSymbol()

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

◆ GetPersistentVariable()

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

◆ GetPlatform()

lldb::PlatformSP lldb_private::Target::GetPlatform ( )
inline

◆ GetProcessSP()

const lldb::ProcessSP & Target::GetProcessSP ( ) const

◆ GetREPL()

lldb::REPLSP Target::GetREPL ( Status err,
lldb::LanguageType  language,
const char *  repl_options,
bool  can_create 
)

◆ GetScratchTypeSystemForLanguage()

llvm::Expected< TypeSystem & > Target::GetScratchTypeSystemForLanguage ( lldb::LanguageType  language,
bool  create_on_demand = true 
)

◆ GetScratchTypeSystems()

std::vector< TypeSystem * > Target::GetScratchTypeSystems ( bool  create_on_demand = true)

◆ GetSearchFilterForModule()

SearchFilterSP Target::GetSearchFilterForModule ( const FileSpec containingModule)

◆ GetSearchFilterForModuleAndCUList()

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

◆ GetSearchFilterForModuleList()

SearchFilterSP Target::GetSearchFilterForModuleList ( const FileSpecList *  containingModuleList)

◆ GetSectionLoadList()

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

Definition at line 1043 of file Target.h.

References lldb_private::SectionLoadHistory::GetCurrentSectionLoadList(), and m_section_load_history.

Referenced by lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), lldb_private::TraceSessionSaver::BuildModulesSection(), CreateBreakpoint(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), lldb_private::ProcessTrace::DoReadMemory(), lldb_private::SectionList::Dump(), DumpAddressAndContent(), CommandObjectRegisterRead::DumpRegister(), lldb_private::BreakpointLocationList::FindByAddress(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb::SBBreakpoint::FindLocationByAddress(), lldb::SBBreakpoint::FindLocationIDByAddress(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), lldb_private::CommandObjectDisassemble::GetContainingAddressRanges(), lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), lldb_private::ObjectFile::GetLoadableData(), lldb_private::Section::GetLoadBaseAddress(), CommandObjectSourceInfo::GetSymbolContextsForAddress(), lldb_private::ItaniumABILanguageRuntime::GetTypeInfoFromVTableAddress(), lldb_private::Value::GetValueAsData(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), lldb_private::ThreadPlanAssemblyTracer::Log(), LookupAddressInModule(), CommandObjectTargetModulesList::PrintModule(), ReadAddress(), JITLoaderGDB::ReadJITDescriptorImpl(), ReadMemory(), ReadPointerFromMemory(), ResolveAddress(), lldb_private::RenderScriptRuntime::ResolveKernelName(), ObjectFileJIT::SetLoadAddress(), ObjectFileMachO::SetLoadAddress(), ObjectFilePECOFF::SetLoadAddress(), ObjectFileELF::SetLoadAddress(), lldb_private::Address::SetLoadAddress(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and DisassemblerLLVMC::SymbolLookup().

◆ GetSourceManager()

SourceManager & Target::GetSourceManager ( )

◆ GetStaticBroadcasterClass()

ConstString & Target::GetStaticBroadcasterClass ( )
static

Definition at line 82 of file Target.cpp.

Referenced by lldb_private::Debugger::DefaultEventHandler(), and GetBroadcasterClass().

◆ GetStatistics()

std::vector<uint32_t> lldb_private::Target::GetStatistics ( )
inline

Definition at line 1474 of file Target.h.

References m_stats_storage.

Referenced by CommandObjectStatsDump::DoExecute().

◆ GetStopHookAtIndex()

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

Definition at line 1333 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 2574 of file Target.cpp.

References m_stop_hooks.

◆ GetStopHookSize()

size_t lldb_private::Target::GetStopHookSize ( )

◆ GetSuppressStopHooks()

bool lldb_private::Target::GetSuppressStopHooks ( )
inline

Definition at line 1319 of file Target.h.

References m_suppress_stop_hooks.

◆ GetTargetFromContexts()

Target * Target::GetTargetFromContexts ( const ExecutionContext exe_ctx_ptr,
const SymbolContext sc_ptr 
)
static

◆ 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 3088 of file Target.cpp.

References m_trace_sp.

Referenced by lldb_private::CommandObject::CheckRequirements(), and CommandObjectTraceDumpInfo::DoExecute().

◆ 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 3115 of file Target.cpp.

References CreateTrace(), and m_trace_sp.

◆ GetUserExpressionForLanguage()

UserExpression * Target::GetUserExpressionForLanguage ( llvm::StringRef  expr,
llvm::StringRef  prefix,
lldb::LanguageType  language,
Expression::ResultType  desired_type,
const EvaluateExpressionOptions options,
ValueObject ctx_obj,
Status error 
)

◆ GetWatchpointList()

WatchpointList& lldb_private::Target::GetWatchpointList ( )
inline

◆ 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

◆ IncrementStats()

void lldb_private::Target::IncrementStats ( lldb_private::StatisticKind  key)
inline

◆ Install()

Status Target::Install ( ProcessLaunchInfo launch_info)

◆ IsDummyTarget()

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

Definition at line 531 of file Target.h.

References m_is_dummy_target.

◆ IsValid()

bool lldb_private::Target::IsValid ( )
inline

Definition at line 598 of file Target.h.

References m_valid.

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

◆ Launch()

Status Target::Launch ( ProcessLaunchInfo launch_info,
Stream stream 
)

Definition at line 2910 of file Target.cpp.

References CreateProcess(), DeleteCurrentProcess(), error(), lldb::eStateConnected, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateStopped, FinalizeFileActions(), lldb_private::ProcessInfo::GetArchitecture(), GetArchitecture(), lldb_private::Debugger::GetCommandInterpreter(), GetDebugger(), lldb_private::ProcessInfo::GetExecutableFile(), lldb_private::ProcessLaunchInfo::GetFlags(), GetGlobalProperties(), lldb_private::ProcessLaunchInfo::GetHijackListener(), lldb_private::ProcessLaunchInfo::GetListener(), lldb_private::GetLogIfAllCategoriesSet(), lldb_private::FileSpec::GetPath(), GetPlatform(), lldb_private::ProcessLaunchInfo::GetProcessPluginName(), GetProcessSP(), lldb_private::ProcessLaunchInfo::GetScriptedProcessClassName(), lldb_private::ProcessLaunchInfo::GetScriptedProcessDictionarySP(), lldb_private::ProcessLaunchInfo::GetShell(), lldb_private::CommandInterpreter::GetSynchronous(), lldb_private::ProcessLaunchInfo::IsScriptedProcess(), lldb_private::ArchSpec::IsValid(), LIBLLDB_LOG_TARGET, LLDB_LOGF, m_process_sp, lldb_private::Listener::MakeListener(), lldb_private::Flags::Set(), lldb_private::Status::SetErrorStringWithFormat(), lldb_private::ProcessLaunchInfo::SetHijackListener(), lldb_private::TargetProperties::SetProcessLaunchInfo(), lldb_private::ProcessLaunchInfo::SetProcessPluginName(), lldb_private::ProcessLaunchInfo::SetScriptedProcessClassName(), lldb_private::ProcessLaunchInfo::SetScriptedProcessDictionarySP(), lldb_private::StateAsCString(), string(), and lldb_private::Flags::Test().

Referenced by CommandObjectProcessLaunch::DoExecute().

◆ LoadScriptingResources()

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

◆ MergeArchitecture()

bool Target::MergeArchitecture ( const ArchSpec arch_spec)

◆ 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 1656 of file Target.cpp.

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

◆ 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 1678 of file Target.cpp.

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

◆ ModulesDidLoad()

void Target::ModulesDidLoad ( ModuleList module_list)

◆ ModulesDidUnload()

void Target::ModulesDidUnload ( ModuleList module_list,
bool  delete_locations 
)

◆ 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 1609 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 1575 of file Target.cpp.

◆ operator=()

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

◆ PrimeFromDummyTarget()

void Target::PrimeFromDummyTarget ( Target target)
private

◆ ProcessIsValid()

bool Target::ProcessIsValid ( )
private

◆ ReadCStringFromMemory() [1/2]

size_t Target::ReadCStringFromMemory ( const Address addr,
char *  dst,
size_t  dst_max_len,
Status result_error 
)

◆ ReadCStringFromMemory() [2/2]

size_t Target::ReadCStringFromMemory ( const Address addr,
std::string out_str,
Status error 
)

◆ ReadMemory()

size_t Target::ReadMemory ( const Address addr,
void *  dst,
size_t  dst_len,
Status error,
bool  force_live_memory = false,
lldb::addr_t load_addr_ptr = nullptr 
)

◆ ReadMemoryFromFileCache()

size_t Target::ReadMemoryFromFileCache ( const Address addr,
void *  dst,
size_t  dst_len,
Status error 
)

◆ ReadPointerFromMemory()

bool Target::ReadPointerFromMemory ( const Address addr,
Status error,
Address pointer_addr,
bool  force_live_memory = false 
)

◆ ReadScalarIntegerFromMemory()

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

◆ 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 2572 of file Target.cpp.

References m_stop_hooks.

Referenced by CommandObjectTargetStopHookDelete::DoExecute().

◆ RemoveAllWatchpoints()

bool Target::RemoveAllWatchpoints ( bool  end_to_end = true)

◆ RemoveBreakpointByID()

bool Target::RemoveBreakpointByID ( lldb::break_id_t  break_id)

◆ RemoveNameFromBreakpoint()

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

◆ RemoveStopHookByID()

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

Definition at line 2567 of file Target.cpp.

References m_stop_hooks.

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

◆ RemoveWatchpointByID()

bool Target::RemoveWatchpointByID ( lldb::watch_id_t  watch_id)

◆ ResolveFileAddress()

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

◆ ResolveLoadAddress()

bool Target::ResolveLoadAddress ( lldb::addr_t  load_addr,
Address so_addr,
uint32_t  stop_id = SectionLoadHistory::eStopIDNow 
)

◆ RunStopHooks()

bool Target::RunStopHooks ( )

◆ SerializeBreakpointsToFile()

Status Target::SerializeBreakpointsToFile ( const FileSpec file,
const BreakpointIDList bp_ids,
bool  append 
)

◆ SetAllStopHooksActiveState()

void Target::SetAllStopHooksActiveState ( bool  active_state)

Definition at line 2595 of file Target.cpp.

References m_stop_hooks.

Referenced by CommandObjectTargetStopHookEnableDisable::DoExecute().

◆ SetArchitecture()

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

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).
Returns
true if the architecture was successfully set, \bfalse otherwise.

Definition at line 1462 of file Target.cpp.

References ClearModules(), lldb_private::eLoadDependentsYes, error(), lldb_private::ArchSpec::GetArchitectureName(), GetExecutableModule(), lldb_private::TargetProperties::GetExecutableSearchPaths(), lldb_private::GetLogIfAllCategoriesSet(), GetPlatform(), lldb_private::Platform::GetPlatformForArchitecture(), lldb_private::ModuleList::GetSharedModule(), lldb_private::Target::Arch::GetSpec(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsCompatibleMatch(), lldb_private::ArchSpec::IsValid(), LIBLLDB_LOG_TARGET, LLDB_LOG, LLDB_LOGF, m_arch, lldb_private::ArchSpec::MergeFrom(), lldb_private::ArchSpec::PiecewiseTripleCompare(), SetExecutableModule(), and SetPlatform().

Referenced by DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), ProcessKDP::DoConnectRemote(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessMachCore::DoLoadCore(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), ProcessElfCore::DoLoadCore(), load_standalone_binary(), MergeArchitecture(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), and DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule().

◆ SetCollectingStats()

void lldb_private::Target::SetCollectingStats ( bool  v)
inline

◆ SetDefaultArchitecture()

void Target::SetDefaultArchitecture ( const ArchSpec arch)
static

◆ 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 1397 of file Target.cpp.

References lldb_private::ModuleList::Append(), lldb_private::ModuleList::AppendIfNeeded(), ClearModules(), lldb_private::eLoadDependentsDefault, lldb_private::eLoadDependentsNo, lldb_private::eLoadDependentsYes, lldb_private::ArchSpec::GetArchitectureName(), lldb_private::ObjectFile::GetDependentModules(), lldb_private::GetLogIfAllCategoriesSet(), GetOrCreateModule(), lldb_private::Target::Arch::GetSpec(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsValid(), LIBLLDB_LOG_TARGET, LLDB_LOG, LLDB_SCOPED_TIMERF, m_arch, m_images, m_platform_sp, and ModulesDidLoad().

Referenced by lldb_private::Process::CompleteAttach(), ProcessKDP::DoConnectRemote(), ProcessElfCore::DoLoadCore(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), ImageSearchPathsChanged(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::ProcessWindows::OnDebuggerConnected(), SetArchitecture(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos().

◆ 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 263 of file Target.cpp.

References lldbassert, and m_repl_map.

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

◆ SetSectionLoadAddress()

bool Target::SetSectionLoadAddress ( const lldb::SectionSP &  section,
lldb::addr_t  load_addr,
bool  warn_multiple = false 
)

◆ SetSectionUnloaded() [1/2]

bool Target::SetSectionUnloaded ( const lldb::SectionSP &  section_sp)

◆ SetSectionUnloaded() [2/2]

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

◆ SetStopHookActiveStateByID()

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

Definition at line 2584 of file Target.cpp.

References m_stop_hooks.

Referenced by CommandObjectTargetStopHookEnableDisable::DoExecute().

◆ SetSuppresStopHooks()

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

Definition at line 1313 of file Target.h.

References m_suppress_stop_hooks.

◆ SettingsInitialize()

void Target::SettingsInitialize ( )
static

Definition at line 2343 of file Target.cpp.

References lldb_private::Process::SettingsInitialize().

◆ SettingsTerminate()

void Target::SettingsTerminate ( )
static

Definition at line 2345 of file Target.cpp.

References lldb_private::Process::SettingsTerminate().

◆ 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 3086 of file Target.cpp.

References m_trace_sp.

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

◆ SymbolsDidLoad()

void Target::SymbolsDidLoad ( ModuleList module_list)

◆ 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 2560 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)

Friends And Related Function Documentation

◆ Debugger

friend class Debugger
friend

Definition at line 461 of file Target.h.

◆ TargetList

friend class TargetList
friend

Definition at line 460 of file Target.h.

Member Data Documentation

◆ m_arch

Arch lldb_private::Target::m_arch
protected

◆ m_breakpoint_list

BreakpointList lldb_private::Target::m_breakpoint_list
protected

◆ m_breakpoint_names

BreakpointNameList lldb_private::Target::m_breakpoint_names
protected

◆ m_collecting_stats

bool lldb_private::Target::m_collecting_stats = false
private

Definition at line 1459 of file Target.h.

Referenced by GetCollectingStats(), and SetCollectingStats().

◆ m_debugger

Debugger& lldb_private::Target::m_debugger
protected

Definition at line 1403 of file Target.h.

Referenced by GetDebugger(), and RunStopHooks().

◆ 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 1451 of file Target.h.

Referenced by GetFrameRecognizerManager(), and PrimeFromDummyTarget().

◆ m_image_search_paths

PathMappingList lldb_private::Target::m_image_search_paths
protected

Definition at line 1430 of file Target.h.

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

◆ 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 1414 of file Target.h.

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

◆ m_internal_breakpoint_list

BreakpointList lldb_private::Target::m_internal_breakpoint_list
protected

◆ m_is_dummy_target

bool lldb_private::Target::m_is_dummy_target
protected

Used to not run stop hooks for expressions.

Definition at line 1445 of file Target.h.

Referenced by IsDummyTarget().

◆ 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 1441 of file Target.h.

Referenced by CleanupProcess(), and RunStopHooks().

◆ 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 1405 of file Target.h.

Referenced by Destroy(), and GetAPIMutex().

◆ m_next_persistent_variable_index

unsigned lldb_private::Target::m_next_persistent_variable_index = 0
protected

Definition at line 1446 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 1412 of file Target.h.

Referenced by GetAPIMutex().

◆ m_process_sp

lldb::ProcessSP lldb_private::Target::m_process_sp
protected

◆ m_repl_map

REPLMap lldb_private::Target::m_repl_map
protected

Definition at line 1434 of file Target.h.

Referenced by 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 1429 of file Target.h.

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

◆ m_section_load_history

SectionLoadHistory lldb_private::Target::m_section_load_history
protected

◆ m_source_manager_up

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

Definition at line 1436 of file Target.h.

Referenced by GetSourceManager().

◆ m_stats_storage

std::vector<uint32_t> lldb_private::Target::m_stats_storage
private

Definition at line 1458 of file Target.h.

Referenced by GetStatistics(), and IncrementStats().

◆ m_stop_hook_next_id

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

Definition at line 1440 of file Target.h.

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

◆ m_stop_hooks

StopHookCollection lldb_private::Target::m_stop_hooks
protected

◆ 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 1449 of file Target.h.

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

◆ m_valid

bool lldb_private::Target::m_valid
protected

This records the last natural stop at which we ran a stop-hook.

Definition at line 1443 of file Target.h.

Referenced by Destroy(), GetScratchTypeSystemForLanguage(), GetScratchTypeSystems(), IsValid(), ModulesDidLoad(), ModulesDidUnload(), NotifyModuleAdded(), NotifyModuleRemoved(), NotifyModuleUpdated(), and SymbolsDidLoad().

◆ m_watchpoint_list

WatchpointList lldb_private::Target::m_watchpoint_list
protected

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