LLDB  mainline
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected 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  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
 
 ~Target () override
 
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)
 
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, bool prefer_file_cache, void *dst, size_t dst_len, Status &error, 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, bool prefer_file_cache, uint32_t byte_size, bool is_signed, Scalar &scalar, Status &error)
 
uint64_t ReadUnsignedIntegerFromMemory (const Address &addr, bool prefer_file_cache, size_t integer_byte_size, uint64_t fail_value, Status &error)
 
bool ReadPointerFromMemory (const Address &addr, bool prefer_file_cache, Status &error, Address &pointer_addr)
 
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 ()
 
TypeSystemGetScratchTypeSystemForLanguage (Status *error, lldb::LanguageType language, 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)
 
UtilityFunctionGetUtilityFunctionForLanguage (const char *expr, lldb::LanguageType language, const char *name, Status &error)
 
ClangASTContextGetScratchClangASTContext (bool create_on_demand=true)
 
lldb::ClangASTImporterSP GetClangASTImporter ()
 
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 ()
 
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)
 
unsigned GetNextPersistentVariableIndex ()
 Return the next available number for numbered persistent variables. More...
 
lldb::addr_t GetPersistentSymbol (ConstString name)
 
StopHookSP CreateStopHook ()
 
void 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 ()
 
ClangModulesDeclVendorGetClangModulesDeclVendor ()
 
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)
 
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 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
 
void SetEnvironment (Environment env)
 
bool GetSkipPrologue () const
 
PathMappingListGetSourcePathMap () const
 
FileSpecList GetExecutableSearchPaths ()
 
void AppendExecutableSearchPaths (const FileSpec &)
 
FileSpecList GetDebugFileSearchPaths ()
 
FileSpecList GetClangModuleSearchPaths ()
 
bool GetEnableAutoImportClangModules () const
 
bool GetEnableImportStdModule () const
 
bool GetEnableAutoApplyFixIts () const
 
bool GetEnableNotifyAboutFixIts () const
 
bool GetEnableSaveObjects () const
 
bool GetEnableSyntheticValue () 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 ()
 
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 ()
 
void SetProcessLaunchInfo (const ProcessLaunchInfo &launch_info)
 
bool GetInjectLocalVariables (ExecutionContext *exe_ctx) const
 
void SetInjectLocalVariables (ExecutionContext *exe_ctx, bool b)
 
bool GetUseModernTypeLookup () const
 
void SetRequireHardwareBreakpoints (bool b)
 
bool GetRequireHardwareBreakpoints () const
 
- Public Member Functions inherited from lldb_private::Properties
 Properties ()
 
 Properties (const lldb::OptionValuePropertiesSP &collection_sp)
 
virtual ~Properties ()
 
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 ()
 
- 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 FileSpecList GetDefaultClangModuleSearchPaths ()
 
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...
 
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::ClangASTImporterSP m_ast_importer_sp
 
lldb::ClangModulesDeclVendorUP m_clang_modules_decl_vendor_up
 
lldb::SourceManagerUP m_source_manager_up
 
StopHookCollection m_stop_hooks
 
lldb::user_id_t m_stop_hook_next_id
 
bool m_valid
 
bool m_suppress_stop_hooks
 
bool m_is_dummy_target
 
unsigned m_next_persistent_variable_index = 0
 
- Protected Attributes inherited from lldb_private::Properties
lldb::OptionValuePropertiesSP m_collection_sp
 

Friends

class TargetList
 

Detailed Description

Definition at line 423 of file Target.h.

Member Typedef Documentation

◆ BreakpointNameList

Definition at line 1280 of file Target.h.

◆ REPLMap

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

Definition at line 1294 of file Target.h.

◆ StopHookCollection

Definition at line 1302 of file Target.h.

◆ StopHookSP

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

Definition at line 1172 of file Target.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Broadcaster event bits definitions.

Enumerator
eBroadcastBitBreakpointChanged 
eBroadcastBitModulesLoaded 
eBroadcastBitModulesUnloaded 
eBroadcastBitWatchpointChanged 
eBroadcastBitSymbolsLoaded 

