|
LLDB mainline
|
#include <Target.h>
Classes | |
| class | Arch |
| struct | DummySignalValues |
| Add a signal for the target. More... | |
| class | StopHook |
| class | StopHookCoded |
| class | StopHookCommandLine |
| class | StopHookScripted |
| class | TargetEventData |
Public Types | |
| enum | { eBroadcastBitBreakpointChanged = (1 << 0) , eBroadcastBitModulesLoaded = (1 << 1) , eBroadcastBitModulesUnloaded = (1 << 2) , eBroadcastBitWatchpointChanged = (1 << 3) , eBroadcastBitSymbolsLoaded = (1 << 4) , eBroadcastBitSymbolsChanged = (1 << 5) , eBroadcastBitNewTargetCreated = (1 << 6) } |
| Broadcaster event bits definitions. More... | |
| typedef std::shared_ptr< StopHook > | StopHookSP |
Public Member Functions | |
| llvm::StringRef | GetBroadcasterClass () const override |
| This needs to be filled in if you are going to register the broadcaster with the broadcaster manager and do broadcaster class matching. | |
| ~Target () override | |
| bool | IsDummyTarget () const |
| lldb::user_id_t | GetGloballyUniqueID () const |
| Get the globally unique ID for this target. | |
| const std::string & | GetLabel () const |
| llvm::Error | SetLabel (llvm::StringRef label) |
| Set a label for a target. | |
| llvm::StringRef | GetTargetSessionName () |
| Get the target session name for this target. | |
| void | SetTargetSessionName (llvm::StringRef target_session_name) |
| Set the target session name for this target. | |
| lldb::ModuleSP | GetOrCreateModule (const ModuleSpec &module_spec, bool notify, Status *error_ptr=nullptr) |
| Find a binary on the system and return its Module, or return an existing Module that is already in the Target. | |
| std::recursive_mutex & | GetAPIMutex () |
| void | DeleteCurrentProcess () |
| void | CleanupProcess () |
| void | Dump (Stream *s, lldb::DescriptionLevel description_level) |
| Dump a description of this object to a Stream. | |
| const lldb::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) |
| llvm::Expected< uint32_t > | AddScriptedFrameProviderDescriptor (const ScriptedFrameProviderDescriptor &descriptor) |
| Add or update a scripted frame provider descriptor for this target. | |
| bool | RemoveScriptedFrameProviderDescriptor (uint32_t id) |
| Remove a scripted frame provider descriptor by id. | |
| void | ClearScriptedFrameProviderDescriptors () |
| Clear all scripted frame provider descriptors for this target. | |
| const llvm::DenseMap< uint32_t, ScriptedFrameProviderDescriptor > & | GetScriptedFrameProviderDescriptors () const |
| Get all scripted frame provider descriptors for this target. | |
| BreakpointList & | GetBreakpointList (bool internal=false) |
| const BreakpointList & | GetBreakpointList (bool internal=false) const |
| lldb::BreakpointSP | GetLastCreatedBreakpoint () |
| lldb::BreakpointSP | GetBreakpointByID (lldb::break_id_t break_id) |
| lldb::BreakpointSP | CreateBreakpointAtUserEntry (Status &error) |
| lldb::BreakpointSP | CreateBreakpoint (const FileSpecList *containingModules, const FileSpec &file, uint32_t line_no, uint32_t column, lldb::addr_t offset, LazyBool check_inlines, LazyBool skip_prologue, bool internal, bool request_hardware, LazyBool move_to_nearest_code) |
| lldb::BreakpointSP | CreateSourceRegexBreakpoint (const FileSpecList *containingModules, const FileSpecList *source_file_list, const std::unordered_set< std::string > &function_names, RegularExpression source_regex, bool internal, bool request_hardware, LazyBool move_to_nearest_code) |
| lldb::BreakpointSP | CreateBreakpoint (lldb::addr_t load_addr, bool internal, bool request_hardware) |
| lldb::BreakpointSP | CreateAddressInModuleBreakpoint (lldb::addr_t file_addr, bool internal, const FileSpec &file_spec, bool request_hardware) |
| lldb::BreakpointSP | CreateBreakpoint (const Address &addr, bool internal, bool request_hardware) |
| lldb::BreakpointSP | CreateFuncRegexBreakpoint (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, RegularExpression func_regexp, lldb::LanguageType requested_language, LazyBool skip_prologue, bool internal, bool request_hardware) |
| lldb::BreakpointSP | CreateBreakpoint (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_name, lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language, lldb::addr_t offset, bool offset_is_insn_count, LazyBool skip_prologue, bool internal, bool request_hardware) |
| lldb::BreakpointSP | CreateExceptionBreakpoint (enum lldb::LanguageType language, bool catch_bp, bool throw_bp, bool internal, Args *additional_args=nullptr, Status *additional_args_error=nullptr) |
| lldb::BreakpointSP | CreateScriptedBreakpoint (const llvm::StringRef class_name, const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, bool internal, bool request_hardware, StructuredData::ObjectSP extra_args_sp, Status *creation_error=nullptr) |
| lldb::BreakpointSP | CreateBreakpoint (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const char *func_names[], size_t num_names, lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language, lldb::addr_t offset, LazyBool skip_prologue, bool internal, bool request_hardware) |
| lldb::BreakpointSP | CreateBreakpoint (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles, const std::vector< std::string > &func_names, lldb::FunctionNameType func_name_type_mask, lldb::LanguageType language, lldb::addr_t m_offset, LazyBool skip_prologue, bool internal, bool request_hardware) |
| lldb::BreakpointSP | CreateBreakpoint (lldb::SearchFilterSP &filter_sp, lldb::BreakpointResolverSP &resolver_sp, bool internal, bool request_hardware, bool resolve_indirect_symbols) |
| lldb::WatchpointSP | CreateWatchpoint (lldb::addr_t addr, size_t size, const CompilerType *type, uint32_t kind, Status &error) |
| lldb::WatchpointSP | GetLastCreatedWatchpoint () |
| WatchpointList & | GetWatchpointList () |
| void | AddNameToBreakpoint (BreakpointID &id, llvm::StringRef name, Status &error) |
| void | AddNameToBreakpoint (lldb::BreakpointSP &bp_sp, llvm::StringRef name, Status &error) |
| void | RemoveNameFromBreakpoint (lldb::BreakpointSP &bp_sp, ConstString name) |
| BreakpointName * | FindBreakpointName (ConstString name, bool can_create, Status &error) |
| void | DeleteBreakpointName (ConstString name) |
| void | ConfigureBreakpointName (BreakpointName &bp_name, const BreakpointOptions &options, const BreakpointName::Permissions &permissions) |
| void | ApplyNameToBreakpoints (BreakpointName &bp_name) |
| void | AddBreakpointName (std::unique_ptr< BreakpointName > bp_name) |
| void | GetBreakpointNames (std::vector< std::string > &names) |
| void | RemoveAllBreakpoints (bool internal_also=false) |
| void | RemoveAllowedBreakpoints () |
| void | DisableAllBreakpoints (bool internal_also=false) |
| void | DisableAllowedBreakpoints () |
| void | EnableAllBreakpoints (bool internal_also=false) |
| void | EnableAllowedBreakpoints () |
| bool | DisableBreakpointByID (lldb::break_id_t break_id) |
| bool | EnableBreakpointByID (lldb::break_id_t break_id) |
| bool | RemoveBreakpointByID (lldb::break_id_t break_id) |
| void | ResetBreakpointHitCounts () |
| Resets the hit count of all breakpoints. | |
| bool | RemoveAllWatchpoints (bool end_to_end=true) |
| bool | DisableAllWatchpoints (bool end_to_end=true) |
| bool | EnableAllWatchpoints (bool end_to_end=true) |
| bool | ClearAllWatchpointHitCounts () |
| bool | ClearAllWatchpointHistoricValues () |
| bool | IgnoreAllWatchpoints (uint32_t ignore_count) |
| bool | DisableWatchpointByID (lldb::watch_id_t watch_id) |
| bool | EnableWatchpointByID (lldb::watch_id_t watch_id) |
| bool | RemoveWatchpointByID (lldb::watch_id_t watch_id) |
| bool | IgnoreWatchpointByID (lldb::watch_id_t watch_id, uint32_t ignore_count) |
| Status | SerializeBreakpointsToFile (const FileSpec &file, const BreakpointIDList &bp_ids, bool append) |
| Status | CreateBreakpointsFromFile (const FileSpec &file, BreakpointIDList &new_bps) |
| Status | CreateBreakpointsFromFile (const FileSpec &file, std::vector< std::string > &names, BreakpointIDList &new_bps) |
| lldb::addr_t | GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class=AddressClass::eInvalid) const |
| Get load_addr as a callable code load address for this target. | |
| lldb::addr_t | GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class=AddressClass::eInvalid) const |
| Get load_addr as an opcode for this target. | |
| lldb::addr_t | GetBreakableLoadAddress (lldb::addr_t addr) |
| void | ModulesDidLoad (ModuleList &module_list) |
| This call may preload module symbols, and may do so in parallel depending on the following target settings: | |
| void | ModulesDidUnload (ModuleList &module_list, bool delete_locations) |
| void | SymbolsDidLoad (ModuleList &module_list) |
| void | ClearModules (bool delete_locations) |
| void | DidExec () |
| Called as the last function in Process::DidExec(). | |
| lldb::ModuleSP | GetExecutableModule () |
| Gets the module for the main executable. | |
| Module * | GetExecutableModulePointer () |
| void | SetExecutableModule (lldb::ModuleSP &module_sp, LoadDependentFiles load_dependent_files=eLoadDependentsDefault) |
| Set the main executable module. | |
| bool | LoadScriptingResources (std::list< Status > &errors, Stream &feedback_stream, bool continue_on_error=true) |
| const ModuleList & | GetImages () const |
| Get accessor for the images for this process. | |
| ModuleList & | GetImages () |
| bool | ModuleIsExcludedForUnconstrainedSearches (const FileSpec &module_spec) |
| Return whether this FileSpec corresponds to a module that should be considered for general searches. | |
| bool | ModuleIsExcludedForUnconstrainedSearches (const lldb::ModuleSP &module_sp) |
| Return whether this module should be considered for general searches. | |
| const ArchSpec & | GetArchitecture () const |
| llvm::StringRef | GetABIName () const |
| Returns the name of the target's ABI plugin. | |
| bool | SetArchitecture (const ArchSpec &arch_spec, bool set_platform=false, bool merge=true) |
| Set the architecture for this target. | |
| bool | MergeArchitecture (const ArchSpec &arch_spec) |
| Architecture * | GetArchitecturePlugin () const |
| Debugger & | GetDebugger () const |
| size_t | ReadMemoryFromFileCache (const Address &addr, void *dst, size_t dst_len, Status &error) |
| virtual size_t | ReadMemory (const Address &addr, void *dst, size_t dst_len, Status &error, bool force_live_memory=false, lldb::addr_t *load_addr_ptr=nullptr, bool *did_read_live_memory=nullptr) |
| size_t | ReadCStringFromMemory (const Address &addr, std::string &out_str, Status &error, bool force_live_memory=false) |
| size_t | ReadCStringFromMemory (const Address &addr, char *dst, size_t dst_max_len, Status &result_error, bool force_live_memory=false) |
| size_t | ReadStringFromMemory (const Address &addr, char *dst, size_t max_bytes, Status &error, size_t type_width, bool force_live_memory=true) |
| Read a NULL terminated string from memory. | |
| size_t | ReadScalarIntegerFromMemory (const Address &addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Status &error, bool force_live_memory=false) |
| int64_t | ReadSignedIntegerFromMemory (const Address &addr, size_t integer_byte_size, int64_t fail_value, Status &error, bool force_live_memory=false) |
| uint64_t | ReadUnsignedIntegerFromMemory (const Address &addr, size_t integer_byte_size, uint64_t fail_value, Status &error, bool force_live_memory=false) |
| bool | ReadPointerFromMemory (const Address &addr, Status &error, Address &pointer_addr, bool force_live_memory=false) |
| bool | HasLoadedSections () |
| lldb::addr_t | GetSectionLoadAddress (const lldb::SectionSP §ion_sp) |
| void | ClearSectionLoadList () |
| void | DumpSectionLoadList (Stream &s) |
| lldb::TargetSP | CalculateTarget () override |
| lldb::ProcessSP | CalculateProcess () override |
| lldb::ThreadSP | CalculateThread () override |
| lldb::StackFrameSP | CalculateStackFrame () override |
| void | CalculateExecutionContext (ExecutionContext &exe_ctx) override |
| Reconstruct the object's execution context into sc. | |
| PathMappingList & | GetImageSearchPathList () |
| llvm::Expected< lldb::TypeSystemSP > | GetScratchTypeSystemForLanguage (lldb::LanguageType language, bool create_on_demand=true) |
| std::vector< lldb::TypeSystemSP > | GetScratchTypeSystems (bool create_on_demand=true) |
| PersistentExpressionState * | GetPersistentExpressionStateForLanguage (lldb::LanguageType language) |
| UserExpression * | GetUserExpressionForLanguage (llvm::StringRef expr, llvm::StringRef prefix, SourceLanguage language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj, Status &error) |
| FunctionCaller * | GetFunctionCallerForLanguage (lldb::LanguageType language, const CompilerType &return_type, const Address &function_address, const ValueList &arg_value_list, const char *name, Status &error) |
| llvm::Expected< std::unique_ptr< UtilityFunction > > | CreateUtilityFunction (std::string expression, std::string name, lldb::LanguageType language, ExecutionContext &exe_ctx) |
| Creates and installs a UtilityFunction for the given language. | |
| Status | Install (ProcessLaunchInfo *launch_info) |
| bool | ResolveFileAddress (lldb::addr_t load_addr, Address &so_addr) |
| bool | ResolveLoadAddress (lldb::addr_t load_addr, Address &so_addr, uint32_t stop_id=SectionLoadHistory::eStopIDNow, bool allow_section_end=false) |
| bool | SetSectionLoadAddress (const lldb::SectionSP §ion, 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 §ion_sp) |
| bool | SetSectionUnloaded (const lldb::SectionSP §ion_sp, lldb::addr_t load_addr) |
| void | ClearAllLoadedSections () |
| lldb_private::SummaryStatisticsSP | GetSummaryStatisticsSPForProviderName (lldb_private::TypeSummaryImpl &summary_provider) |
| lldb_private::SummaryStatisticsCache & | GetSummaryStatisticsCache () |
| void | SetTrace (const lldb::TraceSP &trace_sp) |
| Set the Trace object containing processor trace information of this target. | |
| lldb::TraceSP | GetTrace () |
| Get the Trace object containing processor trace information of this target. | |
| llvm::Expected< lldb::TraceSP > | CreateTrace () |
| Create a Trace object for the current target using the using the default supported tracing technology for this process. | |
| llvm::Expected< lldb::TraceSP > | GetTraceOrCreate () |
| If a Trace object is present, this returns it, otherwise a new Trace is created with Trace::CreateTrace. | |
| lldb::ExpressionResults | EvaluateExpression (llvm::StringRef expression, ExecutionContextScope *exe_scope, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions &options=EvaluateExpressionOptions(), std::string *fixed_expression=nullptr, ValueObject *ctx_obj=nullptr) |
| lldb::ExpressionVariableSP | GetPersistentVariable (ConstString name) |
| lldb::addr_t | GetPersistentSymbol (ConstString name) |
| llvm::Expected< lldb_private::Address > | GetEntryPointAddress () |
| This method will return the address of the starting function for this binary, e.g. | |
| CompilerType | GetRegisterType (const std::string &name, const lldb_private::RegisterFlags &flags, uint32_t byte_size) |
| void | NotifyBreakpointChanged (Breakpoint &bp, lldb::BreakpointEventType event_kind) |
| Sends a breakpoint notification event. | |
| void | NotifyBreakpointChanged (Breakpoint &bp, const lldb::EventDataSP &breakpoint_data_sp) |
| Sends a breakpoint notification event. | |
| llvm::Expected< lldb::DisassemblerSP > | ReadInstructions (const Address &start_addr, uint32_t count, const char *flavor_string=nullptr) |
| void | RegisterInternalStopHooks () |
| StopHookSP | CreateStopHook (StopHook::StopHookKind kind, bool internal=false) |
| Add an empty stop hook to the Target's stop hook list, and returns a shared pointer to the new hook. | |
| void | UndoCreateStopHook (lldb::user_id_t uid) |
| If you tried to create a stop hook, and that failed, call this to remove the stop hook, as it will also reset the stop hook counter. | |
| bool | RunStopHooks (bool at_initial_stop=false) |
| 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) |
| const std::vector< StopHookSP > | GetStopHooks (bool internal=false) const |
| lldb::PlatformSP | GetPlatform () |
| void | SetPlatform (const lldb::PlatformSP &platform_sp) |
| SourceManager & | GetSourceManager () |
| 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) |
| StackFrameRecognizerManager & | GetFrameRecognizerManager () |
| void | SaveScriptedLaunchInfo (lldb_private::ProcessInfo &process_info) |
| void | AddDummySignal (llvm::StringRef name, LazyBool pass, LazyBool print, LazyBool stop) |
| Add a signal to the Target's list of stored signals/actions. | |
| void | UpdateSignalsFromDummy (lldb::UnixSignalsSP signals_sp, lldb::StreamSP warning_stream_sp) |
| Updates the signals in signals_sp using the stored dummy signals. | |
| void | ClearDummySignals (Args &signal_names) |
| Clear the dummy signals in signal_names from the target, or all signals if signal_names is empty. | |
| void | PrintDummySignals (Stream &strm, Args &signals) |
| Print all the signals set in this target. | |
| llvm::json::Value | ReportStatistics (const lldb_private::StatisticsOptions &options) |
| Get metrics associated with this target in JSON format. | |
| void | ResetStatistics () |
| TargetStats & | GetStatistics () |
| Public Member Functions inherited from lldb_private::TargetProperties | |
| TargetProperties (Target *target) | |
| ~TargetProperties () override | |
| ArchSpec | GetDefaultArchitecture () const |
| void | SetDefaultArchitecture (const ArchSpec &arch) |
| bool | GetMoveToNearestCode () const |
| lldb::DynamicValueType | GetPreferDynamicValue () const |
| bool | SetPreferDynamicValue (lldb::DynamicValueType d) |
| bool | GetPreloadSymbols () const |
| void | SetPreloadSymbols (bool b) |
| bool | GetDisableASLR () const |
| void | SetDisableASLR (bool b) |
| bool | GetInheritTCC () const |
| void | SetInheritTCC (bool b) |
| bool | GetDetachOnError () const |
| void | SetDetachOnError (bool b) |
| bool | GetDisableSTDIO () const |
| void | SetDisableSTDIO (bool b) |
| llvm::StringRef | GetLaunchWorkingDirectory () const |
| bool | GetParallelModuleLoad () const |
| const char * | GetDisassemblyFlavor () const |
| const char * | GetDisassemblyCPU () const |
| const char * | GetDisassemblyFeatures () const |
| InlineStrategy | GetInlineStrategy () const |
| RealpathPrefixes | GetSourceRealpathPrefixes () const |
| llvm::StringRef | GetArg0 () const |
| void | SetArg0 (llvm::StringRef arg) |
| bool | GetRunArguments (Args &args) const |
| void | SetRunArguments (const Args &args) |
| Environment | GetEnvironment () const |
| Environment | GetInheritedEnvironment () const |
| Environment | GetTargetEnvironment () const |
| void | SetEnvironment (Environment env) |
| bool | GetSkipPrologue () const |
| PathMappingList & | GetSourcePathMap () const |
| PathMappingList & | GetObjectPathMap () const |
| bool | GetAutoSourceMapRelative () const |
| FileSpecList | GetExecutableSearchPaths () |
| void | AppendExecutableSearchPaths (const FileSpec &) |
| FileSpecList | GetDebugFileSearchPaths () |
| FileSpecList | GetClangModuleSearchPaths () |
| bool | GetEnableAutoImportClangModules () const |
| ImportStdModule | GetImportStdModule () const |
| DynamicClassInfoHelper | GetDynamicClassInfoHelper () const |
| bool | GetEnableAutoApplyFixIts () const |
| uint64_t | GetNumberOfRetriesWithFixits () const |
| bool | GetEnableNotifyAboutFixIts () const |
| FileSpec | GetSaveJITObjectsDir () const |
| bool | GetEnableSyntheticValue () const |
| bool | ShowHexVariableValuesWithLeadingZeroes () const |
| uint32_t | GetMaxZeroPaddingInFloatFormat () const |
| uint32_t | GetMaximumNumberOfChildrenToDisplay () const |
| std::pair< uint32_t, bool > | GetMaximumDepthOfChildrenToDisplay () const |
| Get the max depth value, augmented with a bool to indicate whether the depth is the default. | |
| uint32_t | GetMaximumSizeOfStringSummary () const |
| uint32_t | GetMaximumMemReadSize () const |
| FileSpec | GetStandardInputPath () const |
| FileSpec | GetStandardErrorPath () const |
| FileSpec | GetStandardOutputPath () const |
| void | SetStandardInputPath (llvm::StringRef path) |
| void | SetStandardOutputPath (llvm::StringRef path) |
| void | SetStandardErrorPath (llvm::StringRef path) |
| void | SetStandardInputPath (const char *path)=delete |
| void | SetStandardOutputPath (const char *path)=delete |
| void | SetStandardErrorPath (const char *path)=delete |
| bool | GetBreakpointsConsultPlatformAvoidList () |
| SourceLanguage | GetLanguage () const |
| llvm::StringRef | GetExpressionPrefixContents () |
| uint64_t | GetExprErrorLimit () const |
| uint64_t | GetExprAllocAddress () const |
| uint64_t | GetExprAllocSize () const |
| uint64_t | GetExprAllocAlign () const |
| bool | GetUseHexImmediates () const |
| bool | GetUseFastStepping () const |
| bool | GetDisplayExpressionsInCrashlogs () const |
| LoadScriptFromSymFile | GetLoadScriptFromSymbolFile () const |
| LoadCWDlldbinitFile | GetLoadCWDlldbinitFile () const |
| Disassembler::HexImmediateStyle | GetHexImmediateStyle () const |
| MemoryModuleLoadLevel | GetMemoryModuleLoadLevel () const |
| bool | GetUserSpecifiedTrapHandlerNames (Args &args) const |
| void | SetUserSpecifiedTrapHandlerNames (const Args &args) |
| bool | GetDisplayRuntimeSupportValues () const |
| void | SetDisplayRuntimeSupportValues (bool b) |
| bool | GetDisplayRecognizedArguments () const |
| void | SetDisplayRecognizedArguments (bool b) |
| const ProcessLaunchInfo & | GetProcessLaunchInfo () const |
| void | SetProcessLaunchInfo (const ProcessLaunchInfo &launch_info) |
| bool | GetInjectLocalVariables (ExecutionContext *exe_ctx) const |
| bool | GetUseDIL (ExecutionContext *exe_ctx) const |
| void | SetUseDIL (ExecutionContext *exe_ctx, bool b) |
| void | SetRequireHardwareBreakpoints (bool b) |
| bool | GetRequireHardwareBreakpoints () const |
| bool | GetAutoInstallMainExecutable () const |
| void | UpdateLaunchInfoFromProperties () |
| void | SetDebugUtilityExpression (bool debug) |
| bool | GetDebugUtilityExpression () const |
| Public Member Functions inherited from lldb_private::Properties | |
| Properties () | |
| Properties (const lldb::OptionValuePropertiesSP &collection_sp) | |
| virtual | ~Properties () |
| lldb::OptionValuePropertiesSP | GetValueProperties () const |
| virtual lldb::OptionValueSP | GetPropertyValue (const ExecutionContext *exe_ctx, llvm::StringRef property_path, Status &error) const |
| virtual Status | SetPropertyValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef property_path, llvm::StringRef value) |
| virtual Status | DumpPropertyValue (const ExecutionContext *exe_ctx, Stream &strm, llvm::StringRef property_path, uint32_t dump_mask, bool is_json=false) |
| virtual void | DumpAllPropertyValues (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask, bool is_json=false) |
| virtual void | DumpAllDescriptions (CommandInterpreter &interpreter, Stream &strm) const |
| size_t | Apropos (llvm::StringRef keyword, std::vector< const Property * > &matching_properties) const |
| template<typename T> | |
| T | GetPropertyAtIndexAs (uint32_t idx, T default_value, const ExecutionContext *exe_ctx=nullptr) const |
| template<typename T, typename U = typename std::remove_pointer<T>::type, std::enable_if_t< std::is_pointer_v< T >, bool > = true> | |
| const U * | GetPropertyAtIndexAs (uint32_t idx, const ExecutionContext *exe_ctx=nullptr) const |
| template<typename T> | |
| bool | SetPropertyAtIndex (uint32_t idx, T t, const ExecutionContext *exe_ctx=nullptr) const |
| Public Member Functions inherited from lldb_private::Broadcaster | |
| Broadcaster (lldb::BroadcasterManagerSP manager_sp, std::string name) | |
| Construct with a broadcaster with a name. | |
| virtual | ~Broadcaster () |
| Destructor. | |
| void | CheckInWithManager () |
| void | BroadcastEvent (lldb::EventSP &event_sp) |
| Broadcast an event which has no associated data. | |
| void | BroadcastEventIfUnique (lldb::EventSP &event_sp) |
| void | BroadcastEvent (uint32_t event_type, const lldb::EventDataSP &event_data_sp) |
| void | BroadcastEvent (uint32_t event_type) |
| void | BroadcastEventIfUnique (uint32_t event_type) |
| void | Clear () |
| virtual void | AddInitialEventsToListener (const lldb::ListenerSP &listener_sp, uint32_t requested_events) |
| uint32_t | AddListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask) |
| Listen for any events specified by event_mask. | |
| const std::string & | GetBroadcasterName () |
| Get this broadcaster's name. | |
| bool | GetEventNames (Stream &s, const uint32_t event_mask, bool prefix_with_broadcaster_name) const |
| Get the event name(s) for one or more event bits. | |
| void | SetEventName (uint32_t event_mask, const char *name) |
| Set the name for an event bit. | |
| const char * | GetEventName (uint32_t event_mask) const |
| bool | EventTypeHasListeners (uint32_t event_type) |
| bool | RemoveListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX) |
| Removes a Listener from this broadcasters list and frees the event bits specified by event_mask that were previously acquired by listener (assuming listener was listening to this object) for other listener objects to use. | |
| bool | HijackBroadcaster (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX) |
| Provides a simple mechanism to temporarily redirect events from broadcaster. | |
| bool | IsHijackedForEvent (uint32_t event_mask) |
| void | RestoreBroadcaster () |
| Restore the state of the Broadcaster from a previous hijack attempt. | |
| lldb::BroadcasterManagerSP | GetManager () |
| void | SetPrimaryListener (lldb::ListenerSP listener_sp) |
| lldb::ListenerSP | GetPrimaryListener () |
| Public Member Functions inherited from lldb_private::ExecutionContextScope | |
| virtual | ~ExecutionContextScope ()=default |
| Public Member Functions inherited from lldb_private::ModuleList::Notifier | |
| virtual | ~Notifier ()=default |
Static Public Member Functions | |
| static llvm::StringRef | GetStaticBroadcasterClass () |
| static void | SettingsInitialize () |
| static void | SettingsTerminate () |
| static FileSpecList | GetDefaultExecutableSearchPaths () |
| static FileSpecList | GetDefaultDebugFileSearchPaths () |
| static ArchSpec | GetDefaultArchitecture () |
| static void | SetDefaultArchitecture (const ArchSpec &arch) |
| static TargetProperties & | GetGlobalProperties () |
| static Target * | GetTargetFromContexts (const ExecutionContext *exe_ctx_ptr, const SymbolContext *sc_ptr) |
| Static Public Member Functions inherited from lldb_private::Properties | |
| static llvm::StringRef | GetExperimentalSettingsName () |
| static bool | IsSettingExperimental (llvm::StringRef setting) |
Protected Types | |
| using | DummySignalElement = llvm::StringMapEntry<DummySignalValues> |
| using | BreakpointNameList |
| typedef std::map< lldb::LanguageType, lldb::REPLSP > | REPLMap |
| typedef std::map< lldb::user_id_t, StopHookSP > | StopHookCollection |
| Protected Types inherited from lldb_private::Broadcaster | |
| typedef std::shared_ptr< BroadcasterImpl > | BroadcasterImplSP |
| typedef std::weak_ptr< BroadcasterImpl > | BroadcasterImplWP |
Protected Member Functions | |
| void | InvalidateThreadFrameProviders () |
| Invalidate all potentially cached frame providers for all threads and trigger a stack changed event for all threads. | |
| void | NotifyModuleAdded (const ModuleList &module_list, const lldb::ModuleSP &module_sp) override |
| Implementing of ModuleList::Notifier. | |
| void | NotifyModuleRemoved (const ModuleList &module_list, const lldb::ModuleSP &module_sp) override |
| void | NotifyModuleUpdated (const ModuleList &module_list, const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp) override |
| void | NotifyWillClearList (const ModuleList &module_list) override |
| void | NotifyModulesRemoved (lldb_private::ModuleList &module_list) override |
| Target (Debugger &debugger, const ArchSpec &target_arch, const lldb::PlatformSP &platform_sp, bool is_dummy_target) | |
| Construct with optional file and arch. | |
| bool | ProcessIsValid () |
| void | PrimeFromDummyTarget (Target &target) |
| void | AddBreakpoint (lldb::BreakpointSP breakpoint_sp, bool internal) |
| void | FinalizeFileActions (ProcessLaunchInfo &info) |
| lldb::addr_t | GetReasonableReadSize (const Address &addr) |
| Return a recommended size for memory reads at addr, optimizing for cache usage. | |
| Target (const Target &)=delete | |
| const Target & | operator= (const Target &)=delete |
| SectionLoadList & | GetSectionLoadList () |
| Protected Member Functions inherited from lldb_private::Broadcaster | |
| BroadcasterImplSP | GetBroadcasterImpl () |
| const char * | GetHijackingListenerName () |
Static Protected Member Functions | |
| static bool | UpdateSignalFromDummy (lldb::UnixSignalsSP signals_sp, const DummySignalElement &element) |
| static bool | ResetSignalFromDummy (lldb::UnixSignalsSP signals_sp, const DummySignalElement &element) |
| static void | ImageSearchPathsChanged (const PathMappingList &path_list, void *baton) |
Protected Attributes | |
| Debugger & | m_debugger |
| lldb::PlatformSP | m_platform_sp |
| The platform for this target. | |
| std::recursive_mutex | m_mutex |
| An API mutex that is used by the lldb::SB* classes make the SB interface thread safe. | |
| std::recursive_mutex | m_private_mutex |
| When the private state thread calls SB API's - usually because it is running OS plugin or Python ThreadPlan code - it should not block on the API mutex that is held by the code that kicked off the sequence of events that led us to run the code. | |
| Arch | m_arch |
| std::string | m_label |
| ModuleList | m_images |
| The list of images for this process (shared libraries and anything dynamically loaded). | |
| SummaryStatisticsCache | m_summary_statistics_cache |
| SectionLoadHistory | m_section_load_history |
| BreakpointList | m_breakpoint_list |
| BreakpointList | m_internal_breakpoint_list |
| BreakpointNameList | m_breakpoint_names |
| lldb::BreakpointSP | m_last_created_breakpoint |
| WatchpointList | m_watchpoint_list |
| lldb::WatchpointSP | m_last_created_watchpoint |
| lldb::ProcessSP | m_process_sp |
| lldb::SearchFilterSP | m_search_filter_sp |
| PathMappingList | m_image_search_paths |
| TypeSystemMap | m_scratch_type_system_map |
| llvm::DenseMap< uint32_t, ScriptedFrameProviderDescriptor > | m_frame_provider_descriptors |
| Map of scripted frame provider descriptors for this target. | |
| std::recursive_mutex | m_frame_provider_descriptors_mutex |
| REPLMap | m_repl_map |
| lldb::SourceManagerUP | m_source_manager_up |
| StopHookCollection | m_stop_hooks |
| lldb::user_id_t | m_stop_hook_next_id |
| std::vector< StopHookSP > | m_internal_stop_hooks |
| uint32_t | m_latest_stop_hook_id |
| bool | m_valid |
| This records the last natural stop at which we ran a stop-hook. | |
| bool | m_suppress_stop_hooks |
| bool | m_is_dummy_target |
| Used to not run stop hooks for expressions. | |
| unsigned | m_next_persistent_variable_index = 0 |
| lldb::user_id_t | m_target_unique_id |
| The globally unique ID assigned to this target. | |
| std::string | m_target_session_name |
| The target session name for this target, used to name debugging sessions in DAP. | |
| lldb::TraceSP | m_trace_sp |
| An optional lldb_private::Trace object containing processor trace information of this target. | |
| lldb::StackFrameRecognizerManagerUP | m_frame_recognizer_manager_up |
| Stores the frame recognizers of this target. | |
| llvm::StringMap< DummySignalValues > | m_dummy_signals |
| These are used to set the signal state when you don't have a process and more usefully in the Dummy target where you can't know exactly what signals you will have. | |
| Protected Attributes inherited from lldb_private::Properties | |
| lldb::OptionValuePropertiesSP | m_collection_sp |
Private Attributes | |
| TargetStats | m_stats |
Friends | |
| class | TargetList |
| class | Debugger |
|
protected |
|
protected |
|
protected |
|
protected |
| typedef std::shared_ptr<StopHook> lldb_private::Target::StopHookSP |
| anonymous enum |
Broadcaster event bits definitions.
|
override |
Definition at line 214 of file Target.cpp.
References DeleteCurrentProcess(), lldb_private::GetLog(), LLDB_LOG, and lldb_private::Object.
|
protected |
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.
Definition at line 175 of file Target.cpp.
References lldb_private::Broadcaster::Broadcaster(), lldb_private::Broadcaster::CheckInWithManager(), Debugger, eBroadcastBitBreakpointChanged, eBroadcastBitModulesLoaded, eBroadcastBitModulesUnloaded, eBroadcastBitNewTargetCreated, eBroadcastBitSymbolsLoaded, eBroadcastBitWatchpointChanged, g_target_unique_id, lldb_private::ArchSpec::GetArchitectureName(), lldb_private::GetLog(), GetStaticBroadcasterClass(), lldb_private::ArchSpec::GetTriple(), ImageSearchPathsChanged(), lldb_private::ArchSpec::IsValid(), LLDB_LOG, m_arch, m_breakpoint_list, m_debugger, m_frame_recognizer_manager_up, m_image_search_paths, m_images, m_internal_breakpoint_list, m_internal_stop_hooks, m_is_dummy_target, m_latest_stop_hook_id, m_mutex, m_platform_sp, m_process_sp, m_search_filter_sp, m_section_load_history, m_source_manager_up, m_stop_hook_next_id, m_stop_hooks, m_suppress_stop_hooks, m_target_session_name, m_target_unique_id, m_valid, m_watchpoint_list, lldb_private::Object, lldb_private::Broadcaster::SetEventName(), lldb_private::Target, Target(), lldb_private::TargetProperties::TargetProperties(), and lldb_private::TargetProperties::UpdateLaunchInfoFromProperties().
Referenced by GetTargetFromContexts(), ImageSearchPathsChanged(), operator=(), PrimeFromDummyTarget(), Target(), and Target().
|
protected |
Definition at line 806 of file Target.cpp.
References lldb_private::Breakpoints, lldb::eDescriptionLevelVerbose, lldb_private::StreamString::GetData(), lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, m_internal_breakpoint_list, and m_last_created_breakpoint.
Referenced by CreateBreakpoint(), and PrimeFromDummyTarget().
| void Target::AddBreakpointName | ( | std::unique_ptr< BreakpointName > | bp_name | ) |
Definition at line 856 of file Target.cpp.
References m_breakpoint_names.
Referenced by PrimeFromDummyTarget().
Add a signal to the Target's list of stored signals/actions.
These values will get copied into any processes launched from this target.
Definition at line 3869 of file Target.cpp.
References lldb_private::eLazyBoolCalculate, and m_dummy_signals.
Referenced by CommandObjectProcessHandle::DoExecute().
| void Target::AddNameToBreakpoint | ( | BreakpointID & | id, |
| llvm::StringRef | name, | ||
| Status & | error ) |
Definition at line 829 of file Target.cpp.
References AddNameToBreakpoint(), lldb::eDescriptionLevelBrief, error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::StreamString::GetData(), and m_breakpoint_list.
Referenced by AddNameToBreakpoint(), CopyOverBreakpointOptions(), lldb_private::Breakpoint::CreateFromStructuredData(), CommandObjectBreakpointNameAdd::DoExecute(), and CommandObjectBreakpointSet::DoExecute().
| void Target::AddNameToBreakpoint | ( | lldb::BreakpointSP & | bp_sp, |
| llvm::StringRef | name, | ||
| Status & | error ) |
Definition at line 843 of file Target.cpp.
References lldb_private::BreakpointName::ConfigureBreakpoint(), error(), and FindBreakpointName().
| llvm::Expected< uint32_t > Target::AddScriptedFrameProviderDescriptor | ( | const ScriptedFrameProviderDescriptor & | descriptor | ) |
Add or update a scripted frame provider descriptor for this target.
All new threads in this target will check if they match any descriptors to create their frame providers.
| [in] | descriptor | The descriptor to add or update. |
Definition at line 3722 of file Target.cpp.
References lldb_private::ScriptedFrameProviderDescriptor::GetID(), lldb_private::ScriptedFrameProviderDescriptor::GetName(), InvalidateThreadFrameProviders(), lldb_private::ScriptedFrameProviderDescriptor::IsValid(), m_frame_provider_descriptors, and m_frame_provider_descriptors_mutex.
Referenced by CommandObjectTargetFrameProviderRegister::DoExecute().
| void Target::ApplyNameToBreakpoints | ( | BreakpointName & | bp_name | ) |
Definition at line 909 of file Target.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::Breakpoints, lldb_private::BreakpointName::ConfigureBreakpoint(), lldb_private::GetLog(), lldb_private::BreakpointName::GetName(), LLDB_LOG, and m_breakpoint_list.
Referenced by ConfigureBreakpointName().
| Status Target::Attach | ( | ProcessAttachInfo & | attach_info, |
| Stream * | stream ) |
Definition at line 3630 of file Target.cpp.
References lldb_private::Process::AttachSynchronousHijackListenerName, CreateProcess(), error(), lldb::eStateAttaching, lldb::eStateConnected, lldb::eStateInvalid, lldb::eStateStopped, lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::Status::FromErrorStringWithFormatv(), lldb_private::ProcessAttachInfo::GetAsync(), GetDebugger(), lldb_private::ProcessInfo::GetExecutableFile(), GetExecutableModule(), lldb_private::ProcessInfo::GetHijackListener(), lldb_private::ProcessAttachInfo::GetListenerForProcess(), lldb_private::Debugger::GetPlatformList(), lldb_private::ProcessAttachInfo::GetProcessPluginName(), GetProcessSP(), lldb_private::PlatformList::GetSelectedPlatform(), lldb_private::ProcessInfo::IsScriptedProcess(), m_stats, lldb_private::Listener::MakeListener(), lldb_private::ProcessAttachInfo::ProcessInfoSpecified(), RunStopHooks(), SaveScriptedLaunchInfo(), SelectMostRelevantFrame, lldb_private::FileSpec::SetFilename(), lldb_private::ProcessInfo::SetHijackListener(), and SetPlatform().
Referenced by AttachToProcess(), and CommandObjectProcessAttach::DoExecute().
|
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.
| [out] | exe_ctx | A reference to an execution context object that gets filled in. |
Implements lldb_private::ExecutionContextScope.
Definition at line 2597 of file Target.cpp.
References lldb_private::ExecutionContext::Clear(), and lldb_private::ExecutionContext::SetTargetPtr().
Referenced by EvaluateExpression().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 2591 of file Target.cpp.
References m_process_sp.
Referenced by CommandObjectTargetModulesLoad::DoExecute().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 2595 of file Target.cpp.
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 2589 of file Target.cpp.
Referenced by lldb_private::ABI::GetReturnValueObject().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 2593 of file Target.cpp.
| void Target::CleanupProcess | ( | ) |
Definition at line 263 of file Target.cpp.
References ClearAllWatchpointHistoricValues(), ClearAllWatchpointHitCounts(), DisableAllWatchpoints(), lldb_private::WatchpointList::GetListMutex(), GetWatchpointList(), m_breakpoint_list, m_internal_breakpoint_list, m_latest_stop_hook_id, and ResetBreakpointHitCounts().
Referenced by DeleteCurrentProcess(), and lldb_private::Process::DidExec().
| void Target::ClearAllLoadedSections | ( | ) |
Definition at line 3404 of file Target.cpp.
References m_section_load_history.
Referenced by lldb_private::Process::Attach(), lldb_private::Process::LaunchPrivate(), and lldb_private::Process::LoadCore().
| bool Target::ClearAllWatchpointHistoricValues | ( | ) |
Definition at line 1423 of file Target.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, and lldb_private::Watchpoints.
Referenced by CleanupProcess().
| bool Target::ClearAllWatchpointHitCounts | ( | ) |
Definition at line 1409 of file Target.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, and lldb_private::Watchpoints.
Referenced by CleanupProcess().
| void Target::ClearDummySignals | ( | Args & | signal_names | ) |
Clear the dummy signals in signal_names from the target, or all signals if signal_names is empty.
Also remove the behaviors they set from the process's signals if it exists.
Definition at line 3938 of file Target.cpp.
References lldb_private::Args::GetArgumentCount(), GetProcessSP(), m_dummy_signals, and ResetSignalFromDummy().
Referenced by Destroy(), and CommandObjectProcessHandle::DoExecute().
| void Target::ClearModules | ( | bool | delete_locations | ) |
Definition at line 1563 of file Target.cpp.
References m_images, m_scratch_type_system_map, m_section_load_history, and ModulesDidUnload().
Referenced by Destroy(), lldb_private::Process::DidExec(), SetArchitecture(), and SetExecutableModule().
| void Target::ClearScriptedFrameProviderDescriptors | ( | ) |
Clear all scripted frame provider descriptors for this target.
Definition at line 3758 of file Target.cpp.
References InvalidateThreadFrameProviders(), m_frame_provider_descriptors, and m_frame_provider_descriptors_mutex.
Referenced by CommandObjectTargetFrameProviderClear::DoExecute().
| void Target::ClearSectionLoadList | ( | ) |
Definition at line 5351 of file Target.cpp.
References lldb_private::SectionLoadList::Clear(), and GetSectionLoadList().
Referenced by DynamicLoaderMacOS::NotifyBreakpointHit().
| void Target::ConfigureBreakpointName | ( | BreakpointName & | bp_name, |
| const BreakpointOptions & | options, | ||
| const BreakpointName::Permissions & | permissions ) |
Definition at line 901 of file Target.cpp.
References ApplyNameToBreakpoints(), lldb_private::BreakpointOptions::CopyOverSetOptions(), lldb_private::BreakpointName::GetOptions(), lldb_private::BreakpointName::GetPermissions(), and lldb_private::BreakpointName::Permissions::MergeInto().
Referenced by CommandObjectBreakpointNameConfigure::DoExecute(), and lldb::SBBreakpointName::SBBreakpointName().
| lldb::BreakpointSP Target::CreateAddressInModuleBreakpoint | ( | lldb::addr_t | file_addr, |
| bool | internal, | ||
| const FileSpec & | file_spec, | ||
| bool | request_hardware ) |
Definition at line 578 of file Target.cpp.
References CreateBreakpoint().
Referenced by CommandObjectBreakpointAddAddress::DoExecute(), and CommandObjectBreakpointSet::DoExecute().
| BreakpointSP Target::CreateBreakpoint | ( | const Address & | addr, |
| bool | internal, | ||
| bool | request_hardware ) |
Definition at line 567 of file Target.cpp.
References CreateBreakpoint().
| 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 489 of file Target.cpp.
References lldb_private::FileSpecList::Append(), CreateBreakpoint(), lldb_private::eInlineBreakpointsAlways, lldb_private::eInlineBreakpointsHeaders, lldb_private::eInlineBreakpointsNever, lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::TargetProperties::GetInlineStrategy(), lldb_private::TargetProperties::GetMoveToNearestCode(), GetSearchFilterForModuleAndCUList(), GetSearchFilterForModuleList(), lldb_private::TargetProperties::GetSkipPrologue(), lldb_private::TargetProperties::GetSourcePathMap(), lldb_private::FileSpec::IsSourceImplementationFile(), and lldb_private::PathMappingList::ReverseRemapPath().
Referenced by lldb_private::StructuredDataDarwinLog::AddInitCompletionHook(), CreateAddressInModuleBreakpoint(), CreateBreakpoint(), CreateBreakpoint(), CreateBreakpoint(), CreateBreakpointAtUserEntry(), lldb_private::CPPLanguageRuntime::CreateExceptionBreakpoint(), lldb_private::LanguageRuntime::CreateExceptionBreakpoint(), lldb_private::Breakpoint::CreateFromStructuredData(), CreateFuncRegexBreakpoint(), CreateScriptedBreakpoint(), CreateSourceRegexBreakpoint(), CommandObjectBreakpointAddAddress::DoExecute(), CommandObjectBreakpointAddFile::DoExecute(), CommandObjectBreakpointAddName::DoExecute(), CommandObjectBreakpointSet::DoExecute(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), lldb_private::ThreadPlanRunToAddress::SetInitialBreakpoints(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), lldb_private::PlatformDarwin::SetThreadCreationBreakpoint(), and lldb_private::ThreadPlanStepOut::SetupReturnAddress().
| lldb::BreakpointSP lldb_private::Target::CreateBreakpoint | ( | const FileSpecList * | containingModules, |
| const FileSpecList * | containingSourceFiles, | ||
| const char * | func_name, | ||
| lldb::FunctionNameType | func_name_type_mask, | ||
| lldb::LanguageType | language, | ||
| lldb::addr_t | offset, | ||
| bool | offset_is_insn_count, | ||
| LazyBool | skip_prologue, | ||
| bool | internal, | ||
| bool | request_hardware ) |
| 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 ) |
| lldb::BreakpointSP lldb_private::Target::CreateBreakpoint | ( | const FileSpecList * | containingModules, |
| const FileSpecList * | containingSourceFiles, | ||
| const std::vector< std::string > & | func_names, | ||
| lldb::FunctionNameType | func_name_type_mask, | ||
| lldb::LanguageType | language, | ||
| lldb::addr_t | m_offset, | ||
| LazyBool | skip_prologue, | ||
| bool | internal, | ||
| bool | request_hardware ) |
References error().
| BreakpointSP Target::CreateBreakpoint | ( | lldb::addr_t | load_addr, |
| bool | internal, | ||
| bool | request_hardware ) |
Definition at line 547 of file Target.cpp.
References CreateBreakpoint(), GetBreakableLoadAddress(), GetSectionLoadList(), lldb_private::Address::IsValid(), lldb_private::SectionLoadList::ResolveLoadAddress(), and lldb_private::Address::SetOffset().
| BreakpointSP Target::CreateBreakpoint | ( | lldb::SearchFilterSP & | filter_sp, |
| lldb::BreakpointResolverSP & | resolver_sp, | ||
| bool | internal, | ||
| bool | request_hardware, | ||
| bool | resolve_indirect_symbols ) |
Definition at line 791 of file Target.cpp.
References AddBreakpoint(), and lldb_private::TargetProperties::GetRequireHardwareBreakpoints().
| lldb::BreakpointSP lldb_private::Target::CreateBreakpointAtUserEntry | ( | Status & | error | ) |
Definition at line 434 of file Target.cpp.
References lldb_private::FileSpecList::Append(), CreateBreakpoint(), lldb::eLanguageTypeUnknown, lldb_private::eLazyBoolNo, error(), lldb_private::Language::FindPlugin(), lldb_private::Status::FromErrorString(), GetExecutableModule(), lldb_private::Language::GetSupportedLanguages(), and lldb_private::Language::GetUserEntryPointName().
| Status Target::CreateBreakpointsFromFile | ( | const FileSpec & | file, |
| BreakpointIDList & | new_bps ) |
Definition at line 1260 of file Target.cpp.
References CreateBreakpointsFromFile().
Referenced by CreateBreakpointsFromFile(), and CommandObjectBreakpointRead::DoExecute().
| Status Target::CreateBreakpointsFromFile | ( | const FileSpec & | file, |
| std::vector< std::string > & | names, | ||
| BreakpointIDList & | new_bps ) |
Definition at line 1266 of file Target.cpp.
References lldb_private::BreakpointIDList::AddBreakpointID(), lldb_private::Breakpoint::CreateFromStructuredData(), error(), lldb_private::Status::FromErrorStringWithFormat(), GetBreakpointList(), lldb_private::StructuredData::Array::GetItemAtIndex(), lldb_private::BreakpointList::GetListMutex(), lldb_private::FileSpec::GetPath(), lldb_private::Breakpoint::GetSerializationKey(), lldb_private::StructuredData::Array::GetSize(), lldb_private::StructuredData::Dictionary::GetValueForKey(), lldb_private::StructuredData::ParseJSONFromFile(), and lldb_private::Breakpoint::SerializedBreakpointMatchesNames().
| 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 ) |
Definition at line 744 of file Target.cpp.
References lldb_private::LanguageRuntime::CreateExceptionBreakpoint(), and error().
Referenced by CommandObjectBreakpointAddException::DoExecute(), and CommandObjectBreakpointSet::DoExecute().
| BreakpointSP Target::CreateFuncRegexBreakpoint | ( | const FileSpecList * | containingModules, |
| const FileSpecList * | containingSourceFiles, | ||
| RegularExpression | func_regexp, | ||
| lldb::LanguageType | requested_language, | ||
| LazyBool | skip_prologue, | ||
| bool | internal, | ||
| bool | request_hardware ) |
Definition at line 727 of file Target.cpp.
References CreateBreakpoint(), lldb_private::eLazyBoolCalculate, GetSearchFilterForModuleAndCUList(), lldb_private::TargetProperties::GetSkipPrologue(), and skip().
Referenced by CommandObjectBreakpointAddName::DoExecute(), and CommandObjectBreakpointSet::DoExecute().
| const lldb::ProcessSP & Target::CreateProcess | ( | lldb::ListenerSP | listener_sp, |
| llvm::StringRef | plugin_name, | ||
| const FileSpec * | crash_file, | ||
| bool | can_connect ) |
Definition at line 301 of file Target.cpp.
References DeleteCurrentProcess(), lldb_private::Process::FindPlugin(), GetDebugger(), lldb_private::Debugger::GetListener(), and m_process_sp.
Referenced by lldb_private::platform_gdb_server::PlatformRemoteGDBServer::Attach(), lldb_private::PlatformWindows::Attach(), Attach(), PlatformPOSIX::Attach(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::DebugProcess(), lldb_private::PlatformQemuUser::DebugProcess(), lldb_private::PlatformWasm::DebugProcess(), lldb_private::PlatformWindows::DebugProcess(), PlatformPOSIX::DebugProcess(), lldb_private::Platform::DoConnectProcess(), and Launch().
| 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 ) |
Definition at line 761 of file Target.cpp.
References CreateBreakpoint(), lldb::eSearchDepthTarget, GetSearchFilterForModuleAndCUList(), GetSearchFilterForModuleList(), and lldb_private::FileSpecList::GetSize().
Referenced by CommandObjectBreakpointAddScripted::DoExecute(), and CommandObjectBreakpointSet::DoExecute().
| 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 ) |
Definition at line 472 of file Target.cpp.
References CreateBreakpoint(), lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::TargetProperties::GetMoveToNearestCode(), and GetSearchFilterForModuleAndCUList().
Referenced by CommandObjectBreakpointAddPattern::DoExecute(), and CommandObjectBreakpointSet::DoExecute().
| Target::StopHookSP Target::CreateStopHook | ( | StopHook::StopHookKind | kind, |
| bool | internal = false ) |
Add an empty stop hook to the Target's stop hook list, and returns a shared pointer to the new hook.
Definition at line 3048 of file Target.cpp.
References lldb_private::Target::StopHook::CodeBased, lldb_private::Target::StopHook::CommandBased, LLDB_INVALID_UID, m_internal_stop_hooks, m_stop_hook_next_id, m_stop_hooks, and lldb_private::Target::StopHook::ScriptBased.
| llvm::Expected< TraceSP > Target::CreateTrace | ( | ) |
Create a Trace object for the current target using the using the default supported tracing technology for this process.
Definition at line 3599 of file Target.cpp.
References lldb_private::Trace::FindPluginForLiveProcess(), m_process_sp, and m_trace_sp.
Referenced by GetTraceOrCreate().
| llvm::Expected< std::unique_ptr< UtilityFunction > > Target::CreateUtilityFunction | ( | std::string | expression, |
| std::string | name, | ||
| lldb::LanguageType | language, | ||
| ExecutionContext & | exe_ctx ) |
Creates and installs a UtilityFunction for the given language.
Definition at line 2768 of file Target.cpp.
References lldb::eExpressionSetupError, lldb_private::DiagnosticManager::GetAsError(), lldb_private::Language::GetNameForLanguageType(), and GetScratchTypeSystemForLanguage().
Referenced by lldb_private::AppleObjCRuntimeV1::CreateObjectChecker(), lldb_private::GNUstepObjCRuntime::CreateObjectChecker(), PlatformPOSIX::MakeLoadImageUtilityFunction(), lldb_private::AppleObjCTrampolineHandler::SetupDispatchFunction(), lldb_private::AppleGetItemInfoHandler::SetupGetItemInfoFunction(), lldb_private::AppleGetPendingItemsHandler::SetupGetPendingItemsFunction(), lldb_private::AppleGetQueuesHandler::SetupGetQueuesFunction(), and lldb_private::AppleGetThreadItemInfoHandler::SetupGetThreadItemInfoFunction().
| WatchpointSP Target::CreateWatchpoint | ( | lldb::addr_t | addr, |
| size_t | size, | ||
| const CompilerType * | type, | ||
| uint32_t | kind, | ||
| Status & | error ) |
Definition at line 955 of file Target.cpp.
References CheckIfWatchpointsSupported(), error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::WatchpointList::GetListMutex(), lldb_private::GetLog(), GetWatchpointList(), LLDB_INVALID_ADDRESS, LLDB_LOGF, LLDB_WATCH_TYPE_IS_VALID, LLDB_WATCH_TYPE_MODIFY, LLDB_WATCH_TYPE_READ, LLDB_WATCH_TYPE_WRITE, m_last_created_watchpoint, m_process_sp, m_watchpoint_list, ProcessIsValid(), and lldb_private::Watchpoints.
| void Target::DeleteBreakpointName | ( | ConstString | name | ) |
Definition at line 885 of file Target.cpp.
References lldb_private::ConstString::AsCString(), m_breakpoint_list, and m_breakpoint_names.
| void Target::DeleteCurrentProcess | ( | ) |
Definition at line 279 of file Target.cpp.
References CleanupProcess(), m_process_sp, m_section_load_history, and m_trace_sp.
Referenced by CreateProcess(), Destroy(), Launch(), and ~Target().
| void Target::Destroy | ( | ) |
Definition at line 372 of file Target.cpp.
References ClearDummySignals(), ClearModules(), DeleteCurrentProcess(), m_arch, m_breakpoint_list, m_image_search_paths, m_internal_breakpoint_list, m_internal_stop_hooks, m_last_created_breakpoint, m_last_created_watchpoint, m_mutex, m_platform_sp, m_repl_map, m_search_filter_sp, m_section_load_history, m_stop_hook_next_id, m_stop_hooks, m_suppress_stop_hooks, m_valid, and m_watchpoint_list.
| 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 1570 of file Target.cpp.
References m_arch, m_breakpoint_list, and m_internal_breakpoint_list.
Referenced by lldb_private::Process::DidExec().
| void Target::DisableAllBreakpoints | ( | bool | internal_also = false | ) |
Definition at line 1073 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, and m_internal_breakpoint_list.
| void Target::DisableAllowedBreakpoints | ( | ) |
Definition at line 1083 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, and m_breakpoint_list.
Definition at line 1356 of file Target.cpp.
References lldb_private::Status::Fail(), lldb_private::GetLog(), LLDB_LOGF, m_process_sp, m_watchpoint_list, ProcessIsValid(), and lldb_private::Watchpoints.
Referenced by CleanupProcess(), and CommandObjectWatchpointDisable::DoExecute().
| bool Target::DisableBreakpointByID | ( | lldb::break_id_t | break_id | ) |
Definition at line 1127 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_BREAK_ID_IS_INTERNAL, LLDB_LOGF, m_breakpoint_list, and m_internal_breakpoint_list.
Referenced by RemoveBreakpointByID().
| bool Target::DisableWatchpointByID | ( | lldb::watch_id_t | watch_id | ) |
Definition at line 1455 of file Target.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_process_sp, m_watchpoint_list, ProcessIsValid(), lldb_private::Status::Success(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointDisable::DoExecute(), and RemoveWatchpointByID().
| 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.
| [in] | s | The stream to which to dump the object description. |
Definition at line 244 of file Target.cpp.
References lldb::eDescriptionLevelBrief, lldb_private::ConstString::GetCString(), GetExecutableModulePointer(), lldb_private::FileSpec::GetFilename(), lldb_private::Module::GetFileSpec(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_breakpoint_list, m_images, m_internal_breakpoint_list, and lldb_private::Stream::PutCString().
| void Target::DumpSectionLoadList | ( | Stream & | s | ) |
Definition at line 5353 of file Target.cpp.
References lldb_private::SectionLoadList::Dump(), and GetSectionLoadList().
Referenced by CommandObjectTargetDumpSectionLoadList::DoExecute().
| void Target::EnableAllBreakpoints | ( | bool | internal_also = false | ) |
Definition at line 1090 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, and m_internal_breakpoint_list.
| void Target::EnableAllowedBreakpoints | ( | ) |
Definition at line 1100 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, and m_breakpoint_list.
Referenced by CommandObjectBreakpointEnable::DoExecute().
Definition at line 1383 of file Target.cpp.
References lldb_private::Status::Fail(), lldb_private::GetLog(), LLDB_LOGF, m_process_sp, m_watchpoint_list, ProcessIsValid(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointEnable::DoExecute().
| bool Target::EnableBreakpointByID | ( | lldb::break_id_t | break_id | ) |
Definition at line 1145 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_BREAK_ID_IS_INTERNAL, LLDB_LOGF, m_breakpoint_list, and m_internal_breakpoint_list.
| bool Target::EnableWatchpointByID | ( | lldb::watch_id_t | watch_id | ) |
Definition at line 1474 of file Target.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_process_sp, m_watchpoint_list, ProcessIsValid(), lldb_private::Status::Success(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointEnable::DoExecute().
| 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 ) |
Definition at line 2849 of file Target.cpp.
References lldb_private::ExecutionContextScope::CalculateExecutionContext(), CalculateExecutionContext(), lldb::eExpressionCompleted, lldb::eExpressionSetupError, lldb::eLanguageTypeC, lldb_private::UserExpression::Evaluate(), lldb_private::TargetProperties::GetExpressionPrefixContents(), lldb_private::GetLog(), GetScratchTypeSystemForLanguage(), LLDB_LOG_ERROR, m_process_sp, m_stats, m_suppress_stop_hooks, and lldb_private::Target.
Referenced by CommandObjectThreadReturn::DoExecute(), lldb_private::CommandObjectDWIMPrint::DoExecute(), lldb_private::OptionArgParser::DoToAddress(), EvaluateExpression(), lldb::SBFrame::EvaluateExpression(), lldb::SBTarget::EvaluateExpression(), and lldb_private::CommandInterpreter::PreprocessToken().
|
protected |
Definition at line 3790 of file Target.cpp.
References lldb_private::ProcessLaunchInfo::AppendOpenFileAction(), lldb_private::ProcessLaunchInfo::AppendSuppressFileAction(), lldb_private::ProcessLaunchInfo::GetFileActionForFD(), lldb_private::ProcessLaunchInfo::GetFlags(), lldb_private::GetLog(), GetPlatform(), lldb_private::TargetProperties::GetStandardErrorPath(), lldb_private::TargetProperties::GetStandardInputPath(), lldb_private::TargetProperties::GetStandardOutputPath(), LLDB_LOG, LLDB_LOG_ERROR, m_platform_sp, lldb_private::Process, lldb_private::ProcessLaunchInfo::SetUpPtyRedirection(), and lldb_private::Flags::Test().
Referenced by Launch().
| BreakpointName * Target::FindBreakpointName | ( | ConstString | name, |
| bool | can_create, | ||
| Status & | error ) |
Definition at line 861 of file Target.cpp.
References lldb_private::ConstString::AsCString(), error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::ConstString::GetStringRef(), m_breakpoint_names, and lldb_private::BreakpointID::StringIsBreakpointName().
Referenced by AddNameToBreakpoint(), CommandObjectBreakpointNameConfigure::DoExecute(), CommandObjectBreakpointNameList::DoExecute(), and lldb_private::BreakpointIDList::FindAndReplaceIDRanges().
| llvm::StringRef Target::GetABIName | ( | ) | const |
Returns the name of the target's ABI plugin.
Definition at line 397 of file Target.cpp.
References lldb_private::ABI::FindPlugin(), GetArchitecture(), and m_process_sp.
| std::recursive_mutex & Target::GetAPIMutex | ( | ) |
Definition at line 5330 of file Target.cpp.
References GetProcessSP(), m_mutex, and m_private_mutex.
Referenced by AttachToProcess(), lldb_private::CommandObject::CheckRequirements(), lldb_private::ValueImpl::GetSP(), and lldb::SBWatchpoint::SetEnabled().
|
inline |
Definition at line 1183 of file Target.h.
References m_arch.
Referenced by MinidumpFileBuilder::AddHeaderAndCalculateDirectories(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), MinidumpFileBuilder::AddThreadList(), lldb_private::Process::AdvanceAddressToNextBranchInstruction(), lldb_private::ItaniumABIRuntime::AppendExceptionBreakpointFilterModules(), lldb_private::AppleObjCDeclVendor::AppleObjCDeclVendor(), lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), BuildProcessSection(), CalculateDisass(), ThreadMachCore::CalculateStopInfo(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), DynamicLoaderDarwinKernel::CreateInstance(), DynamicLoaderFreeBSDKernel::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), JITLoaderGDB::CreateInstance(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), lldb_private::GNUstepObjCRuntime::CreateInstance(), lldb_private::StructuredDataDarwinLog::CreateInstance(), lldb_private::TypeSystemClang::CreateInstance(), ThreadFreeBSDKernelCore::CreateRegisterContextForFrame(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::PlatformQemuUser::DebugProcess(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), CommandObjectMemoryRead::DoExecute(), CommandObjectMemoryWrite::DoExecute(), CommandObjectProcessAttach::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectTargetModulesAdd::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), lldb_private::CommandObjectDisassemble::DoExecute(), ProcessElfCore::DoLoadCore(), lldb_private::Address::Dump(), lldb_private::AddressRange::Dump(), lldb_private::StackFrame::Dump(), DumpAddressAndContent(), CommandObjectSourceInfo::DumpLinesInFunctions(), DumpTargetInfo(), lldb::SBInstruction::EmulateWithFrame(), lldb_private::process_gdb_remote::ProcessGDBRemote::EnableWatchpoint(), lldb_private::DWARFExpression::Evaluate(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), OptionGroupReadMemory::FinalizeSettings(), FindModulesByName(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::FormatEntity::Formatter::Format(), GetABIName(), lldb_private::Process::GetAddressByteSize(), lldb_private::ProcessTrace::GetArchitecture(), lldb_private::ScriptedProcess::GetArchitecture(), ProcessElfCore::GetArchitecture(), lldb_private::Process::GetByteOrder(), lldb_private::FuncUnwinders::GetDebugFrameAugmentedUnwindPlan(), lldb_private::StopInfoMachException::GetDescription(), lldb_private::FuncUnwinders::GetEHFrameAugmentedUnwindPlan(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), GetModuleConfig(), lldb_private::AppleObjCRuntime::GetObjCVersion(), lldb_private::GetPreferredAsanModule(), ABISysV_mips64::GetReturnValueObjectImpl(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_ppc::GetReturnValueObjectImpl(), ABISysV_x86_64::GetReturnValueObjectImpl(), ABIWindows_x86_64::GetReturnValueObjectImpl(), lldb_private::Thread::GetSiginfoValue(), lldb_private::Platform::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformDarwin::GetSoftwareBreakpointTrapOpcode(), lldb_private::PlatformWindows::GetSoftwareBreakpointTrapOpcode(), lldb_private::StackFrame::GetStatus(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::FuncUnwinders::GetUnwindAssemblyProfiler(), lldb_private::Value::GetValueAsData(), lldb_private::Process::GetWatchpointReportedAfter(), lldb_private::InferiorCallMmap(), isLoadBiasIncorrect(), lldb_private::ThreadPlanStepInstruction::IsPlanStale(), Launch(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::CommandObjectDisassemble::CommandOptions::OptionParsingStarting(), CommandObjectTargetModulesList::PrintModule(), ReadInstructions(), ReadJITEntry(), lldb_private::AssertFrameRecognizer::RecognizeFrame(), lldb_private::RegisterAssertFrameRecognizer(), lldb_private::RegisterContextUnifiedCore::RegisterContextUnifiedCore(), ObjectFileMachO::SaveCore(), DynamicLoaderDarwinKernel::SearchForKernelNearPC(), DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), SetupTargetOpts(), DisassemblerLLVMC::SymbolLookup(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), and lldb_private::DynamicLoaderDarwin::UseDYLDSPI().
|
inline |
Definition at line 1222 of file Target.h.
References m_arch.
Referenced by GetBreakableLoadAddress(), GetCallableLoadAddress(), lldb_private::Process::GetMemoryTagManager(), GetOpcodeLoadAddress(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReconfigureRegisterInfo(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::RegisterWriteCausesReconfigure(), lldb_private::BreakpointResolverName::SearchCallback(), and lldb_private::ThreadPlanStepInRange::ShouldStop().
| lldb::addr_t Target::GetBreakableLoadAddress | ( | lldb::addr_t | addr | ) |
Definition at line 3005 of file Target.cpp.
References GetArchitecturePlugin().
Referenced by CreateBreakpoint().
| BreakpointSP Target::GetBreakpointByID | ( | lldb::break_id_t | break_id | ) |
Definition at line 422 of file Target.cpp.
References LLDB_BREAK_ID_IS_INTERNAL, m_breakpoint_list, and m_internal_breakpoint_list.
Referenced by lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), CommandObjectBreakpointCommandDelete::DoExecute(), CommandObjectBreakpointCommandList::DoExecute(), CommandObjectBreakpointDelete::DoExecute(), CommandObjectBreakpointEnable::DoExecute(), CommandObjectBreakpointList::DoExecute(), CommandObjectBreakpointModify::DoExecute(), CommandObjectBreakpointNameConfigure::DoExecute(), lldb_private::ThreadPlanStepOut::DoWillResume(), lldb_private::ThreadPlanStepUntil::DoWillResume(), DynamicLoaderPOSIXDYLD::EntryBreakpointHit(), lldb_private::BreakpointIDList::FindAndReplaceIDRanges(), lldb_private::ThreadPlanRunToAddress::GetDescription(), SerializeBreakpointsToFile(), DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint(), lldb_private::CommandObjectMultiwordBreakpoint::VerifyIDs(), lldb_private::ThreadPlanStepOut::WillStop(), and lldb_private::ThreadPlanStepUntil::WillStop().
| BreakpointList & Target::GetBreakpointList | ( | bool | internal = false | ) |
Definition at line 408 of file Target.cpp.
References m_breakpoint_list, and m_internal_breakpoint_list.
Referenced by CreateBreakpointsFromFile(), CommandObjectBreakpointClear::DoExecute(), CommandObjectBreakpointCommandDelete::DoExecute(), CommandObjectBreakpointCommandList::DoExecute(), CommandObjectBreakpointDelete::DoExecute(), CommandObjectBreakpointEnable::DoExecute(), CommandObjectBreakpointList::DoExecute(), CommandObjectBreakpointModify::DoExecute(), CommandObjectBreakpointNameAdd::DoExecute(), CommandObjectBreakpointNameConfigure::DoExecute(), CommandObjectBreakpointNameDelete::DoExecute(), CommandObjectBreakpointNameList::DoExecute(), CommandObjectBreakpointRead::DoExecute(), CommandObjectBreakpointWrite::DoExecute(), CommandObjectProcessContinue::DoExecute(), lldb_private::BreakpointIDList::FindAndReplaceIDRanges(), lldb::SBBreakpointCallbackBaton::PrivateBreakpointHitCallback(), lldb_private::TargetStats::Reset(), ResetBreakpointHitCounts(), SerializeBreakpointsToFile(), and lldb_private::TargetStats::ToJSON().
| const BreakpointList & Target::GetBreakpointList | ( | bool | internal = false | ) | const |
Definition at line 415 of file Target.cpp.
References m_breakpoint_list, and m_internal_breakpoint_list.
| void Target::GetBreakpointNames | ( | std::vector< std::string > & | names | ) |
Definition at line 923 of file Target.cpp.
References m_breakpoint_names.
Referenced by CommandObjectBreakpointNameList::DoExecute().
|
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 572 of file Target.h.
References GetStaticBroadcasterClass().
| 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 2990 of file Target.cpp.
References GetArchitecturePlugin().
Referenced by lldb_private::Address::GetCallableLoadAddress(), and lldb_private::Address::SetCallableLoadAddress().
|
inline |
Definition at line 1224 of file Target.h.
References Debugger, and m_debugger.
Referenced by lldb_private::ClangUserExpression::AddArguments(), Attach(), lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), lldb_private::Process::CompleteAttach(), CompleteLineEntry(), lldb_private::Process::CreateBreakpointSite(), lldb_private::BreakpointOptions::CreateFromStructuredData(), CreateProcess(), ProcessKDP::DoConnectRemote(), lldb_private::InstructionList::Dump(), lldb_private::StackFrame::DumpUsingSettingsFormat(), lldb_private::Thread::DumpUsingSettingsFormat(), lldb_private::UserExpression::Execute(), lldb_private::FunctionCaller::ExecuteFunction(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::Thread::GetStackFrameStatus(), lldb_private::StackFrame::GetStatus(), lldb_private::Thread::GetStatus(), lldb_private::mcp::DebuggerResourceProvider::GetTargetResource(), lldb_private::StructuredDataDarwinLog::HandleArrivalOfStructuredData(), lldb_private::Target::StopHookCommandLine::HandleStop(), IRInterpreter::Interpret(), Launch(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), LoadScriptingResourceForModule(), lldb_private::Module::LoadScriptingResourceInTarget(), lldb_private::PlatformDarwin::LocateExecutableScriptingResources(), lldb_private::PlatformDarwin::LocateExecutableScriptingResourcesFromDSYM(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::StopInfoWatchpoint::PerformAction(), lldb_private::Process::PopProcessIOHandler(), lldb_private::Disassembler::PrintInstructions(), ProcessFreeBSDKernelCore::PrintUnreadMessage(), lldb_private::Process::ProcessIOHandlerIsActive(), lldb_private::Process::PushProcessIOHandler(), ResumeNewPlan(), RunScriptFormatKeyword(), ObjectFileMachO::SaveCore(), SetArchitecture(), SetLabel(), and lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction().
|
static |
Definition at line 2807 of file Target.cpp.
References lldb_private::TargetProperties::GetDefaultArchitecture(), and GetGlobalProperties().
Referenced by lldb_private::Debugger::Debugger(), lldb_private::Platform::DoConnectProcess(), lldb::SBDebugger::GetDefaultArchitecture(), and ObjectContainerUniversalMachO::GetObjectFile().
|
static |
Definition at line 2803 of file Target.cpp.
References lldb_private::TargetProperties::GetDebugFileSearchPaths(), and GetGlobalProperties().
Referenced by lldb_private::wasm::SymbolVendorWasm::CreateInstance(), SymbolVendorELF::CreateInstance(), SymbolVendorMacOSX::CreateInstance(), SymbolVendorPECOFF::CreateInstance(), ProcessKDP::DoConnectRemote(), findMatchingPDBFilePath(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwpSymbolFile(), and lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress().
|
static |
Definition at line 2799 of file Target.cpp.
References lldb_private::TargetProperties::GetExecutableSearchPaths(), and GetGlobalProperties().
Referenced by DynamicLoaderPOSIXDYLD::ResolveExecutableModule().
| 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.
| [out] | err | This object will be set to failure if no entry address could be found, and may contain a helpful error message. |
Definition at line 2956 of file Target.cpp.
References lldb_private::ObjectFile::GetEntryPointAddress(), GetExecutableModulePointer(), lldb_private::FileSpec::GetFilename(), lldb_private::Module::GetFileSpec(), GetImages(), lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::Module::GetObjectFile(), lldb_private::ModuleList::GetSize(), lldb_private::ConstString::GetStringRef(), and lldb_private::Address::IsValid().
Referenced by lldb_private::ThreadPlanCallFunction::ConstructorSetup().
| 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.
Definition at line 1525 of file Target.cpp.
References lldb_private::ObjectFile::eTypeExecutable, lldb_private::ObjectFile::GetType(), and m_images.
Referenced by lldb_private::PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(), Attach(), PlatformPOSIX::Attach(), lldb_private::Process::CompleteAttach(), CreateBreakpointAtUserEntry(), ProcessKDP::DoConnectRemote(), CommandObjectProcessAttach::DoExecute(), CommandObjectProcessLaunch::DoExecute(), ProcessElfCore::DoLoadCore(), ProcessMachCore::DoLoadCore(), ProcessFreeBSDKernelCore::FindSymbol(), GetExecutableModulePointer(), lldb_private::ProcessWindows::GetImageInfoAddress(), ProcessElfCore::GetImageInfoAddress(), lldb_private::minidump::ProcessMinidump::GetProcessInfo(), lldb_private::ProcessTrace::GetProcessInfo(), lldb_private::ScriptedProcess::GetProcessInfo(), ProcessElfCore::GetProcessInfo(), lldb_private::PlatformMacOSX::GetSDKDirectory(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), ImageSearchPathsChanged(), Install(), lldb_private::process_gdb_remote::ProcessGDBRemote::MaybeLoadExecutableModule(), DYLDRendezvous::ResolveRendezvousAddress(), ResolveSDKPathFromDebugInfo(), SetArchitecture(), ProcessFreeBSDKernelCore::SetKernelDisplacement(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules().
| Module * Target::GetExecutableModulePointer | ( | ) |
Definition at line 1541 of file Target.cpp.
References GetExecutableModule().
Referenced by DynamicLoaderDarwinKernel::CreateInstance(), DynamicLoaderFreeBSDKernel::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), CommandObjectPlatformProcessLaunch::DoExecute(), Dump(), DumpTargetInfo(), DynamicLoaderFreeBSDKernel::FindKernelAtLoadAddress(), lldb_private::FormatEntity::Formatter::Format(), GetEntryPointAddress(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), lldb_private::mcp::DebuggerResourceProvider::GetTargetResource(), lldb_private::Process::LaunchPrivate(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), DynamicLoaderDarwinKernel::SearchForKernelAtSameLoadAddr(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules().
|
inline |
Definition at line 1702 of file Target.h.
References m_frame_recognizer_manager_up.
Referenced by lldb_private::CPPLanguageRuntime::CPPLanguageRuntime(), CommandObjectFrameRecognizerAdd::DoExecute(), CommandObjectFrameRecognizerClear::DoExecute(), CommandObjectFrameRecognizerInfo::DoExecute(), CommandObjectFrameRecognizerList::DoExecute(), CommandObjectFrameRecognizerDelete::DoExecuteWithId(), CommandObjectFrameRecognizerDisable::DoExecuteWithId(), CommandObjectFrameRecognizerEnable::DoExecuteWithId(), CommandObjectWithFrameRecognizerArg::HandleArgumentCompletion(), lldb_private::RegisterAbortWithPayloadFrameRecognizer(), lldb_private::RegisterAssertFrameRecognizer(), lldb_private::RegisterMSVCRTCFrameRecognizer(), and lldb_private::RegisterVerboseTrapFrameRecognizer().
| FunctionCaller * Target::GetFunctionCallerForLanguage | ( | lldb::LanguageType | language, |
| const CompilerType & | return_type, | ||
| const Address & | function_address, | ||
| const ValueList & | arg_value_list, | ||
| const char * | name, | ||
| Status & | error ) |
Definition at line 2738 of file Target.cpp.
References error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::Language::GetNameForLanguageType(), and GetScratchTypeSystemForLanguage().
|
inline |
Get the globally unique ID for this target.
This ID is unique across all debugger instances and all targets, within the same lldb process. The ID is assigned during target construction and remains constant for the target's lifetime. The first target created (typically the dummy target) gets ID 1.
Definition at line 654 of file Target.h.
References m_target_unique_id.
|
static |
Definition at line 3286 of file Target.cpp.
References lldb_private::TargetProperties::TargetProperties().
Referenced by lldb_private::Debugger::Debugger(), lldb_private::DumpDataExtractor(), GetDefaultArchitecture(), GetDefaultDebugFileSearchPaths(), GetDefaultExecutableSearchPaths(), SaveScriptedLaunchInfo(), SetDefaultArchitecture(), lldb_private::FormatManager::ShouldPrintAsOneLiner(), lldb_private::CommandInterpreter::SourceInitFileCwd(), and lldb_private::TargetProperties::TargetProperties().
|
inline |
|
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.
Definition at line 1141 of file Target.h.
References m_images.
Referenced by AddLinkMapSections(), MinidumpFileBuilder::AddModuleList(), lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), lldb_private::AppleObjCRuntime::AppleObjCRuntime(), lldb_private::OptionValueUUID::AutoComplete(), lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), BuildModulesSection(), lldb_private::AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing(), DynamicLoaderMacOS::CanLoadImage(), lldb_private::TargetStats::CollectStats(), CreateAllImageInfosPayload(), lldb_private::GNUstepObjCRuntime::CreateInstance(), JITLoaderGDB::DidAttach(), JITLoaderGDB::DidLaunch(), CommandObjectMemoryRead::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesDumpClangAST::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectTargetVariable::DoExecute(), lldb_private::Address::Dump(), CommandObjectSourceInfo::DumpLinesForAddress(), CommandObjectSourceInfo::DumpLinesForFile(), CommandObjectSourceInfo::DumpLinesInFunctions(), Evaluate_DW_OP_entry_value(), lldb_private::PlatformDarwin::ExtractCrashInfoAnnotations(), lldb_private::Language::ImageListTypeScavenger::Find_Impl(), lldb_private::SymbolContext::FindBestGlobalDataSymbol(), lldb_private::ClangExpressionDeclMap::FindGlobalVariable(), lldb_private::IRExecutionUnit::FindInSymbols(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), CommandObjectSourceList::FindMatchingFunctions(), CommandObjectSourceList::FindMatchingFunctionSymbols(), DYLDRendezvous::FindMetadata(), HexagonDYLDRendezvous::FindMetadata(), FindModulesByName(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::CommandObjectDisassemble::GetContainingAddressRanges(), GetEntryPointAddress(), lldb_private::platform_android::PlatformAndroid::GetLibdlFunctionDeclarations(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), lldb_private::CommandObjectDisassemble::GetNameRanges(), lldb_private::AppleObjCRuntime::GetObjCModule(), lldb_private::AppleObjCRuntime::GetObjCVersion(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), RegisterContextFreeBSDKernelCore_arm64::GetOsreldate(), lldb_private::GetPreferredAsanModule(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::AppleObjCRuntimeV2::GetValuesForGlobalCFBooleans(), CommandObjectTargetVariable::GetVariableCallback(), lldb_private::GNUstepObjCRuntime::GNUstepObjCRuntime(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), lldb_private::ClangUtilityFunction::Install(), Install(), lldb_private::Thread::JumpToLine(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), lldb_private::ClangExpressionDeclMap::LookupFunction(), ModuleIsExcludedForUnconstrainedSearches(), lldb_private::CommandCompletions::ModuleUUIDs(), DynamicLoaderMacOS::NotifyBreakpointHit(), lldb_private::ClangUserExpression::Parse(), ProcessFreeBSDKernelCore::PrintUnreadMessage(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), JITLoaderGDB::ReadJITDescriptorImpl(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), lldb_private::DebuggerStats::ReportStatistics(), lldb_private::DebuggerStats::ResetStatistics(), ResolveAddress(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), lldb::SBModule::SBModule(), lldb_private::BreakpointResolverAddress::SearchCallback(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups(), lldb_private::DynamicLoaderDarwin::UnloadAllImages(), lldb_private::DynamicLoaderDarwin::UpdateDYLDImageInfoFromNewImageInfo(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules(), and lldb_private::FunctionCaller::WriteFunctionWrapper().
| PathMappingList & Target::GetImageSearchPathList | ( | ) |
Definition at line 2602 of file Target.cpp.
References m_image_search_paths.
Referenced by CommandObjectTargetModulesSearchPathsAdd::DoExecute(), CommandObjectTargetModulesSearchPathsClear::DoExecute(), CommandObjectTargetModulesSearchPathsInsert::DoExecute(), CommandObjectTargetModulesSearchPathsList::DoExecute(), CommandObjectTargetModulesSearchPathsQuery::DoExecute(), and CommandObjectTargetModulesSearchPathsInsert::HandleArgumentCompletion().
|
inline |
|
inline |
Definition at line 815 of file Target.h.
References m_last_created_breakpoint.
Referenced by lldb_private::CommandObjectMultiwordBreakpoint::VerifyIDs().
|
inline |
Definition at line 923 of file Target.h.
References m_last_created_watchpoint.
Referenced by CommandObjectWatchpointModify::DoExecute(), and lldb_private::CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs().
| 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 2998 of file Target.cpp.
References GetArchitecturePlugin().
Referenced by lldb_private::Address::GetOpcodeLoadAddress(), lldb::SBFrame::GetPC(), lldb_private::Address::SetOpcodeLoadAddress(), and lldb_private::ThreadPlanRunToAddress::ThreadPlanRunToAddress().
| 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.
Note that this function previously also preloaded the module's symbols depending on a setting. This function no longer does any module preloading because that can potentially cause deadlocks when called in parallel with this function.
| [in] | module_spec | The criteria that must be matched for the binary being loaded. e.g. UUID, architecture, file path. |
| [in] | notify | If notify is true, and the Module is new to this Target, Target::ModulesDidLoad will be called. See note in Target::ModulesDidLoad about thread-safety with Target::GetOrCreateModule. 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_ptr | Optional 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. |
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 2352 of file Target.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::UUID::Clear(), lldb_private::Continue, lldb_private::UUID::Dump(), dump(), error(), lldb_private::ObjectFile::eTypeCoreFile, lldb_private::ObjectFile::eTypeDebugInfo, lldb_private::ObjectFile::eTypeDynamicLinker, lldb_private::ObjectFile::eTypeExecutable, lldb_private::ObjectFile::eTypeObjectFile, lldb_private::ObjectFile::eTypeSharedLibrary, lldb_private::ObjectFile::eTypeStubLibrary, lldb_private::ModuleList::ForEach(), lldb_private::Status::FromErrorString(), lldb_private::FileSpec::GetDirectory(), lldb_private::TargetProperties::GetExecutableSearchPaths(), lldb_private::FileSpec::GetFilename(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::GetLog(), lldb_private::TargetProperties::GetObjectPathMap(), lldb_private::FileSpec::GetPath(), lldb_private::ModuleList::GetSharedModule(), lldb_private::StreamString::GetString(), lldb_private::ObjectFile::GetType(), lldb_private::ModuleSpec::GetUUID(), lldb_private::ConstString::IsEmpty(), lldb_private::UUID::IsValid(), LLDB_INVALID_INDEX32, m_image_search_paths, m_images, m_platform_sp, m_process_sp, lldb_private::Modules, lldb_private::PathMappingList::RemapPath(), lldb_private::ModuleList::RemoveSharedModuleIfOrphaned(), lldb_private::FileSpec::SetDirectory(), lldb_private::FileSpec::SetFilename(), lldb_private::FileSpec::SetPath(), lldb_private::ModuleSpec::SetTarget(), and lldb_private::Target.
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingPreloadedModules(), CommandObjectTargetModulesAdd::DoExecute(), ProcessElfCore::DoLoadCore(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), lldb_private::trace_intel_pt::TraceIntelPTBundleLoader::ParseModule(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), and SetExecutableModule().
| PersistentExpressionState * Target::GetPersistentExpressionStateForLanguage | ( | lldb::LanguageType | language | ) |
Definition at line 2685 of file Target.cpp.
References lldb_private::GetLog(), lldb_private::Language::GetNameForLanguageType(), GetScratchTypeSystemForLanguage(), LLDB_LOG, LLDB_LOG_ERROR, and lldb_private::Target.
Referenced by CommandObjectMemoryRead::DoExecute(), lldb_private::CommandObjectDWIMPrint::DoExecute(), lldb_private::UserExpression::Execute(), lldb_private::ABI::GetReturnValueObject(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::ObjCLanguageRuntime::LookupInModulesVendor(), lldb_private::ClangUserExpression::Parse(), SetupDeclVendor(), and lldb_private::ClangExpressionDeclMap::WillParse().
| lldb::addr_t Target::GetPersistentSymbol | ( | ConstString | name | ) |
Definition at line 2936 of file Target.cpp.
References LLDB_INVALID_ADDRESS, and m_scratch_type_system_map.
| lldb::ExpressionVariableSP Target::GetPersistentVariable | ( | ConstString | name | ) |
Definition at line 2917 of file Target.cpp.
References m_scratch_type_system_map.
Referenced by lldb_private::CommandObjectDWIMPrint::DoExecute(), and lldb::SBFrame::FindValue().
|
inline |
Definition at line 1678 of file Target.h.
References m_platform_sp.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::ConnectToDebugserver(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), CommandObjectPlatformProcessInfo::DoExecute(), CommandObjectPlatformProcessLaunch::DoExecute(), CommandObjectPlatformProcessList::DoExecute(), CommandObjectPlatformStatus::DoExecute(), CommandObjectProcessLoad::DoExecute(), CommandObjectProcessStatus::DoExecute(), CommandObjectProcessUnload::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectTargetSymbolsAdd::DoExecute(), DumpTargetInfo(), FinalizeFileActions(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::CommandInterpreter::GetPlatform(), lldb_private::Process::GetProcessInfo(), lldb_private::Thread::GetSiginfoValue(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::InferiorCallMmap(), Install(), isLoadBiasIncorrect(), lldb_private::RegisterContextUnwind::IsTrapHandlerSymbol(), Launch(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::Module::LoadScriptingResourceInTarget(), lldb_private::process_gdb_remote::ProcessGDBRemote::SaveCore(), and SetArchitecture().
| const lldb::ProcessSP & Target::GetProcessSP | ( | ) | const |
Definition at line 313 of file Target.cpp.
References m_process_sp.
Referenced by Attach(), AttachToProcess(), CheckIfWatchpointsSupported(), CheckTargetForWatchpointOperations(), ClearDummySignals(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::CompactUnwindInfo::CreateUnwindPlan_i386(), lldb_private::CompactUnwindInfo::CreateUnwindPlan_x86_64(), CommandObjectProcessAttach::DoExecute(), CommandObjectProcessHandle::DoExecute(), CommandObjectProcessLaunch::DoExecute(), CommandObjectTargetModulesAdd::DoExecute(), CommandObjectWatchpointList::DoExecute(), sddarwinlog_private::EnableCommand::DoExecute(), sddarwinlog_private::StatusCommand::DoExecute(), DumpTargetInfo(), lldb_private::ExecutionContext::ExecutionContext(), GetAPIMutex(), lldb_private::Address::GetCallableLoadAddress(), lldb_private::CompactUnwindInfo::GetCompactUnwindInfoForFunction(), lldb_private::CommandObject::GetDefaultThread(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::CompactUnwindInfo::GetUnwindPlan(), InvalidateThreadFrameProviders(), Launch(), QuitCommandOverrideCallback(), lldb_private::Symbol::ResolveCallableAddress(), lldb::SBWatchpoint::SetEnabled(), SetExecutableModule(), SetSectionLoadAddress(), SetSectionUnloaded(), SetSectionUnloaded(), lldb_private::TargetStats::ToJSON(), and UnloadModuleSections().
Return a recommended size for memory reads at addr, optimizing for cache usage.
Definition at line 2207 of file Target.cpp.
References lldb_private::Address::GetLoadAddress(), LLDB_INVALID_ADDRESS, and m_process_sp.
Referenced by ReadStringFromMemory().
| CompilerType Target::GetRegisterType | ( | const std::string & | name, |
| const lldb_private::RegisterFlags & | flags, | ||
| uint32_t | byte_size ) |
Definition at line 2642 of file Target.cpp.
References lldb_private::PluginManager::GetRegisterTypeBuilder().
| lldb::REPLSP Target::GetREPL | ( | Status & | err, |
| lldb::LanguageType | language, | ||
| const char * | repl_options, | ||
| bool | can_create ) |
Definition at line 315 of file Target.cpp.
References lldb_private::REPL::Create(), Debugger, lldb::eLanguageTypeUnknown, lldb_private::LanguageSet::Empty(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::Language::GetLanguagesSupportingREPLs(), lldb_private::Language::GetNameForLanguageType(), lldb_private::LanguageSet::GetSingularLanguage(), m_debugger, m_repl_map, and lldb_private::Status::Success().
| llvm::Expected< lldb::TypeSystemSP > Target::GetScratchTypeSystemForLanguage | ( | lldb::LanguageType | language, |
| bool | create_on_demand = true ) |
Definition at line 2615 of file Target.cpp.
References lldb_private::LanguageSet::bitvector, lldb::eLanguageTypeAssembly, lldb::eLanguageTypeC, lldb::eLanguageTypeMipsAssembler, lldb::eLanguageTypeUnknown, lldb_private::LanguageSet::Empty(), lldb_private::Language::GetLanguagesSupportingTypeSystemsForExpressions(), m_scratch_type_system_map, and m_valid.
Referenced by lldb_private::Process::CallVoidArgVoidPtrReturn(), CreateUtilityFunction(), EvaluateExpression(), lldb_private::ScratchTypeSystemClang::GetForTarget(), GetFunctionCallerForLanguage(), GetPersistentExpressionStateForLanguage(), GetScratchTypeSystems(), GetUserExpressionForLanguage(), and lldb_private::InferiorCallMmap().
| std::vector< lldb::TypeSystemSP > Target::GetScratchTypeSystems | ( | bool | create_on_demand = true | ) |
Definition at line 2651 of file Target.cpp.
References lldb_private::bit(), lldb_private::LanguageSet::bitvector, lldb_private::Language::GetLanguagesSupportingTypeSystemsForExpressions(), lldb_private::GetLog(), lldb_private::Language::GetNameForLanguageType(), GetScratchTypeSystemForLanguage(), LLDB_LOG_ERROR, m_valid, and lldb_private::Target.
| const llvm::DenseMap< uint32_t, ScriptedFrameProviderDescriptor > & Target::GetScriptedFrameProviderDescriptors | ( | ) | const |
Get all scripted frame provider descriptors for this target.
Definition at line 3769 of file Target.cpp.
References m_frame_provider_descriptors, and m_frame_provider_descriptors_mutex.
Referenced by CommandObjectTargetFrameProviderList::DoExecute(), and lldb_private::Thread::GetStackFrameList().
| SearchFilterSP Target::GetSearchFilterForModule | ( | const FileSpec * | containingModule | ) |
Definition at line 672 of file Target.cpp.
References m_search_filter_sp.
| SearchFilterSP Target::GetSearchFilterForModuleAndCUList | ( | const FileSpecList * | containingModules, |
| const FileSpecList * | containingSourceFiles ) |
Definition at line 707 of file Target.cpp.
References GetSearchFilterForModuleList(), and lldb_private::FileSpecList::GetSize().
Referenced by CreateBreakpoint(), CreateFuncRegexBreakpoint(), CreateScriptedBreakpoint(), and CreateSourceRegexBreakpoint().
| SearchFilterSP Target::GetSearchFilterForModuleList | ( | const FileSpecList * | containingModuleList | ) |
Definition at line 690 of file Target.cpp.
References lldb_private::FileSpecList::GetSize(), and m_search_filter_sp.
Referenced by CreateBreakpoint(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), lldb_private::CPPLanguageRuntime::CreateExceptionSearchFilter(), CreateScriptedBreakpoint(), and GetSearchFilterForModuleAndCUList().
| lldb::addr_t Target::GetSectionLoadAddress | ( | const lldb::SectionSP & | section_sp | ) |
Definition at line 5347 of file Target.cpp.
References lldb_private::SectionLoadList::GetSectionLoadAddress(), and GetSectionLoadList().
Referenced by lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), lldb_private::ObjectFile::GetLoadableData(), lldb_private::Section::GetLoadBaseAddress(), and DynamicLoaderStatic::LoadAllImagesAtFileAddresses().
|
inlineprotected |
Definition at line 1899 of file Target.h.
References m_section_load_history.
Referenced by ClearSectionLoadList(), CreateBreakpoint(), DumpSectionLoadList(), GetSectionLoadAddress(), HasLoadedSections(), ReadMemory(), and ReadPointerFromMemory().
| SourceManager & Target::GetSourceManager | ( | ) |
Definition at line 3042 of file Target.cpp.
References m_source_manager_up.
Referenced by CommandObjectSourceList::DisplayFunctionSource(), CommandObjectSourceList::DoExecute(), GetDefaultFile(), and lldb_private::StackFrame::GetStatus().
|
static |
Definition at line 170 of file Target.cpp.
Referenced by lldb_private::Debugger::DefaultEventHandler(), GetBroadcasterClass(), lldb::SBTarget::GetBroadcasterClassName(), and Target().
|
inline |
Definition at line 1869 of file Target.h.
References m_stats.
Referenced by lldb_private::BreakpointResolverFileLine::DeduceSourceMapping(), lldb_private::BreakpointResolverFileLine::SearchCallback(), lldb_private::Process::SetPrivateState(), and lldb_private::Process::SetPublicState().
| Target::StopHookSP Target::GetStopHookByID | ( | lldb::user_id_t | uid | ) |
Definition at line 3084 of file Target.cpp.
References m_stop_hooks.
| const std::vector< Target::StopHookSP > Target::GetStopHooks | ( | bool | internal = false | ) | const |
Definition at line 3118 of file Target.cpp.
References m_internal_stop_hooks, and m_stop_hooks.
Referenced by CommandObjectTargetStopHookList::DoExecute().
| SummaryStatisticsCache & Target::GetSummaryStatisticsCache | ( | ) |
Definition at line 3412 of file Target.cpp.
References m_summary_statistics_cache.
Referenced by lldb_private::TargetStats::Reset(), and lldb_private::TargetStats::ToJSON().
| lldb_private::SummaryStatisticsSP Target::GetSummaryStatisticsSPForProviderName | ( | lldb_private::TypeSummaryImpl & | summary_provider | ) |
Definition at line 3406 of file Target.cpp.
References m_summary_statistics_cache.
|
inline |
Definition at line 1664 of file Target.h.
References m_suppress_stop_hooks.
|
static |
Definition at line 2835 of file Target.cpp.
References lldb_private::ExecutionContext::GetTargetPtr(), Target(), and lldb_private::SymbolContext::target_sp.
Referenced by DumpAddressAndContent(), DumpAddressOffsetFromFunction(), lldb_private::FormatEntity::Formatter::Format(), and RunScriptFormatKeyword().
|
inline |
Get the target session name for this target.
Provides a meaningful name for IDEs or tools to display for dynamically created targets. Defaults to "Session {ID}" based on the globally unique ID.
Definition at line 675 of file Target.h.
References m_target_session_name.
| TraceSP Target::GetTrace | ( | ) |
Get the Trace object containing processor trace information of this target.
Definition at line 3597 of file Target.cpp.
References m_trace_sp.
Referenced by BuildThreadsSection(), and lldb_private::CommandObject::CheckRequirements().
| 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 3624 of file Target.cpp.
References CreateTrace(), and m_trace_sp.
| UserExpression * Target::GetUserExpressionForLanguage | ( | llvm::StringRef | expr, |
| llvm::StringRef | prefix, | ||
| SourceLanguage | language, | ||
| Expression::ResultType | desired_type, | ||
| const EvaluateExpressionOptions & | options, | ||
| ValueObject * | ctx_obj, | ||
| Status & | error ) |
Definition at line 2705 of file Target.cpp.
References lldb_private::SourceLanguage::AsLanguageType(), error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::SourceLanguage::GetDescription(), lldb_private::Language::GetNameForLanguageType(), and GetScratchTypeSystemForLanguage().
Referenced by lldb_private::UserExpression::Evaluate().
|
inline |
Definition at line 927 of file Target.h.
References m_watchpoint_list.
Referenced by CleanupProcess(), CreateWatchpoint(), CommandObjectWatchpointCommandDelete::DoExecute(), CommandObjectWatchpointCommandList::DoExecute(), CommandObjectWatchpointDelete::DoExecute(), CommandObjectWatchpointDisable::DoExecute(), CommandObjectWatchpointEnable::DoExecute(), CommandObjectWatchpointIgnore::DoExecute(), CommandObjectWatchpointList::DoExecute(), CommandObjectWatchpointModify::DoExecute(), lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction(), and lldb_private::CommandCompletions::WatchPointIDs().
| bool Target::HasLoadedSections | ( | ) |
Definition at line 5345 of file Target.cpp.
References GetSectionLoadList(), and lldb_private::SectionLoadList::IsEmpty().
Referenced by BuildModulesSection(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), CommandObjectSourceList::DoExecute(), lldb_private::SectionList::Dump(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), lldb_private::CommandObjectDisassemble::GetContainingAddressRanges(), CommandObjectSourceInfo::GetSymbolContextsForAddress(), lldb_private::Value::GetValueAsData(), LookupAddressInModule(), CommandObjectTargetModulesList::PrintModule(), ReadAddress(), ResolveAddress(), and DisassemblerLLVMC::SymbolLookup().
| bool Target::IgnoreAllWatchpoints | ( | uint32_t | ignore_count | ) |
Definition at line 1438 of file Target.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, ProcessIsValid(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointIgnore::DoExecute().
| bool Target::IgnoreWatchpointByID | ( | lldb::watch_id_t | watch_id, |
| uint32_t | ignore_count ) |
Definition at line 1509 of file Target.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, ProcessIsValid(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointIgnore::DoExecute().
|
staticprotected |
Definition at line 2606 of file Target.cpp.
References lldb_private::eLoadDependentsYes, GetExecutableModule(), SetExecutableModule(), and Target().
Referenced by Target().
| Status Target::Install | ( | ProcessLaunchInfo * | launch_info | ) |
Definition at line 3294 of file Target.cpp.
References error(), GetExecutableModule(), GetImages(), GetPlatform(), installExecutable(), and lldb_private::Modules.
Referenced by lldb_private::Process::LaunchPrivate().
|
protected |
Invalidate all potentially cached frame providers for all threads and trigger a stack changed event for all threads.
Definition at line 3775 of file Target.cpp.
References lldb_private::Thread::eBroadcastBitStackChanged, and GetProcessSP().
Referenced by AddScriptedFrameProviderDescriptor(), ClearScriptedFrameProviderDescriptors(), and RemoveScriptedFrameProviderDescriptor().
|
inline |
Definition at line 643 of file Target.h.
References m_is_dummy_target.
Referenced by CommandObjectBreakpointAddAddress::DoExecute().
|
inline |
Definition at line 763 of file Target.h.
References m_valid.
Referenced by lldb_private::TypeSystemClang::CreateInstance().
| Status Target::Launch | ( | ProcessLaunchInfo & | launch_info, |
| Stream * | stream ) |
Definition at line 3427 of file Target.cpp.
References CreateProcess(), Debugger, DeleteCurrentProcess(), error(), lldb::eStateConnected, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateStopped, FinalizeFileActions(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::ProcessInfo::GetArchitecture(), GetArchitecture(), lldb_private::Debugger::GetCommandInterpreter(), GetDebugger(), lldb_private::ProcessInfo::GetExecutableFile(), lldb_private::ProcessLaunchInfo::GetFlags(), lldb_private::ProcessInfo::GetHijackListener(), lldb_private::ProcessInfo::GetListener(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), GetPlatform(), lldb_private::ProcessLaunchInfo::GetProcessPluginName(), GetProcessSP(), lldb_private::ProcessInfo::GetShadowListener(), lldb_private::ProcessLaunchInfo::GetShell(), lldb_private::CommandInterpreter::GetSynchronous(), lldb_private::ProcessInfo::IsScriptedProcess(), lldb_private::ArchSpec::IsValid(), lldb_private::Process::LaunchSynchronousHijackListenerName, LLDB_LOGF, m_process_sp, m_stats, lldb_private::Listener::MakeListener(), RunStopHooks(), SaveScriptedLaunchInfo(), lldb_private::Flags::Set(), lldb_private::ProcessInfo::SetHijackListener(), lldb_private::StateAsCString(), lldb_private::Target, and lldb_private::Flags::Test().
Referenced by CommandObjectProcessLaunch::DoExecute().
Definition at line 1796 of file Target.cpp.
References lldb_private::GetLog(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsValid(), LLDB_LOGF, m_arch, lldb_private::ArchSpec::MergeFrom(), SetArchitecture(), and lldb_private::Target.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), and lldb_private::process_gdb_remote::ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess().
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.
| [in] | module_spec | Path to the module. |
Definition at line 1938 of file Target.cpp.
References lldb_private::ModuleList::FindModules(), lldb_private::TargetProperties::GetBreakpointsConsultPlatformAvoidList(), GetImages(), lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetSize(), and ModuleIsExcludedForUnconstrainedSearches().
Referenced by ModuleIsExcludedForUnconstrainedSearches().
| 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.
| [in] | module_sp | A shared pointer reference to the module that checked. |
Definition at line 1960 of file Target.cpp.
References lldb_private::TargetProperties::GetBreakpointsConsultPlatformAvoidList(), and m_platform_sp.
| void Target::ModulesDidLoad | ( | ModuleList & | module_list | ) |
This call may preload module symbols, and may do so in parallel depending on the following target settings:
Warning: if preloading is active and this is called in parallel with Target::GetOrCreateModule, this may result in a ABBA deadlock situation.
Definition at line 1859 of file Target.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), eBroadcastBitModulesLoaded, lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::TargetProperties::GetParallelModuleLoad(), lldb_private::TargetProperties::GetPreloadSymbols(), lldb_private::ModuleList::GetSize(), lldb_private::LoadFormattersForModule(), LoadScriptingResourceForModule(), lldb_private::LoadTypeSummariesForModule(), m_breakpoint_list, m_internal_breakpoint_list, m_process_sp, m_valid, and lldb_private::ModuleList::PreloadSymbols().
Referenced by CommandObjectTargetModulesLoad::DoExecute(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), NotifyModuleAdded(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), JITLoaderGDB::ReadJITDescriptorImpl(), SetExecutableModule(), and ProcessFreeBSDKernelCore::SetKernelDisplacement().
| void Target::ModulesDidUnload | ( | ModuleList & | module_list, |
| bool | delete_locations ) |
Definition at line 1898 of file Target.cpp.
References lldb_private::ModuleList::AnyOf(), lldb_private::Broadcaster::BroadcastEvent(), eBroadcastBitModulesUnloaded, lldb_private::ModuleList::GetSize(), m_breakpoint_list, m_internal_breakpoint_list, m_scratch_type_system_map, m_valid, and UnloadModuleSections().
Referenced by ClearModules(), NotifyModuleRemoved(), and NotifyModulesRemoved().
| void Target::NotifyBreakpointChanged | ( | Breakpoint & | bp, |
| const lldb::EventDataSP & | breakpoint_data_sp ) |
Sends a breakpoint notification event.
Definition at line 5367 of file Target.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), eBroadcastBitBreakpointChanged, and lldb_private::Broadcaster::EventTypeHasListeners().
| void Target::NotifyBreakpointChanged | ( | Breakpoint & | bp, |
| lldb::BreakpointEventType | event_kind ) |
Sends a breakpoint notification event.
Definition at line 5357 of file Target.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), eBroadcastBitBreakpointChanged, and lldb_private::Broadcaster::EventTypeHasListeners().
Referenced by lldb_private::Breakpoint::SendBreakpointChangedEvent(), and lldb_private::Breakpoint::SendBreakpointChangedEvent().
|
overrideprotectedvirtual |
Implementing of ModuleList::Notifier.
Implements lldb_private::ModuleList::Notifier.
Definition at line 1823 of file Target.cpp.
References lldb_private::ModuleList::Append(), m_valid, and ModulesDidLoad().
|
overrideprotectedvirtual |
Implements lldb_private::ModuleList::Notifier.
Definition at line 1833 of file Target.cpp.
References lldb_private::ModuleList::Append(), m_valid, and ModulesDidUnload().
|
overrideprotectedvirtual |
Implements lldb_private::ModuleList::Notifier.
Definition at line 1855 of file Target.cpp.
References ModulesDidUnload().
|
overrideprotectedvirtual |
Implements lldb_private::ModuleList::Notifier.
Definition at line 1843 of file Target.cpp.
References m_breakpoint_list, m_internal_breakpoint_list, and m_valid.
|
overrideprotectedvirtual |
Implements lldb_private::ModuleList::Notifier.
Definition at line 1821 of file Target.cpp.
References Target().
|
protected |
Definition at line 220 of file Target.cpp.
References AddBreakpoint(), AddBreakpointName(), lldb_private::BreakpointList::Breakpoints(), lldb_private::Breakpoint::CopyFromBreakpoint(), m_breakpoint_list, m_breakpoint_names, m_dummy_signals, m_frame_recognizer_manager_up, m_internal_stop_hooks, m_stop_hook_next_id, m_stop_hooks, and Target().
Print all the signals set in this target.
Definition at line 3963 of file Target.cpp.
References lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::Args::GetArgumentAtIndex(), lldb_private::Args::GetArgumentCount(), m_dummy_signals, and lldb_private::Stream::Printf().
Referenced by CommandObjectProcessHandle::DoExecute().
|
protected |
Definition at line 931 of file Target.cpp.
References m_process_sp.
Referenced by CreateWatchpoint(), DisableAllWatchpoints(), DisableWatchpointByID(), EnableAllWatchpoints(), EnableWatchpointByID(), IgnoreAllWatchpoints(), IgnoreWatchpointByID(), ReadMemory(), and RemoveAllWatchpoints().
| size_t Target::ReadCStringFromMemory | ( | const Address & | addr, |
| char * | dst, | ||
| size_t | dst_max_len, | ||
| Status & | result_error, | ||
| bool | force_live_memory = false ) |
Definition at line 2153 of file Target.cpp.
References lldb_private::Status::Clear(), error(), lldb_private::Status::FromErrorString(), lldb_private::Address::GetLoadAddress(), and ReadMemory().
| size_t Target::ReadCStringFromMemory | ( | const Address & | addr, |
| std::string & | out_str, | ||
| Status & | error, | ||
| bool | force_live_memory = false ) |
Definition at line 2130 of file Target.cpp.
References error(), lldb_private::Address::GetLoadAddress(), and ReadCStringFromMemory().
Referenced by CommandObjectMemoryRead::DoExecute(), ReadCStringFromMemory(), and lldb_private::InstrumentationRuntimeMainThreadChecker::RetrieveReportData().
| llvm::Expected< lldb::DisassemblerSP > Target::ReadInstructions | ( | const Address & | start_addr, |
| uint32_t | count, | ||
| const char * | flavor_string = nullptr ) |
Definition at line 3011 of file Target.cpp.
References lldb_private::Disassembler::DisassembleBytes(), error(), GetArchitecture(), lldb_private::WritableDataBuffer::GetBytes(), lldb_private::DataBufferHeap::GetByteSize(), lldb_private::TargetProperties::GetDisassemblyCPU(), lldb_private::TargetProperties::GetDisassemblyFeatures(), lldb_private::TargetProperties::GetDisassemblyFlavor(), lldb_private::Address::GetLoadAddress(), lldb_private::ArchSpec::GetTriple(), LLDB_INVALID_ADDRESS, and ReadMemory().
Referenced by lldb_private::BreakpointResolver::AddLocation().
|
virtual |
Definition at line 2004 of file Target.cpp.
References error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::Status::FromErrorStringWithFormatv(), lldb_private::Address::GetFileAddress(), lldb_private::Address::GetLoadAddress(), lldb_private::Address::GetModule(), lldb_private::Address::GetOffset(), lldb_private::Address::GetSection(), GetSectionLoadList(), lldb_private::SectionLoadList::IsEmpty(), lldb_private::Address::IsSectionOffset(), lldb_private::Address::IsValid(), LLDB_INVALID_ADDRESS, m_images, m_process_sp, ProcessIsValid(), ReadMemoryFromFileCache(), lldb_private::SectionLoadList::ResolveLoadAddress(), and lldb_private::Address::SetLoadAddress().
Referenced by lldb_private::Disassembler::AppendInstructions(), CommandObjectMemoryRead::DoExecute(), lldb_private::DWARFExpression::Evaluate(), Evaluate_DW_OP_deref_size(), UnwindAssembly_x86::FirstNonPrologueInsn(), UnwindAssembly_x86::GetFastUnwindPlan(), lldb_private::ValueObject::GetPointeeData(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::Value::GetValueAsData(), ReadCStringFromMemory(), ReadInstructions(), ReadScalarIntegerFromMemory(), ReadStringFromMemory(), and EmulateInstructionMIPS::SetInstruction().
| size_t Target::ReadMemoryFromFileCache | ( | const Address & | addr, |
| void * | dst, | ||
| size_t | dst_len, | ||
| Status & | error ) |
Definition at line 1970 of file Target.cpp.
References error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::Address::GetOffset(), lldb_private::Address::GetSection(), and lldb_private::ObjectFile::ReadSectionData().
Referenced by lldb_private::ProcessTrace::DoReadMemory(), and ReadMemory().
| bool Target::ReadPointerFromMemory | ( | const Address & | addr, |
| Status & | error, | ||
| Address & | pointer_addr, | ||
| bool | force_live_memory = false ) |
Definition at line 2322 of file Target.cpp.
References error(), GetSectionLoadList(), lldb_private::SectionLoadList::IsEmpty(), lldb_private::Address::IsValid(), LLDB_INVALID_ADDRESS, m_arch, m_images, ReadScalarIntegerFromMemory(), lldb_private::SectionLoadList::ResolveLoadAddress(), lldb_private::Address::SetOffset(), and lldb_private::Scalar::ULongLong().
Referenced by ObjectFileELF::GetImageInfoAddress().
| size_t Target::ReadScalarIntegerFromMemory | ( | const Address & | addr, |
| uint32_t | byte_size, | ||
| bool | is_signed, | ||
| Scalar & | scalar, | ||
| Status & | error, | ||
| bool | force_live_memory = false ) |
Definition at line 2269 of file Target.cpp.
References error(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::DataExtractor::GetMaxU32(), lldb_private::DataExtractor::GetMaxU64(), m_arch, lldb_private::Scalar::MakeSigned(), ReadMemory(), and lldb_private::Scalar::SignExtend().
Referenced by ReadPointerFromMemory(), ReadSignedIntegerFromMemory(), and ReadUnsignedIntegerFromMemory().
| int64_t Target::ReadSignedIntegerFromMemory | ( | const Address & | addr, |
| size_t | integer_byte_size, | ||
| int64_t | fail_value, | ||
| Status & | error, | ||
| bool | force_live_memory = false ) |
Definition at line 2300 of file Target.cpp.
References error(), ReadScalarIntegerFromMemory(), and lldb_private::Scalar::SLongLong().
Referenced by lldb_private::ItaniumABIRuntime::GetDynamicTypeAndAddress().
| size_t Target::ReadStringFromMemory | ( | const Address & | addr, |
| char * | dst, | ||
| size_t | max_bytes, | ||
| Status & | error, | ||
| size_t | type_width, | ||
| bool | force_live_memory = true ) |
Read a NULL terminated string from memory.
This function will read a cache page at a time until a NULL string terminator is found. It will stop reading if an aligned sequence of NULL termination type_width bytes is not found before reading cstr_max_len bytes. The results are always guaranteed to be NULL terminated, and that no more than (max_bytes - type_width) bytes will be read.
| [in] | addr | The address to start the memory read. |
| [in] | dst | A character buffer containing at least max_bytes. |
| [in] | max_bytes | The maximum number of bytes to read. |
| [in] | error | The error status of the read operation. |
| [in] | type_width | The size of the null terminator (1 to 4 bytes per character). Defaults to 1. |
Definition at line 2220 of file Target.cpp.
References error(), GetReasonableReadSize(), ReadMemory(), and lldb_private::Address::Slide().
| uint64_t Target::ReadUnsignedIntegerFromMemory | ( | const Address & | addr, |
| size_t | integer_byte_size, | ||
| uint64_t | fail_value, | ||
| Status & | error, | ||
| bool | force_live_memory = false ) |
Definition at line 2311 of file Target.cpp.
References error(), ReadScalarIntegerFromMemory(), and lldb_private::Scalar::ULongLong().
Referenced by DYLDRendezvous::FindMetadata(), and ObjectFileELF::GetImageInfoAddress().
| void lldb_private::Target::RegisterInternalStopHooks | ( | ) |
| void Target::RemoveAllBreakpoints | ( | bool | internal_also = false | ) |
Definition at line 1061 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, m_internal_breakpoint_list, and m_last_created_breakpoint.
| void Target::RemoveAllowedBreakpoints | ( | ) |
Definition at line 1052 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, and m_last_created_breakpoint.
Referenced by CommandObjectBreakpointDelete::DoExecute().
| void Target::RemoveAllStopHooks | ( | ) |
Definition at line 3082 of file Target.cpp.
References m_stop_hooks.
Definition at line 1327 of file Target.cpp.
References lldb_private::Status::Fail(), lldb_private::GetLog(), LLDB_LOGF, m_last_created_watchpoint, m_process_sp, m_watchpoint_list, ProcessIsValid(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointDelete::DoExecute().
| bool Target::RemoveBreakpointByID | ( | lldb::break_id_t | break_id | ) |
Definition at line 1107 of file Target.cpp.
References lldb_private::Breakpoints, DisableBreakpointByID(), lldb_private::GetLog(), LLDB_BREAK_ID_IS_INTERNAL, LLDB_LOGF, m_breakpoint_list, m_internal_breakpoint_list, and m_last_created_breakpoint.
Referenced by lldb_private::ThreadPlanStepUntil::Clear(), lldb_private::ThreadPlanStepRange::ClearNextBranchBreakpoint(), CopyOverBreakpointOptions(), CommandObjectBreakpointAddException::DoExecute(), CommandObjectBreakpointAddScripted::DoExecute(), CommandObjectBreakpointClear::DoExecute(), CommandObjectBreakpointDelete::DoExecute(), CommandObjectBreakpointSet::DoExecute(), lldb_private::ThreadPlanRunToAddress::MischiefManaged(), lldb_private::ThreadPlanStepOut::MischiefManaged(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), lldb_private::AppleThreadPlanStepThroughDirectDispatch::~AppleThreadPlanStepThroughDirectDispatch(), lldb_private::ThreadPlanRunToAddress::~ThreadPlanRunToAddress(), and lldb_private::ThreadPlanStepOut::~ThreadPlanStepOut().
| void Target::RemoveNameFromBreakpoint | ( | lldb::BreakpointSP & | bp_sp, |
| ConstString | name ) |
Definition at line 896 of file Target.cpp.
References lldb_private::ConstString::AsCString().
Referenced by CommandObjectBreakpointNameDelete::DoExecute().
| bool Target::RemoveScriptedFrameProviderDescriptor | ( | uint32_t | id | ) |
Remove a scripted frame provider descriptor by id.
| [in] | id | The id of the descriptor to remove. |
Definition at line 3745 of file Target.cpp.
References InvalidateThreadFrameProviders(), m_frame_provider_descriptors, and m_frame_provider_descriptors_mutex.
Referenced by CommandObjectTargetFrameProviderRemove::DoExecute().
| bool Target::RemoveStopHookByID | ( | lldb::user_id_t | uid | ) |
Definition at line 3077 of file Target.cpp.
References m_stop_hooks.
Referenced by UndoCreateStopHook().
| bool Target::RemoveWatchpointByID | ( | lldb::watch_id_t | watch_id | ) |
Definition at line 1493 of file Target.cpp.
References DisableWatchpointByID(), lldb_private::GetLog(), LLDB_LOGF, m_last_created_watchpoint, m_watchpoint_list, and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointDelete::DoExecute().
| llvm::json::Value Target::ReportStatistics | ( | const lldb_private::StatisticsOptions & | options | ) |
Get metrics associated with this target in JSON format.
Target metrics help measure timings and information that is contained in a target. These are designed to help measure performance of a debug session as well as represent the current state of the target, like information on the currently modules, currently set breakpoints and more.
Definition at line 5339 of file Target.cpp.
References m_stats.
| void Target::ResetBreakpointHitCounts | ( | ) |
Resets the hit count of all breakpoints.
Definition at line 1164 of file Target.cpp.
References GetBreakpointList(), and lldb_private::BreakpointList::ResetHitCounts().
Referenced by CleanupProcess().
|
staticprotected |
Definition at line 3911 of file Target.cpp.
References lldb_private::eLazyBoolCalculate, and LLDB_INVALID_SIGNAL_NUMBER.
Referenced by ClearDummySignals().
| void Target::ResetStatistics | ( | ) |
Definition at line 5343 of file Target.cpp.
References m_stats.
Referenced by lldb_private::DebuggerStats::ResetStatistics().
| bool Target::ResolveFileAddress | ( | lldb::addr_t | load_addr, |
| Address & | so_addr ) |
Definition at line 3328 of file Target.cpp.
References m_images.
Referenced by lldb_private::ArchitectureMips::GetBreakableLoadAddress().
| bool Target::ResolveLoadAddress | ( | lldb::addr_t | load_addr, |
| Address & | so_addr, | ||
| uint32_t | stop_id = SectionLoadHistory::eStopIDNow, | ||
| bool | allow_section_end = false ) |
Definition at line 3322 of file Target.cpp.
References m_section_load_history.
Referenced by lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), lldb_private::ProcessTrace::DoReadMemory(), CommandObjectMemoryRegion::DumpRegion(), CommandObjectRegisterRead::DumpRegister(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb::SBBreakpoint::FindLocationByAddress(), lldb::SBBreakpoint::FindLocationIDByAddress(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), lldb_private::IndirectCallEdge::GetCallee(), lldb_private::CommandObjectDisassemble::GetContainingAddressRanges(), getModuleFileSize(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), CommandObjectSourceInfo::GetSymbolContextsForAddress(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::Value::GetValueAsData(), lldb_private::ItaniumABIRuntime::GetVTableInfo(), line_entry_helper(), LookupAddressInModule(), ReadAddress(), ResolveAddress(), lldb_private::Address::SetLoadAddress(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and DisassemblerLLVMC::SymbolLookup().
Definition at line 3129 of file Target.cpp.
References lldb_private::Target::StopHook::AlreadyContinued, lldb::eDescriptionLevelBrief, error(), lldb::eStateAttaching, lldb::eStateStopped, lldb_private::StreamString::GetData(), lldb_private::GetLog(), lldb_private::StreamString::GetSize(), lldb_private::ThreadList::GetSize(), lldb_private::ThreadList::GetThreadAtIndex(), lldb_private::Target::StopHook::KeepStopped, LLDB_LOG, m_debugger, m_internal_stop_hooks, m_latest_stop_hook_id, m_process_sp, m_stop_hooks, m_suppress_stop_hooks, lldb_private::Target::StopHook::NoPreference, lldb_private::Process, and lldb_private::Target::StopHook::RequestContinue.
Referenced by Attach(), lldb_private::Process::CompleteAttach(), Launch(), and lldb_private::Process::LoadCore().
| void Target::SaveScriptedLaunchInfo | ( | lldb_private::ProcessInfo & | process_info | ) |
Definition at line 3416 of file Target.cpp.
References GetGlobalProperties(), lldb_private::TargetProperties::GetProcessLaunchInfo(), lldb_private::ProcessInfo::GetScriptedMetadata(), lldb_private::ProcessInfo::IsScriptedProcess(), lldb_private::TargetProperties::SetProcessLaunchInfo(), lldb_private::ProcessLaunchInfo::SetProcessPluginName(), and lldb_private::ProcessInfo::SetScriptedMetadata().
| Status Target::SerializeBreakpointsToFile | ( | const FileSpec & | file, |
| const BreakpointIDList & | bp_ids, | ||
| bool | append ) |
Definition at line 1168 of file Target.cpp.
References lldb_private::StructuredData::Array::AddItem(), lldb_private::StructuredData::Object::Dump(), lldb_private::File::eOpenOptionCanCreate, lldb_private::File::eOpenOptionCloseOnExec, lldb_private::File::eOpenOptionTruncate, lldb_private::File::eOpenOptionWriteOnly, error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::BreakpointList::GetBreakpointAtIndex(), GetBreakpointByID(), lldb_private::BreakpointID::GetBreakpointID(), lldb_private::BreakpointIDList::GetBreakpointIDAtIndex(), GetBreakpointList(), lldb_private::StreamFile::GetFile(), lldb_private::BreakpointList::GetListMutex(), lldb_private::FileSpec::GetPath(), lldb_private::BreakpointIDList::GetSize(), lldb_private::BreakpointList::GetSize(), lldb_private::File::IsValid(), LLDB_INVALID_BREAK_ID, lldb_private::StructuredData::ParseJSONFromFile(), lldb_private::Stream::PutChar(), and lldb_private::Breakpoint::SerializeToStructuredData().
Referenced by CommandObjectBreakpointWrite::DoExecute().
| void Target::SetAllStopHooksActiveState | ( | bool | active_state | ) |
Definition at line 3105 of file Target.cpp.
References m_stop_hooks.
Referenced by CommandObjectTargetStopHookEnableDisable::DoExecute().
| bool Target::SetArchitecture | ( | const ArchSpec & | arch_spec, |
| bool | set_platform = false, | ||
| bool | merge = true ) |
Set the architecture for this target.
If the current target has no Images read in, then this just sets the architecture, which will be used to select the architecture of the ExecutableModule when that is set. If the current target has an ExecutableModule, then calling SetArchitecture with a different architecture from the currently selected one will reset the ExecutableModule to that slice of the file backing the ExecutableModule. If the file backing the ExecutableModule does not contain a fork of this architecture, then this code will return false, and the architecture won't be changed. If the input arch_spec is the same as the already set architecture, this is a no-op.
| [in] | arch_spec | The new architecture. |
| [in] | set_platform | If true, then the platform will be adjusted if the currently selected platform is not compatible with the architecture being set. If false, then just the architecture will be set even if the currently selected platform isn't compatible (in case it might be manually set following this function call). |
| [in] | merged | If true, arch_spec is merged with the current architecture. Otherwise it's replaced. |
Definition at line 1705 of file Target.cpp.
References ClearModules(), lldb_private::ArchSpec::CompatibleMatch, lldb_private::eLoadDependentsYes, error(), lldb_private::ArchSpec::GetArchitectureName(), GetDebugger(), GetExecutableModule(), lldb_private::GetLog(), GetPlatform(), lldb_private::ModuleList::GetSharedModule(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsValid(), LLDB_LOG, LLDB_LOGF, m_arch, lldb_private::ArchSpec::MergeFrom(), SetExecutableModule(), SetPlatform(), lldb_private::ModuleSpec::SetTarget(), and lldb_private::Target.
Referenced by DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), ProcessElfCore::DoLoadCore(), ProcessMachCore::DoLoadCore(), ProcessMachCore::LoadBinariesViaExhaustiveSearch(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), MergeArchitecture(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::ReadMemoryModule(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules().
|
static |
Definition at line 2811 of file Target.cpp.
References lldb_private::ArchSpec::GetArchitectureName(), GetGlobalProperties(), lldb_private::GetLog(), lldb_private::ArchSpec::GetTriple(), LLDB_LOG, lldb_private::TargetProperties::SetDefaultArchitecture(), and lldb_private::Target.
Referenced by lldb::SBDebugger::SetDefaultArchitecture().
| 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.
| [in] | module_sp | A shared pointer reference to the module that will become the main executable for this process. |
| [in] | load_dependent_files | If true then ask the object files to track down any known dependent files. |
Definition at line 1576 of file Target.cpp.
References lldb_private::ModuleList::AppendIfNeeded(), lldb_private::FileSpecList::AppendIfUnique(), ClearModules(), lldb_private::telemetry::ScopedDispatcher< Info >::DispatchNow(), lldb_private::telemetry::ScopedDispatcher< Info >::DispatchOnExit(), elapsed(), lldb_private::eLoadDependentsDefault, lldb_private::eLoadDependentsNo, lldb_private::eLoadDependentsYes, lldb_private::telemetry::ExecutableModuleInfo::exec_mod, lldb_private::ObjectFile::GetDependentModules(), lldb_private::FileSpecList::GetFileSpecAtIndex(), lldb_private::GetLog(), GetOrCreateModule(), GetProcessSP(), lldb_private::FileSpecList::GetSize(), lldb_private::Debugger::GetThreadPool(), lldb_private::telemetry::ExecutableModuleInfo::is_start_entry, LLDB_INVALID_PROCESS_ID, LLDB_LOG, LLDB_SCOPED_TIMERF, m_arch, m_debugger, m_images, m_platform_sp, m_stats, ModulesDidLoad(), lldb_private::telemetry::ExecutableModuleInfo::pid, lldb_private::Target, lldb_private::telemetry::ExecutableModuleInfo::triple, and lldb_private::telemetry::ExecutableModuleInfo::uuid.
Referenced by lldb_private::Process::CompleteAttach(), ProcessKDP::DoConnectRemote(), ProcessElfCore::DoLoadCore(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::DynamicLoader::GetTargetExecutable(), ImageSearchPathsChanged(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::ProcessWindows::OnDebuggerConnected(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), SetArchitecture(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromPreloadedModules().
| llvm::Error Target::SetLabel | ( | llvm::StringRef | label | ) |
Set a label for a target.
The label cannot be used by another target or be only integral.
Definition at line 2818 of file Target.cpp.
References GetDebugger(), lldb_private::TargetList::GetNumTargets(), lldb_private::TargetList::GetTargetAtIndex(), lldb_private::Debugger::GetTargetList(), LLDB_INVALID_INDEX32, m_label, and TargetList.
|
inline |
Definition at line 1680 of file Target.h.
References m_platform_sp.
Referenced by Attach(), lldb_private::Process::CompleteAttach(), DynamicLoaderDarwinKernel::DynamicLoaderDarwinKernel(), and SetArchitecture().
| void Target::SetREPL | ( | lldb::LanguageType | language, |
| lldb::REPLSP | repl_sp ) |
Definition at line 366 of file Target.cpp.
References lldbassert, and m_repl_map.
Referenced by lldb_private::ClangREPL::CreateInstance().
| bool Target::SetSectionLoadAddress | ( | const lldb::SectionSP & | section, |
| lldb::addr_t | load_addr, | ||
| bool | warn_multiple = false ) |
Definition at line 3333 of file Target.cpp.
References lldb_private::SectionLoadHistory::eStopIDNow, GetProcessSP(), and m_section_load_history.
Referenced by CommandObjectTargetModulesLoad::DoExecute(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), lldb_private::ObjectFileJIT::SetLoadAddress(), lldb_private::ObjectFileJSON::SetLoadAddress(), lldb_private::wasm::ObjectFileWasm::SetLoadAddress(), ObjectFileELF::SetLoadAddress(), ObjectFileMachO::SetLoadAddress(), ObjectFilePECOFF::SetLoadAddress(), ObjectFilePlaceholder::SetLoadAddress(), DynamicLoaderHexagonDYLD::UpdateLoadedSections(), and updateSectionLoadAddress().
| bool Target::SetSectionUnloaded | ( | const lldb::SectionSP & | section_sp | ) |
Definition at line 3382 of file Target.cpp.
References GetProcessSP(), and m_section_load_history.
Referenced by JITLoaderGDB::ReadJITDescriptorImpl(), DynamicLoaderHexagonDYLD::UnloadSections(), and lldb_private::DynamicLoader::UnloadSectionsCommon().
| bool Target::SetSectionUnloaded | ( | const lldb::SectionSP & | section_sp, |
| lldb::addr_t | load_addr ) |
Definition at line 3392 of file Target.cpp.
References GetProcessSP(), and m_section_load_history.
| bool Target::SetStopHookActiveStateByID | ( | lldb::user_id_t | uid, |
| bool | active_state ) |
Definition at line 3094 of file Target.cpp.
References m_stop_hooks.
Referenced by CommandObjectTargetStopHookEnableDisable::DoExecute().
Definition at line 1658 of file Target.h.
References m_suppress_stop_hooks.
|
inline |
Set the target session name for this target.
This should typically be set along with the event eBroadcastBitNewTargetCreated. Useful for scripts or triggers that automatically create targets and want to provide meaningful names that IDEs or other tools can display to help users identify the origin and purpose of each target.
| [in] | target_session_name | The target session name to set for this target. |
Definition at line 687 of file Target.h.
References m_target_session_name.
|
static |
Definition at line 2795 of file Target.cpp.
References lldb_private::Process::SettingsInitialize().
Referenced by lldb_private::Debugger::SettingsInitialize().
|
static |
Definition at line 2797 of file Target.cpp.
References lldb_private::Process::SettingsTerminate().
Referenced by lldb_private::Debugger::SettingsTerminate().
| void Target::SetTrace | ( | const lldb::TraceSP & | trace_sp | ) |
Set the Trace object containing processor trace information of this target.
| [in] | trace_sp | The trace object. |
Definition at line 3595 of file Target.cpp.
References m_trace_sp.
Referenced by lldb_private::trace_intel_pt::TraceIntelPT::CreateInstanceForLiveProcess().
| void Target::SymbolsDidLoad | ( | ModuleList & | module_list | ) |
Definition at line 1882 of file Target.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), eBroadcastBitSymbolsLoaded, lldb_private::ModuleList::GetSize(), m_breakpoint_list, m_internal_breakpoint_list, m_process_sp, and m_valid.
Referenced by CommandObjectTargetSymbolsAdd::AddModuleSymbols().
| 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 3070 of file Target.cpp.
References m_stop_hook_next_id, and RemoveStopHookByID().
| size_t Target::UnloadModuleSections | ( | const lldb::ModuleSP & | module_sp | ) |
Definition at line 3363 of file Target.cpp.
References lldb_private::SectionList::GetNumSections(), GetProcessSP(), lldb_private::SectionList::GetSectionAtIndex(), and m_section_load_history.
Referenced by ModulesDidUnload(), and UnloadModuleSections().
| size_t Target::UnloadModuleSections | ( | const ModuleList & | module_list | ) |
Definition at line 3353 of file Target.cpp.
References lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetSize(), and UnloadModuleSections().
|
staticprotected |
Definition at line 3884 of file Target.cpp.
References lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, and LLDB_INVALID_SIGNAL_NUMBER.
Referenced by UpdateSignalsFromDummy().
| void Target::UpdateSignalsFromDummy | ( | lldb::UnixSignalsSP | signals_sp, |
| lldb::StreamSP | warning_stream_sp ) |
Updates the signals in signals_sp using the stored dummy signals.
If warning_stream_sp is not null, if any stored signals are not found in the current process, a warning will be emitted here.
Definition at line 3926 of file Target.cpp.
References m_dummy_signals, and UpdateSignalFromDummy().
Referenced by lldb_private::Process::CompleteAttach(), and lldb_private::Process::LaunchPrivate().
|
friend |
Definition at line 555 of file Target.h.
References Debugger.
Referenced by Debugger, GetDebugger(), GetREPL(), lldb_private::Target::StopHookCommandLine::HandleStop(), Launch(), and Target().
|
friend |
Definition at line 554 of file Target.h.
References TargetList.
Referenced by SetLabel(), and TargetList.
|
protected |
Definition at line 1785 of file Target.h.
Referenced by Destroy(), DidExec(), GetArchitecture(), GetArchitecturePlugin(), MergeArchitecture(), ReadPointerFromMemory(), ReadScalarIntegerFromMemory(), SetArchitecture(), SetExecutableModule(), and Target().
|
protected |
Definition at line 1791 of file Target.h.
Referenced by AddBreakpoint(), AddNameToBreakpoint(), ApplyNameToBreakpoints(), CleanupProcess(), DeleteBreakpointName(), Destroy(), DidExec(), DisableAllBreakpoints(), DisableAllowedBreakpoints(), DisableBreakpointByID(), Dump(), EnableAllBreakpoints(), EnableAllowedBreakpoints(), EnableBreakpointByID(), GetBreakpointByID(), GetBreakpointList(), GetBreakpointList(), ModulesDidLoad(), ModulesDidUnload(), NotifyModuleUpdated(), PrimeFromDummyTarget(), RemoveAllBreakpoints(), RemoveAllowedBreakpoints(), RemoveBreakpointByID(), SymbolsDidLoad(), and Target().
|
protected |
Definition at line 1795 of file Target.h.
Referenced by AddBreakpointName(), DeleteBreakpointName(), FindBreakpointName(), GetBreakpointNames(), and PrimeFromDummyTarget().
|
protected |
Definition at line 1775 of file Target.h.
Referenced by GetDebugger(), GetREPL(), RunStopHooks(), SetExecutableModule(), and Target().
|
protected |
These are used to set the signal state when you don't have a process and more usefully in the Dummy target where you can't know exactly what signals you will have.
Definition at line 1844 of file Target.h.
Referenced by AddDummySignal(), ClearDummySignals(), PrimeFromDummyTarget(), PrintDummySignals(), and UpdateSignalsFromDummy().
|
protected |
Map of scripted frame provider descriptors for this target.
Keys are the provider descriptors ids, values are the descriptors. Used to initialize frame providers for new threads.
Definition at line 1812 of file Target.h.
Referenced by AddScriptedFrameProviderDescriptor(), ClearScriptedFrameProviderDescriptors(), GetScriptedFrameProviderDescriptors(), and RemoveScriptedFrameProviderDescriptor().
|
mutableprotected |
Definition at line 1813 of file Target.h.
Referenced by AddScriptedFrameProviderDescriptor(), ClearScriptedFrameProviderDescriptors(), GetScriptedFrameProviderDescriptors(), and RemoveScriptedFrameProviderDescriptor().
|
protected |
Stores the frame recognizers of this target.
Definition at line 1840 of file Target.h.
Referenced by GetFrameRecognizerManager(), PrimeFromDummyTarget(), and Target().
|
protected |
Definition at line 1805 of file Target.h.
Referenced by Destroy(), GetImageSearchPathList(), GetOrCreateModule(), and Target().
|
protected |
The list of images for this process (shared libraries and anything dynamically loaded).
Definition at line 1787 of file Target.h.
Referenced by ClearModules(), Dump(), GetExecutableModule(), GetImages(), GetImages(), GetOrCreateModule(), LoadScriptingResources(), ReadMemory(), ReadPointerFromMemory(), ResolveFileAddress(), SetExecutableModule(), and Target().
|
protected |
Definition at line 1792 of file Target.h.
Referenced by AddBreakpoint(), CleanupProcess(), Destroy(), DidExec(), DisableAllBreakpoints(), DisableBreakpointByID(), Dump(), EnableAllBreakpoints(), EnableBreakpointByID(), GetBreakpointByID(), GetBreakpointList(), GetBreakpointList(), ModulesDidLoad(), ModulesDidUnload(), NotifyModuleUpdated(), RemoveAllBreakpoints(), RemoveBreakpointByID(), SymbolsDidLoad(), and Target().
|
protected |
Definition at line 1823 of file Target.h.
Referenced by CreateStopHook(), Destroy(), GetStopHooks(), PrimeFromDummyTarget(), RunStopHooks(), and Target().
|
protected |
Used to not run stop hooks for expressions.
Definition at line 1828 of file Target.h.
Referenced by IsDummyTarget(), and Target().
|
protected |
Definition at line 1786 of file Target.h.
Referenced by GetLabel(), and SetLabel().
|
protected |
Definition at line 1797 of file Target.h.
Referenced by AddBreakpoint(), Destroy(), GetLastCreatedBreakpoint(), RemoveAllBreakpoints(), RemoveAllowedBreakpoints(), and RemoveBreakpointByID().
|
protected |
Definition at line 1799 of file Target.h.
Referenced by CreateWatchpoint(), Destroy(), GetLastCreatedWatchpoint(), RemoveAllWatchpoints(), and RemoveWatchpointByID().
|
protected |
Definition at line 1824 of file Target.h.
Referenced by CleanupProcess(), RunStopHooks(), and Target().
|
protected |
An API mutex that is used by the lldb::SB* classes make the SB interface thread safe.
Definition at line 1777 of file Target.h.
Referenced by Destroy(), GetAPIMutex(), and Target().
|
protected |
|
protected |
The platform for this target.
Definition at line 1776 of file Target.h.
Referenced by Destroy(), FinalizeFileActions(), GetOrCreateModule(), GetPlatform(), ModuleIsExcludedForUnconstrainedSearches(), SetExecutableModule(), SetPlatform(), and Target().
|
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 1784 of file Target.h.
Referenced by GetAPIMutex().
|
protected |
Definition at line 1803 of file Target.h.
Referenced by CalculateProcess(), CreateProcess(), CreateTrace(), CreateWatchpoint(), DeleteCurrentProcess(), DisableAllWatchpoints(), DisableWatchpointByID(), EnableAllWatchpoints(), EnableWatchpointByID(), EvaluateExpression(), GetABIName(), GetOrCreateModule(), GetProcessSP(), GetReasonableReadSize(), Launch(), ModulesDidLoad(), ProcessIsValid(), ReadMemory(), RemoveAllWatchpoints(), RunStopHooks(), SymbolsDidLoad(), and Target().
|
protected |
|
protected |
Definition at line 1806 of file Target.h.
Referenced by ClearModules(), GetPersistentSymbol(), GetPersistentVariable(), GetScratchTypeSystemForLanguage(), and ModulesDidUnload().
|
protected |
Definition at line 1804 of file Target.h.
Referenced by Destroy(), GetSearchFilterForModule(), GetSearchFilterForModuleList(), and Target().
|
protected |
Definition at line 1790 of file Target.h.
Referenced by ClearAllLoadedSections(), ClearModules(), DeleteCurrentProcess(), Destroy(), GetSectionLoadList(), ResolveLoadAddress(), SetSectionLoadAddress(), SetSectionUnloaded(), SetSectionUnloaded(), Target(), and UnloadModuleSections().
|
protected |
Definition at line 1818 of file Target.h.
Referenced by GetSourceManager(), and Target().
|
private |
Definition at line 1852 of file Target.h.
Referenced by Attach(), EvaluateExpression(), GetStatistics(), Launch(), ReportStatistics(), ResetStatistics(), and SetExecutableModule().
|
protected |
Definition at line 1822 of file Target.h.
Referenced by CreateStopHook(), Destroy(), PrimeFromDummyTarget(), Target(), and UndoCreateStopHook().
|
protected |
Definition at line 1821 of file Target.h.
Referenced by CreateStopHook(), Destroy(), GetStopHookByID(), GetStopHooks(), PrimeFromDummyTarget(), RemoveAllStopHooks(), RemoveStopHookByID(), RunStopHooks(), SetAllStopHooksActiveState(), SetStopHookActiveStateByID(), and Target().
|
protected |
Definition at line 1789 of file Target.h.
Referenced by GetSummaryStatisticsCache(), and GetSummaryStatisticsSPForProviderName().
|
protected |
Definition at line 1827 of file Target.h.
Referenced by Destroy(), EvaluateExpression(), GetSuppressStopHooks(), RunStopHooks(), SetSuppresStopHooks(), and Target().
|
protected |
The target session name for this target, used to name debugging sessions in DAP.
Definition at line 1833 of file Target.h.
Referenced by GetTargetSessionName(), SetTargetSessionName(), and Target().
|
protected |
The globally unique ID assigned to this target.
Definition at line 1830 of file Target.h.
Referenced by GetGloballyUniqueID(), and Target().
|
protected |
An optional lldb_private::Trace object containing processor trace information of this target.
Definition at line 1838 of file Target.h.
Referenced by CreateTrace(), DeleteCurrentProcess(), GetTrace(), GetTraceOrCreate(), and SetTrace().
|
protected |
This records the last natural stop at which we ran a stop-hook.
Definition at line 1826 of file Target.h.
Referenced by Destroy(), GetScratchTypeSystemForLanguage(), GetScratchTypeSystems(), IsValid(), ModulesDidLoad(), ModulesDidUnload(), NotifyModuleAdded(), NotifyModuleRemoved(), NotifyModuleUpdated(), SymbolsDidLoad(), and Target().
|
protected |
Definition at line 1798 of file Target.h.
Referenced by ClearAllWatchpointHistoricValues(), ClearAllWatchpointHitCounts(), CreateWatchpoint(), Destroy(), DisableAllWatchpoints(), DisableWatchpointByID(), EnableAllWatchpoints(), EnableWatchpointByID(), GetWatchpointList(), IgnoreAllWatchpoints(), IgnoreWatchpointByID(), RemoveAllWatchpoints(), RemoveWatchpointByID(), and Target().