Definition at line 432 of file Target.h.

Constructor & Destructor Documentation

◆ ~Target()

Target::~Target ( )
override

Member Function Documentation

◆ AddBreakpointName()

void Target::AddBreakpointName ( BreakpointName bp_name)

Definition at line 697 of file Target.cpp.

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

Referenced by ~Target().

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

Definition at line 2997 of file Target.cpp.

References lldb_private::ProcessLaunchInfo::AppendOpenFileAction(), lldb_private::ProcessLaunchInfo::AppendSuppressFileAction(), CreateProcess(), lldb::eStateAttaching, lldb::eStateConnected, lldb::eStateInvalid, lldb::eStateStopped, lldb_private::ProcessAttachInfo::GetAsync(), GetDebugger(), lldb_private::ProcessInfo::GetExecutableFile(), GetExecutableModule(), lldb_private::ProcessLaunchInfo::GetFileActionForFD(), lldb_private::FileSpec::GetFilename(), lldb_private::ProcessLaunchInfo::GetFlags(), lldb_private::ProcessAttachInfo::GetHijackListener(), lldb_private::ProcessAttachInfo::GetListenerForProcess(), lldb_private::GetLogIfAllCategoriesSet(), GetPlatform(), lldb_private::Debugger::GetPlatformList(), lldb_private::ProcessAttachInfo::GetProcessPluginName(), GetProcessSP(), lldb_private::PlatformList::GetSelectedPlatform(), lldb_private::TargetProperties::GetStandardErrorPath(), lldb_private::TargetProperties::GetStandardInputPath(), lldb_private::TargetProperties::GetStandardOutputPath(), LIBLLDB_LOG_PROCESS, LLDB_LOG, LLDB_LOG_ERROR, m_platform_sp, lldb_private::Listener::MakeListener(), lldb_private::None, lldb_private::ProcessAttachInfo::ProcessInfoSpecified(), lldb_private::Status::SetErrorString(), lldb_private::Status::SetErrorStringWithFormat(), lldb_private::ProcessAttachInfo::SetHijackListener(), SetPlatform(), lldb_private::ProcessLaunchInfo::SetUpPtyRedirection(), lldb_private::Status, lldb_private::Target::StopHook::StopHook(), lldb_private::Status::Success(), and lldb_private::Flags::Test().

Referenced by CommandObjectProcessAttach::DoExecute().

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

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

Referenced by EvaluateExpression(), and lldb_private::ArchitectureMips::GetBreakableLoadAddress().

◆ CalculateProcess()

ProcessSP Target::CalculateProcess ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2147 of file Target.cpp.

References m_process_sp.

Referenced by CommandObjectTargetModulesLoad::DoExecute().

◆ CalculateStackFrame()

StackFrameSP Target::CalculateStackFrame ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

Definition at line 2151 of file Target.cpp.

◆ CalculateTarget()

TargetSP Target::CalculateTarget ( )
overridevirtual

◆ CalculateThread()

ThreadSP Target::CalculateThread ( )
overridevirtual

Implements lldb_private::ExecutionContextScope.

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

◆ CreateBreakpoint() [1/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 325 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 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(), GetStopReasonDescription(), GetSymbolDeclarationFromAddress(), lldb_private::MainThreadCheckerRuntime::GetTypeStatic(), lldb_private::RenderScriptRuntime::LoadRuntimeHooks(), JITLoaderGDB::ModulesDidLoad(), DynamicLoaderPOSIXDYLD::ProbeEntry(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), DynamicLoaderMacOS::SetNotificationBreakpoint(), DynamicLoaderMacOSXDYLD::SetNotificationBreakpoint(), DynamicLoaderDarwinKernel::SetNotificationBreakpointIfNeeded(), DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), ProcessFreeBSD::SetSoftwareSingleStepBreakpoint(), PlatformDarwin::SetThreadCreationBreakpoint(), SourceFileWindowDelegate::WindowDelegateHandleChar(), lldb_private::AppleObjCTrampolineHandler::~AppleObjCTrampolineHandler(), and lldb_private::StructuredDataDarwinLog::~StructuredDataDarwinLog().

◆ CreateBreakpoint() [2/7]

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

◆ CreateBreakpoint() [3/7]

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

Definition at line 396 of file Target.cpp.

References CreateBreakpoint().

◆ CreateBreakpoint() [4/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() [5/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() [6/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() [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 1093 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 
)

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

Definition at line 2505 of file Target.cpp.

References m_stop_hook_next_id, and m_stop_hooks.

Referenced by CommandObjectTargetStopHookAdd::DoExecute().

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

Referenced by lldb_private::formatters::CXXFunctionPointerSummaryProvider(), and lldb_private::BreakpointLocation::GetDescription().

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

◆ FindBreakpointName()

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

◆ GetAPIMutex()

std::recursive_mutex& lldb_private::Target::GetAPIMutex ( )
inline

◆ GetArchitecture()

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

Definition at line 941 of file Target.h.

Referenced by CommandObjectTargetSymbolsAdd::AddModuleSymbols(), lldb_private::Process::AdvanceAddressToNextBranchInstruction(), lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::Platform::ConnectProcess(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), JITLoaderGDB::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), DynamicLoaderStatic::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), DynamicLoaderDarwinKernel::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), SystemRuntimeMacOSX::CreateInstance(), DynamicLoaderMacOSXDYLD::CreateInstance(), lldb_private::ClangASTContext::CreateInstance(), OperatingSystemPython::CreateRegisterContextForThread(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::StackFrame::Disassemble(), ProcessFreeBSD::DoAttachToProcessWithID(), ProcessKDP::DoConnectRemote(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessFreeBSD::DoDidExec(), lldb_private::CommandObjectDisassemble::DoExecute(), CommandObjectMemoryRead::DoExecute(), CommandObjectProcessAttach::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectWatchpointSetExpression::DoExecute(), CommandObjectMemoryWrite::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesAdd::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), CommandObjectTargetSymbolsAdd::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), ProcessElfCore::DoLoadCore(), lldb_private::AddressRange::Dump(), lldb_private::Address::Dump(), lldb_private::StackFrame::Dump(), DumpAddress(), CommandObjectSourceInfo::DumpLinesInFunctions(), DumpTargetInfo(), lldb_private::Type::DumpValueInMemory(), lldb::SBInstruction::EmulateWithFrame(), OptionGroupReadMemory::FinalizeSettings(), FindModulesByName(), lldb_private::FormatEntity::Format(), lldb_private::IRExecutionUnit::FreeNow(), lldb_private::Process::GetAddressByteSize(), ProcessElfCore::GetArchitecture(), lldb_private::Process::GetByteOrder(), lldb_private::FuncUnwinders::GetDebugFrameAugmentedUnwindPlan(), lldb_private::StopInfoMachException::GetDescription(), OperatingSystemPython::GetDynamicRegisterInfo(), lldb_private::FuncUnwinders::GetEHFrameAugmentedUnwindPlan(), DynamicLoaderPOSIXDYLD::GetEntryPoint(), lldb_private::FuncUnwinders::GetFunctionStartAddress(), lldb_private::InstructionList::GetIndexOfNextBranchInstruction(), lldb_private::AppleObjCRuntime::GetObjCVersion(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), PlatformDarwin::GetSoftwareBreakpointTrapOpcode(), lldb_private::platform_freebsd::PlatformFreeBSD::GetSoftwareBreakpointTrapOpcode(), ProcessFreeBSD::GetSoftwareBreakpointTrapOpcode(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::StackFrame::GetStatus(), lldb_private::DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::Value::GetValueAsData(), lldb_private::InferiorCallMmap(), isLoadBiasIncorrect(), 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(), DYLDRendezvous::ReadSOEntryFromMemory(), ObjectFileMachO::SaveCore(), DynamicLoaderDarwinKernel::SearchForKernelNearPC(), DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), DYLDRendezvous::SOEntryIsMainExecutable(), ProcessFreeBSD::SupportHardwareSingleStepping(), updateSectionLoadAddress(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::DynamicLoaderDarwin::UseDYLDSPI(), and lldb_private::StructuredDataDarwinLog::~StructuredDataDarwinLog().

◆ GetArchitecturePlugin()

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

◆ GetBreakableLoadAddress()

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

Definition at line 2476 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 290 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 762 of file Target.cpp.

References m_breakpoint_names, and m_process_sp.

Referenced by CommandObjectBreakpointNameList::DoExecute().

◆ GetBroadcasterClass()

ConstString& lldb_private::Target::GetBroadcasterClass ( ) const
inlineoverridevirtual

Reimplemented from lldb_private::Broadcaster.

Definition at line 444 of file Target.h.

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

References GetArchitecturePlugin().

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

◆ GetClangASTImporter()

ClangASTImporterSP Target::GetClangASTImporter ( )

Definition at line 2308 of file Target.cpp.

References m_ast_importer_sp, and m_valid.

Referenced by lldb_private::ASTResultSynthesizer::CommitPersistentDecls().

◆ GetClangModulesDeclVendor()

ClangModulesDeclVendor * Target::GetClangModulesDeclVendor ( )

◆ GetCollectingStats()

bool lldb_private::Target::GetCollectingStats ( )
inline

◆ GetDebugger()

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

Definition at line 974 of file Target.h.

References ReadCStringFromMemory().

Referenced by Attach(), lldb_private::ScriptInterpreterPythonImpl::BreakpointCallbackFunction(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::ClangUserExpression::Complete(), lldb_private::BreakpointResolverScripted::CreateFromStructuredData(), lldb_private::BreakpointOptions::CreateFromStructuredData(), CreateProcess(), CreateScriptedBreakpoint(), lldb_private::StackFrame::Disassemble(), ProcessKDP::DoConnectRemote(), lldb_private::CommandObjectExpression::DoExecute(), lldb_private::InstructionList::Dump(), lldb_private::StackFrame::DumpUsingSettingsFormat(), lldb_private::Thread::DumpUsingSettingsFormat(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb::SBThread::GetInfoItemByPathAsString(), lldb_private::REPL::GetIOHandler(), lldb_private::minidump::ProcessMinidump::GetPluginCommandObject(), ProcessKDP::GetPluginCommandObject(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetPluginCommandObject(), lldb_private::StackFrame::GetStatus(), lldb_private::Thread::GetStatus(), lldb_private::StructuredDataDarwinLog::HandleArrivalOfStructuredData(), lldb_private::Process::HandlePrivateEvent(), lldb_private::REPL::IOHandlerComplete(), lldb_private::REPL::IOHandlerInputComplete(), Launch(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), LoadScriptingResourceForModule(), lldb_private::Module::LoadScriptingResourceInTarget(), PlatformDarwin::LocateExecutableScriptingResources(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), DynamicLoaderDarwinKernel::ParseKextSummaries(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), lldb_private::Process::PopProcessIOHandler(), lldb_private::ClangExpressionParser::PrepareForExecution(), lldb_private::Disassembler::PrintInstructions(), lldb_private::Process::PrintWarning(), lldb_private::Process::ProcessIOHandlerIsActive(), lldb_private::Process::PushProcessIOHandler(), DynamicLoaderDarwinKernel::ReadKextSummaryHeader(), lldb_private::REPL::REPL(), RetrieveString(), lldb_private::REPL::RunLoop(), RunScriptFormatKeyword(), RunStopHooks(), lldb_private::BreakpointResolverScripted::SerializeToStructuredData(), lldb_private::ScriptInterpreterPythonImpl::WatchpointCallbackFunction(), CommandObjectWatchpointCommandAdd::WatchpointOptionsCallbackFunction(), and lldb_private::StructuredDataDarwinLog::~StructuredDataDarwinLog().

◆ GetDefaultArchitecture()

ArchSpec Target::GetDefaultArchitecture ( )
static

Definition at line 2343 of file Target.cpp.

References GetGlobalProperties().

Referenced by lldb_private::Platform::ConnectProcess().

◆ GetDefaultClangModuleSearchPaths()

FileSpecList Target::GetDefaultClangModuleSearchPaths ( )
static

Definition at line 2336 of file Target.cpp.

References GetGlobalProperties().

◆ GetDefaultDebugFileSearchPaths()

FileSpecList Target::GetDefaultDebugFileSearchPaths ( )
static

Definition at line 2329 of file Target.cpp.

References GetGlobalProperties().

◆ GetDefaultExecutableSearchPaths()

FileSpecList Target::GetDefaultExecutableSearchPaths ( )
static

Definition at line 2322 of file Target.cpp.

References GetGlobalProperties().

◆ 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 1380 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(), findSymbolAddress(), DynamicLoaderHexagonDYLD::GetEntryPoint(), GetExecutableModulePointer(), lldb_private::ProcessWindows::GetImageInfoAddress(), ProcessElfCore::GetImageInfoAddress(), ProcessFreeBSD::GetImageInfoAddress(), lldb_private::minidump::ProcessMinidump::GetProcessInfo(), ProcessElfCore::GetProcessInfo(), PlatformMacOSX::GetSDKDirectory(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), ImageSearchPathsChanged(), Install(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), lldb_private::ProcessWindows::OnDebuggerConnected(), ProcessFreeBSD::ProcessFreeBSD(), DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule(), ResolveRendezvousAddress(), and SetArchitecture().

◆ GetExecutableModulePointer()

Module * Target::GetExecutableModulePointer ( )

◆ 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]

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

Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), lldb_private::AppleObjCRuntime::AppleObjCRuntime(), DynamicLoaderMacOS::CanLoadImage(), lldb_private::Process::CompleteAttach(), lldb_private::ItaniumABILanguageRuntime::CouldHaveDynamicValue(), lldb_private::MemoryHistoryASan::CreateInstance(), JITLoaderGDB::DidAttach(), DynamicLoaderStatic::DidLaunch(), JITLoaderGDB::DidLaunch(), lldb_private::Disassembler::Disassemble(), lldb_private::CommandObjectDisassemble::DoExecute(), 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(), CommandObjectTargetSymbolsAdd::DoExecute(), lldb_private::Address::Dump(), CommandObjectSourceInfo::DumpLinesForAddress(), CommandObjectSourceInfo::DumpLinesForFile(), CommandObjectSourceInfo::DumpLinesInFunctions(), lldb_private::SourceManager::File::File(), lldb_private::Language::ImageListTypeScavenger::Find_Impl(), lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), CommandObjectSourceList::FindMatchingFunctions(), CommandObjectSourceList::FindMatchingFunctionSymbols(), HexagonDYLDRendezvous::FindMetadata(), DYLDRendezvous::FindMetadata(), FindModulesByName(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::AppleObjCRuntimeV2::GetByteOffsetForIvar(), SystemRuntimeMacOSX::GetExtendedBacktraceForQueueItem(), lldb_private::AppleObjCRuntime::GetFoundationVersion(), lldb_private::platform_android::PlatformAndroid::GetLibdlFunctionDeclarations(), lldb_private::AppleObjCRuntime::GetObjCModule(), lldb_private::AppleObjCRuntime::GetObjCVersion(), lldb_private::AppleObjCRuntime::GetPrintForDebuggerAddr(), lldb_private::DynamicLoaderDarwin::GetPThreadLibraryModule(), SystemRuntimeMacOSX::GetQueueIDFromThreadQAddress(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), CommandObjectTargetVariable::GetVariableCallback(), CommandObjectWatchpointSetVariable::GetVariableCallback(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), lldb_private::RenderScriptRuntime::Initiate(), lldb_private::ClangUtilityFunction::Install(), Install(), lldb_private::Thread::JumpToLine(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::DynamicLoader::LoadModuleAtAddress(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), DynamicLoaderPOSIXDYLD::LoadVDSO(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), ModuleIsExcludedForUnconstrainedSearches(), lldb_private::ClangUserExpression::Parse(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(), 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(), updateSectionLoadAddress(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), lldb_private::FunctionCaller::WriteFunctionWrapper(), lldb_private::AppleObjCTrampolineHandler::~AppleObjCTrampolineHandler(), and lldb_private::LLVMUserExpression::~LLVMUserExpression().

◆ GetImages() [2/2]

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

Definition at line 901 of file Target.h.

◆ GetImageSearchPathList()

PathMappingList & Target::GetImageSearchPathList ( )

◆ GetLastCreatedBreakpoint()

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

◆ GetLastCreatedWatchpoint()

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

◆ GetNextPersistentVariableIndex()

unsigned lldb_private::Target::GetNextPersistentVariableIndex ( )
inline

Return the next available number for numbered persistent variables.

Definition at line 1115 of file Target.h.

Referenced by lldb_private::PersistentExpressionState::GetNextPersistentVariableName().

◆ GetNumStopHooks()

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

Definition at line 1200 of file Target.h.

Referenced by CommandObjectTargetStopHookList::DoExecute().

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

References lldb_private::ModuleList::Append(), lldb_private::UUID::Clear(), 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::FileSpec::GetDirectory(), lldb_private::TargetProperties::GetExecutableSearchPaths(), lldb_private::FileSpec::GetFilename(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::ModuleList::GetIndexForModule(), lldb_private::ModuleList::GetModuleAtIndex(), 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(), LLDB_INVALID_INDEX32, m_image_search_paths, m_images, m_platform_sp, m_process_sp, lldb_private::PathMappingList::RemapPath(), 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(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), lldb_private::DynamicLoader::LoadModuleAtAddress(), lldb_private::ProcessWindows::OnDebuggerConnected(), lldb_private::DynamicLoaderWindowsDYLD::OnLoadModule(), 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 
)

◆ GetScratchClangASTContext()

ClangASTContext * Target::GetScratchClangASTContext ( bool  create_on_demand = true)

◆ GetScratchTypeSystemForLanguage()

TypeSystem * Target::GetScratchTypeSystemForLanguage ( Status error,
lldb::LanguageType  language,
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

◆ GetSourceManager()

SourceManager & Target::GetSourceManager ( )

◆ GetStaticBroadcasterClass()

ConstString & Target::GetStaticBroadcasterClass ( )
static

◆ GetStatistics()

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

Definition at line 1331 of file Target.h.

Referenced by CommandObjectStatsDump::DoExecute().

◆ GetStopHookAtIndex()

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

Definition at line 1202 of file Target.h.

Referenced by CommandObjectTargetStopHookList::DoExecute().

◆ GetStopHookByID()

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

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

◆ GetTargetFromContexts()

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

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

◆ GetUtilityFunctionForLanguage()

UtilityFunction * Target::GetUtilityFunctionForLanguage ( const char *  expr,
lldb::LanguageType  language,
const char *  name,
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)

◆ IsValid()

bool lldb_private::Target::IsValid ( )
inline

Definition at line 565 of file Target.h.

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

◆ Launch()

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

◆ LoadScriptingResources()

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

Definition at line 875 of file Target.h.

◆ 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_spA shared pointer reference to the module that checked.
Returns
true if the module should be excluded, false otherwise.

Definition at line 1697 of file Target.cpp.

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

◆ 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 1719 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 1646 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 1612 of file Target.cpp.

◆ ReadCStringFromMemory() [1/2]

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

◆ ReadCStringFromMemory() [2/2]

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

◆ ReadMemory()

size_t Target::ReadMemory ( const Address addr,
bool  prefer_file_cache,
void *  dst,
size_t  dst_len,
Status error,
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,
bool  prefer_file_cache,
Status error,
Address pointer_addr 
)

◆ ReadScalarIntegerFromMemory()

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

◆ ReadUnsignedIntegerFromMemory()

uint64_t Target::ReadUnsignedIntegerFromMemory ( const Address addr,
bool  prefer_file_cache,
size_t  integer_byte_size,
uint64_t  fail_value,
Status error 
)

◆ RemoveAllBreakpoints()

void Target::RemoveAllBreakpoints ( bool  internal_also = false)

◆ RemoveAllowedBreakpoints()

void Target::RemoveAllowedBreakpoints ( )

◆ RemoveAllStopHooks()

void Target::RemoveAllStopHooks ( )

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

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

void 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 2540 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 archicture 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, otherwise.

Definition at line 1498 of file Target.cpp.

References ClearModules(), lldb_private::eLoadDependentsYes, lldb_private::Status::Fail(), 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, m_arch, lldb_private::ArchSpec::MergeFrom(), lldb_private::ArchSpec::PiecewiseTripleCompare(), lldb_private::Log::Printf(), SetExecutableModule(), and SetPlatform().

Referenced by DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), ProcessFreeBSD::DoAttachToProcessWithID(), ProcessKDP::DoConnectRemote(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessMachCore::DoLoadCore(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), ProcessElfCore::DoLoadCore(), 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 1431 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, m_arch, m_images, m_platform_sp, and ModulesDidLoad().

Referenced by lldb_private::Process::CompleteAttach(), ProcessFreeBSD::DoAttachToProcessWithID(), ProcessKDP::DoConnectRemote(), ProcessFreeBSD::DoDidExec(), 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 257 of file Target.cpp.

References lldbassert, and m_repl_map.

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

References m_stop_hooks.

Referenced by CommandObjectTargetStopHookEnableDisable::DoExecute().

◆ SetSuppresStopHooks()

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

Definition at line 1182 of file Target.h.

◆ SettingsInitialize()

void Target::SettingsInitialize ( )
static

◆ SettingsTerminate()

void Target::SettingsTerminate ( )
static

◆ SymbolsDidLoad()

void Target::SymbolsDidLoad ( ModuleList module_list)

◆ 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

◆ TargetList

friend class TargetList
friend

Definition at line 429 of file Target.h.

Member Data Documentation

◆ m_arch

Arch lldb_private::Target::m_arch
protected

◆ m_ast_importer_sp

lldb::ClangASTImporterSP lldb_private::Target::m_ast_importer_sp
protected

Definition at line 1297 of file Target.h.

Referenced by ClearModules(), GetClangASTImporter(), and GetStaticBroadcasterClass().

◆ m_breakpoint_list

BreakpointList lldb_private::Target::m_breakpoint_list
protected

◆ m_breakpoint_names

BreakpointNameList lldb_private::Target::m_breakpoint_names
protected

◆ m_clang_modules_decl_vendor_up

lldb::ClangModulesDeclVendorUP lldb_private::Target::m_clang_modules_decl_vendor_up
protected

Definition at line 1298 of file Target.h.

Referenced by GetClangModulesDeclVendor().

◆ m_debugger

Debugger& lldb_private::Target::m_debugger
protected

Definition at line 1270 of file Target.h.

Referenced by GetStaticBroadcasterClass(), and RunStopHooks().

◆ m_image_search_paths

PathMappingList lldb_private::Target::m_image_search_paths
protected

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

Referenced by ClearModules(), Dump(), GetExecutableModule(), GetOrCreateModule(), GetStaticBroadcasterClass(), 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

Definition at line 1307 of file Target.h.

Referenced by GetStaticBroadcasterClass().

◆ 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

Definition at line 1285 of file Target.h.

Referenced by CreateWatchpoint(), Destroy(), RemoveAllWatchpoints(), and RemoveWatchpointByID().

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

Referenced by Destroy(), and GetStaticBroadcasterClass().

◆ m_next_persistent_variable_index

unsigned lldb_private::Target::m_next_persistent_variable_index = 0
protected

Definition at line 1308 of file Target.h.

◆ m_platform_sp

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

◆ 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 1295 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

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

Referenced by GetSourceManager(), and GetStaticBroadcasterClass().

◆ m_stop_hook_next_id

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

Definition at line 1304 of file Target.h.

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

◆ m_stop_hooks

StopHookCollection lldb_private::Target::m_stop_hooks
protected

◆ m_suppress_stop_hooks

bool lldb_private::Target::m_suppress_stop_hooks
protected

Definition at line 1306 of file Target.h.

Referenced by Destroy(), EvaluateExpression(), GetStaticBroadcasterClass(), and RunStopHooks().

◆ m_valid

bool lldb_private::Target::m_valid
protected

◆ m_watchpoint_list

WatchpointList lldb_private::Target::m_watchpoint_list
protected

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