LLDB mainline
|
#include <Target.h>
Classes | |
class | Arch |
struct | DummySignalValues |
Add a signal for the target. More... | |
class | StopHook |
class | StopHookCommandLine |
class | StopHookScripted |
class | TargetEventData |
Public Types | |
enum | { eBroadcastBitBreakpointChanged = (1 << 0) , eBroadcastBitModulesLoaded = (1 << 1) , eBroadcastBitModulesUnloaded = (1 << 2) , eBroadcastBitWatchpointChanged = (1 << 3) , eBroadcastBitSymbolsLoaded = (1 << 4) , eBroadcastBitSymbolsChanged = (1 << 5) } |
Broadcaster event bits definitions. More... | |
typedef std::shared_ptr< 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 |
const std::string & | GetLabel () const |
llvm::Error | SetLabel (llvm::StringRef label) |
Set a label for a target. | |
lldb::ModuleSP | GetOrCreateModule (const ModuleSpec &module_spec, bool notify, Status *error_ptr=nullptr) |
Find a binary on the system and return its Module, or return an existing Module that is already in the Target. | |
std::recursive_mutex & | GetAPIMutex () |
void | DeleteCurrentProcess () |
void | CleanupProcess () |
void | Dump (Stream *s, lldb::DescriptionLevel description_level) |
Dump a description of this object to a Stream. | |
const lldb::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) |
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, 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) |
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 () |
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) |
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) |
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) |
SectionLoadList & | GetSectionLoadList () |
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 | 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 () |
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) |
StopHookSP | CreateStopHook (StopHook::StopHookKind kind) |
Add an empty stop hook to the Target's stop hook list, and returns a shared pointer to it in new_hook. | |
void | UndoCreateStopHook (lldb::user_id_t uid) |
If you tried to create a stop hook, and that failed, call this to remove the stop hook, as it will also reset the stop hook counter. | |
bool | RunStopHooks () |
size_t | GetStopHookSize () |
bool | SetSuppresStopHooks (bool suppress) |
bool | GetSuppressStopHooks () |
bool | RemoveStopHookByID (lldb::user_id_t uid) |
void | RemoveAllStopHooks () |
StopHookSP | GetStopHookByID (lldb::user_id_t uid) |
bool | SetStopHookActiveStateByID (lldb::user_id_t uid, bool active_state) |
void | SetAllStopHooksActiveState (bool active_state) |
size_t | GetNumStopHooks () const |
StopHookSP | GetStopHookAtIndex (size_t index) |
lldb::PlatformSP | GetPlatform () |
void | SetPlatform (const lldb::PlatformSP &platform_sp) |
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. | |
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) |
const char * | GetDisassemblyFlavor () 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 |
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 () |
virtual 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. | |
virtual llvm::StringRef | GetBroadcasterClass () const |
This needs to be filled in if you are going to register the broadcaster with the broadcaster manager and do broadcaster class matching. | |
lldb::BroadcasterManagerSP | GetManager () |
void | SetPrimaryListener (lldb::ListenerSP listener_sp) |
lldb::ListenerSP | GetPrimaryListener () |
Public Member Functions inherited from lldb_private::ExecutionContextScope | |
virtual | ~ExecutionContextScope ()=default |
virtual lldb::TargetSP | CalculateTarget ()=0 |
virtual lldb::ProcessSP | CalculateProcess ()=0 |
virtual lldb::ThreadSP | CalculateThread ()=0 |
virtual lldb::StackFrameSP | CalculateStackFrame ()=0 |
virtual void | CalculateExecutionContext (ExecutionContext &exe_ctx)=0 |
Reconstruct the object's execution context into sc. | |
Public Member Functions inherited from lldb_private::ModuleList::Notifier | |
virtual | ~Notifier ()=default |
virtual void | NotifyModuleAdded (const ModuleList &module_list, const lldb::ModuleSP &module_sp)=0 |
virtual void | NotifyModuleRemoved (const ModuleList &module_list, const lldb::ModuleSP &module_sp)=0 |
virtual void | NotifyModuleUpdated (const ModuleList &module_list, const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp)=0 |
virtual void | NotifyWillClearList (const ModuleList &module_list)=0 |
virtual void | NotifyModulesRemoved (lldb_private::ModuleList &module_list)=0 |
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 = std::map< ConstString, std::unique_ptr< BreakpointName > > |
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 | 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 |
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). | |
SectionLoadHistory | m_section_load_history |
BreakpointList | m_breakpoint_list |
BreakpointList | m_internal_breakpoint_list |
BreakpointNameList | m_breakpoint_names |
lldb::BreakpointSP | m_last_created_breakpoint |
WatchpointList | m_watchpoint_list |
lldb::WatchpointSP | m_last_created_watchpoint |
lldb::ProcessSP | m_process_sp |
lldb::SearchFilterSP | m_search_filter_sp |
PathMappingList | m_image_search_paths |
TypeSystemMap | m_scratch_type_system_map |
REPLMap | m_repl_map |
lldb::SourceManagerUP | m_source_manager_up |
StopHookCollection | m_stop_hooks |
lldb::user_id_t | m_stop_hook_next_id |
uint32_t | m_latest_stop_hook_id |
bool | m_valid |
This records the last natural stop at which we ran a stop-hook. | |
bool | m_suppress_stop_hooks |
bool | m_is_dummy_target |
Used to not run stop hooks for expressions. | |
unsigned | m_next_persistent_variable_index = 0 |
lldb::TraceSP | m_trace_sp |
An optional lldb_private::Trace object containing processor trace information of this target. | |
lldb::StackFrameRecognizerManagerUP | m_frame_recognizer_manager_up |
Stores the frame recognizers of this target. | |
llvm::StringMap< 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.
Enumerator | |
---|---|
eBroadcastBitBreakpointChanged | |
eBroadcastBitModulesLoaded | |
eBroadcastBitModulesUnloaded | |
eBroadcastBitWatchpointChanged | |
eBroadcastBitSymbolsLoaded | |
eBroadcastBitSymbolsChanged |
|
override |
Definition at line 131 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 96 of file Target.cpp.
References lldb_private::Broadcaster::CheckInWithManager(), eBroadcastBitBreakpointChanged, eBroadcastBitModulesLoaded, eBroadcastBitModulesUnloaded, eBroadcastBitSymbolsLoaded, eBroadcastBitWatchpointChanged, lldb_private::ArchSpec::GetArchitectureName(), lldb_private::GetLog(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsValid(), LLDB_LOG, lldb_private::Object, lldb_private::Broadcaster::SetEventName(), lldb_private::Target, and lldb_private::TargetProperties::UpdateLaunchInfoFromProperties().
|
protecteddelete |
|
protected |
Definition at line 709 of file Target.cpp.
References lldb_private::BreakpointList::Add(), 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 758 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 3576 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 732 of file Target.cpp.
References AddNameToBreakpoint(), lldb::eDescriptionLevelBrief, error(), lldb_private::BreakpointList::FindBreakpointByID(), lldb_private::StreamString::GetData(), and m_breakpoint_list.
Referenced by AddNameToBreakpoint(), lldb_private::Breakpoint::CreateFromStructuredData(), CommandObjectBreakpointSet::DoExecute(), and CommandObjectBreakpointNameAdd::DoExecute().
void Target::AddNameToBreakpoint | ( | lldb::BreakpointSP & | bp_sp, |
llvm::StringRef | name, | ||
Status & | error | ||
) |
Definition at line 745 of file Target.cpp.
References lldb_private::BreakpointName::ConfigureBreakpoint(), error(), and FindBreakpointName().
void Target::ApplyNameToBreakpoints | ( | BreakpointName & | bp_name | ) |
Definition at line 810 of file Target.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::Breakpoints, lldb_private::BreakpointName::ConfigureBreakpoint(), lldb_private::BreakpointList::FindBreakpointsByName(), 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 3411 of file Target.cpp.
References lldb_private::Process::AttachSynchronousHijackListenerName, CreateProcess(), error(), lldb::eStateAttaching, lldb::eStateConnected, lldb::eStateInvalid, lldb::eStateStopped, 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(), SaveScriptedLaunchInfo(), SelectMostRelevantFrame, lldb_private::FileSpec::SetFilename(), lldb_private::ProcessInfo::SetHijackListener(), lldb_private::TargetStats::SetLaunchOrAttachTime(), 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 2406 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 2400 of file Target.cpp.
References m_process_sp.
Referenced by CommandObjectTargetModulesLoad::DoExecute().
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 2404 of file Target.cpp.
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 2398 of file Target.cpp.
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 2402 of file Target.cpp.
void Target::CleanupProcess | ( | ) |
Definition at line 178 of file Target.cpp.
References lldb_private::BreakpointList::ClearAllBreakpointSites(), 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 3195 of file Target.cpp.
References lldb_private::SectionLoadHistory::Clear(), and m_section_load_history.
Referenced by lldb_private::DynamicLoaderDarwin::PrivateInitialize().
bool Target::ClearAllWatchpointHistoricValues | ( | ) |
Definition at line 1321 of file Target.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, lldb_private::WatchpointList::Watchpoints(), and lldb_private::Watchpoints.
Referenced by CleanupProcess().
bool Target::ClearAllWatchpointHitCounts | ( | ) |
Definition at line 1307 of file Target.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, lldb_private::WatchpointList::Watchpoints(), 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 3645 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 1459 of file Target.cpp.
References lldb_private::ModuleList::Clear(), lldb_private::TypeSystemMap::Clear(), lldb_private::SectionLoadHistory::Clear(), 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::ConfigureBreakpointName | ( | BreakpointName & | bp_name, |
const BreakpointOptions & | options, | ||
const BreakpointName::Permissions & | permissions | ||
) |
Definition at line 802 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 484 of file Target.cpp.
References CreateBreakpoint().
Referenced by CommandObjectBreakpointSet::DoExecute().
BreakpointSP Target::CreateBreakpoint | ( | const Address & | addr, |
bool | internal, | ||
bool | request_hardware | ||
) |
Definition at line 474 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 396 of file Target.cpp.
References lldb_private::FileSpecList::Append(), CreateBreakpoint(), lldb_private::eInlineBreakpointsAlways, lldb_private::eInlineBreakpointsHeaders, lldb_private::eInlineBreakpointsNever, lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::TargetProperties::GetInlineStrategy(), lldb_private::TargetProperties::GetMoveToNearestCode(), GetSearchFilterForModuleAndCUList(), GetSearchFilterForModuleList(), lldb_private::TargetProperties::GetSkipPrologue(), lldb_private::TargetProperties::GetSourcePathMap(), lldb_private::FileSpec::IsSourceImplementationFile(), and lldb_private::PathMappingList::ReverseRemapPath().
Referenced by lldb_private::InstrumentationRuntimeMainThreadChecker::Activate(), lldb_private::InstrumentationRuntimeTSan::Activate(), lldb_private::InstrumentationRuntimeUBSan::Activate(), lldb_private::StructuredDataDarwinLog::AddInitCompletionHook(), lldb_private::AppleThreadPlanStepThroughDirectDispatch::AppleThreadPlanStepThroughDirectDispatch(), CreateAddressInModuleBreakpoint(), CreateBreakpoint(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionBreakpoint(), lldb_private::LanguageRuntime::CreateExceptionBreakpoint(), lldb_private::Breakpoint::CreateFromStructuredData(), CreateFuncRegexBreakpoint(), CreateScriptedBreakpoint(), CreateSourceRegexBreakpoint(), CommandObjectBreakpointSet::DoExecute(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::InitializeVTableSymbols(), DynamicLoaderPOSIXDYLD::ProbeEntry(), DynamicLoaderMacOS::SetDYLDHandoverBreakpoint(), lldb_private::ThreadPlanRunToAddress::SetInitialBreakpoints(), JITLoaderGDB::SetJITBreakpoint(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), DynamicLoaderMacOS::SetNotificationBreakpoint(), DynamicLoaderMacOSXDYLD::SetNotificationBreakpoint(), DynamicLoaderDarwinKernel::SetNotificationBreakpointIfNeeded(), DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), lldb_private::PlatformDarwin::SetThreadCreationBreakpoint(), lldb_private::ReportRetriever::SetupBreakpoint(), lldb_private::ThreadPlanStepOut::ThreadPlanStepOut(), and lldb_private::ThreadPlanStepThrough::ThreadPlanStepThrough().
lldb::BreakpointSP lldb_private::Target::CreateBreakpoint | ( | const FileSpecList * | containingModules, |
const FileSpecList * | containingSourceFiles, | ||
const char * | func_name, | ||
lldb::FunctionNameType | func_name_type_mask, | ||
lldb::LanguageType | language, | ||
lldb::addr_t | offset, | ||
LazyBool | skip_prologue, | ||
bool | internal, | ||
bool | request_hardware | ||
) |
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 | ||
) |
BreakpointSP Target::CreateBreakpoint | ( | lldb::addr_t | load_addr, |
bool | internal, | ||
bool | request_hardware | ||
) |
Definition at line 454 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 694 of file Target.cpp.
References AddBreakpoint(), and lldb_private::TargetProperties::GetRequireHardwareBreakpoints().
lldb::BreakpointSP lldb_private::Target::CreateBreakpointAtUserEntry | ( | Status & | error | ) |
Status Target::CreateBreakpointsFromFile | ( | const FileSpec & | file, |
BreakpointIDList & | new_bps | ||
) |
Definition at line 1158 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 1164 of file Target.cpp.
References lldb_private::BreakpointIDList::AddBreakpointID(), lldb_private::Breakpoint::CreateFromStructuredData(), error(), lldb_private::StructuredData::Object::GetAsArray(), lldb_private::StructuredData::Object::GetAsDictionary(), 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 647 of file Target.cpp.
References lldb_private::LanguageRuntime::CreateExceptionBreakpoint(), and error().
Referenced by 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 630 of file Target.cpp.
References CreateBreakpoint(), lldb_private::eLazyBoolCalculate, GetSearchFilterForModuleAndCUList(), and lldb_private::TargetProperties::GetSkipPrologue().
Referenced by 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 210 of file Target.cpp.
References DeleteCurrentProcess(), lldb_private::Process::FindPlugin(), GetDebugger(), lldb_private::Debugger::GetListener(), and m_process_sp.
Referenced by PlatformPOSIX::Attach(), lldb_private::PlatformWindows::Attach(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::Attach(), Attach(), PlatformPOSIX::DebugProcess(), lldb_private::PlatformWindows::DebugProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::DebugProcess(), lldb_private::PlatformQemuUser::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 664 of file Target.cpp.
References CreateBreakpoint(), lldb::eSearchDepthTarget, GetSearchFilterForModuleAndCUList(), GetSearchFilterForModuleList(), and lldb_private::FileSpecList::GetSize().
Referenced by 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 379 of file Target.cpp.
References CreateBreakpoint(), lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::TargetProperties::GetMoveToNearestCode(), and GetSearchFilterForModuleAndCUList().
Referenced by CommandObjectBreakpointSet::DoExecute().
Target::StopHookSP Target::CreateStopHook | ( | StopHook::StopHookKind | kind | ) |
Add an empty stop hook to the Target's stop hook list, and returns a shared pointer to it in new_hook.
Returns the id of the new hook.
Definition at line 2832 of file Target.cpp.
References lldb_private::Target::StopHook::CommandBased, 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 3380 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 2577 of file Target.cpp.
References lldb_private::Language::GetNameForLanguageType(), GetScratchTypeSystemForLanguage(), and lldb_private::DiagnosticManager::GetString().
Referenced by lldb_private::AppleObjCRuntimeV2::CreateObjectChecker(), lldb_private::GNUstepObjCRuntime::CreateObjectChecker(), lldb_private::AppleObjCRuntimeV1::CreateObjectChecker(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::GetClassInfoUtilityFunctionImpl(), lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::GetClassInfoUtilityFunctionImpl(), lldb_private::ClangDynamicCheckerFunctions::Install(), lldb_private::PlatformWindows::MakeLoadImageUtilityFunction(), 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 856 of file Target.cpp.
References lldb_private::WatchpointList::Add(), CheckIfWatchpointsSupported(), error(), lldb_private::WatchpointList::FindByAddress(), 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(), lldb_private::WatchpointList::Remove(), and lldb_private::Watchpoints.
void Target::DeleteBreakpointName | ( | ConstString | name | ) |
Definition at line 786 of file Target.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::BreakpointList::Breakpoints(), m_breakpoint_list, and m_breakpoint_names.
void Target::DeleteCurrentProcess | ( | ) |
Definition at line 194 of file Target.cpp.
References CleanupProcess(), lldb_private::SectionLoadHistory::Clear(), m_process_sp, m_section_load_history, and m_trace_sp.
Referenced by CreateProcess(), Destroy(), Launch(), and ~Target().
void Target::Destroy | ( | ) |
Definition at line 280 of file Target.cpp.
References lldb_private::SectionLoadHistory::Clear(), lldb_private::PathMappingList::Clear(), ClearDummySignals(), ClearModules(), DeleteCurrentProcess(), m_arch, m_breakpoint_list, m_image_search_paths, m_internal_breakpoint_list, 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, m_watchpoint_list, lldb_private::BreakpointList::RemoveAll(), and lldb_private::WatchpointList::RemoveAll().
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 1466 of file Target.cpp.
References lldb_private::Target::Arch::GetSpec(), m_arch, m_breakpoint_list, m_internal_breakpoint_list, and lldb_private::BreakpointList::RemoveInvalidLocations().
Referenced by lldb_private::Process::DidExec().
void Target::DisableAllBreakpoints | ( | bool | internal_also = false | ) |
Definition at line 971 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, m_internal_breakpoint_list, and lldb_private::BreakpointList::SetEnabledAll().
void Target::DisableAllowedBreakpoints | ( | ) |
Definition at line 981 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, and lldb_private::BreakpointList::SetEnabledAllowed().
bool Target::DisableAllWatchpoints | ( | bool | end_to_end = true | ) |
Definition at line 1254 of file Target.cpp.
References lldb_private::Status::Fail(), lldb_private::GetLog(), LLDB_LOGF, m_process_sp, m_watchpoint_list, ProcessIsValid(), lldb_private::WatchpointList::SetEnabledAll(), lldb_private::WatchpointList::Watchpoints(), and lldb_private::Watchpoints.
Referenced by CleanupProcess(), and CommandObjectWatchpointDisable::DoExecute().
bool Target::DisableBreakpointByID | ( | lldb::break_id_t | break_id | ) |
Definition at line 1025 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::BreakpointList::FindBreakpointByID(), 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 1353 of file Target.cpp.
References lldb_private::WatchpointList::FindByID(), 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 159 of file Target.cpp.
References lldb_private::BreakpointList::Dump(), lldb_private::ModuleList::Dump(), lldb::eDescriptionLevelBrief, lldb_private::ConstString::GetCString(), GetExecutableModulePointer(), lldb_private::FileSpec::GetFilename(), lldb_private::Module::GetFileSpec(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_breakpoint_list, m_images, m_internal_breakpoint_list, and lldb_private::Stream::PutCString().
void Target::EnableAllBreakpoints | ( | bool | internal_also = false | ) |
Definition at line 988 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, m_internal_breakpoint_list, and lldb_private::BreakpointList::SetEnabledAll().
void Target::EnableAllowedBreakpoints | ( | ) |
Definition at line 998 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, and lldb_private::BreakpointList::SetEnabledAllowed().
Referenced by CommandObjectBreakpointEnable::DoExecute().
bool Target::EnableAllWatchpoints | ( | bool | end_to_end = true | ) |
Definition at line 1281 of file Target.cpp.
References lldb_private::Status::Fail(), lldb_private::GetLog(), LLDB_LOGF, m_process_sp, m_watchpoint_list, ProcessIsValid(), lldb_private::WatchpointList::SetEnabledAll(), lldb_private::WatchpointList::Watchpoints(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointEnable::DoExecute().
bool Target::EnableBreakpointByID | ( | lldb::break_id_t | break_id | ) |
Definition at line 1043 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::BreakpointList::FindBreakpointByID(), 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 1372 of file Target.cpp.
References lldb_private::WatchpointList::FindByID(), 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 2660 of file Target.cpp.
References CalculateExecutionContext(), lldb_private::ExecutionContextScope::CalculateExecutionContext(), lldb_private::ValueObjectConstResult::Create(), lldb::eExpressionCompleted, lldb::eExpressionSetupError, lldb::eLanguageTypeC, error(), lldb_private::UserExpression::Evaluate(), lldb_private::TargetProperties::GetExpressionPrefixContents(), lldb_private::TargetStats::GetExpressionStats(), lldb_private::GetLog(), GetScratchTypeSystemForLanguage(), LLDB_LOG_ERROR, m_process_sp, m_stats, m_suppress_stop_hooks, lldb_private::StatsSuccessFail::NotifyFailure(), lldb_private::StatsSuccessFail::NotifySuccess(), and lldb_private::Target.
Referenced by CommandObjectMemoryFind::DoExecute(), lldb_private::CommandObjectDWIMPrint::DoExecute(), CommandObjectThreadReturn::DoExecute(), lldb_private::OptionArgParser::DoToAddress(), lldb::SBFrame::EvaluateExpression(), lldb::SBTarget::EvaluateExpression(), and lldb_private::CommandInterpreter::PreprocessToken().
|
protected |
Definition at line 3497 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 763 of file Target.cpp.
References lldb_private::ConstString::AsCString(), error(), 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 304 of file Target.cpp.
References lldb_private::ABI::FindPlugin(), GetArchitecture(), and m_process_sp.
std::recursive_mutex & Target::GetAPIMutex | ( | ) |
Definition at line 4963 of file Target.cpp.
References GetProcessSP(), m_mutex, and m_private_mutex.
Referenced by AttachToProcess(), lldb_private::CommandObject::CheckRequirements(), ValueImpl::GetSP(), and lldb::SBWatchpoint::SetEnabled().
|
inline |
Definition at line 1028 of file Target.h.
References lldb_private::Target::Arch::GetSpec(), and m_arch.
Referenced by MinidumpFileBuilder::AddHeaderAndCalculateDirectories(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), MinidumpFileBuilder::AddThreadList(), lldb_private::Process::AdvanceAddressToNextBranchInstruction(), 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::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), lldb_private::TypeSystemClang::CreateInstance(), DynamicLoaderDarwinKernel::CreateInstance(), DynamicLoaderFreeBSDKernel::CreateInstance(), DynamicLoaderHexagonDYLD::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), DynamicLoaderPOSIXDYLD::CreateInstance(), JITLoaderGDB::CreateInstance(), lldb_private::StructuredDataDarwinLog::CreateInstance(), lldb_private::wasm::DynamicLoaderWasmDYLD::CreateInstance(), lldb_private::DynamicLoaderWindowsDYLD::CreateInstance(), lldb_private::GNUstepObjCRuntime::CreateInstance(), ThreadFreeBSDKernel::CreateRegisterContextForFrame(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb_private::PlatformQemuUser::DebugProcess(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::IRExecutionUnit::DisassembleFunction(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), CommandObjectTargetModulesAdd::DoExecute(), lldb_private::CommandObjectDisassemble::DoExecute(), CommandObjectMemoryRead::DoExecute(), CommandObjectMemoryWrite::DoExecute(), CommandObjectProcessAttach::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesLookup::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), ProcessElfCore::DoLoadCore(), lldb_private::Address::Dump(), lldb_private::AddressRange::Dump(), lldb_private::StackFrame::Dump(), DumpAddressAndContent(), CommandObjectSourceInfo::DumpLinesInFunctions(), DumpTargetInfo(), lldb::SBInstruction::EmulateWithFrame(), lldb_private::process_gdb_remote::ProcessGDBRemote::EnableWatchpoint(), lldb_private::DWARFExpression::Evaluate(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), OptionGroupReadMemory::FinalizeSettings(), FindModulesByName(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::FormatEntity::Format(), GetABIName(), lldb_private::Process::GetAddressByteSize(), lldb_private::ProcessTrace::GetArchitecture(), ProcessElfCore::GetArchitecture(), lldb_private::ScriptedProcess::GetArchitecture(), lldb_private::Process::GetByteOrder(), lldb_private::FuncUnwinders::GetDebugFrameAugmentedUnwindPlan(), lldb_private::StopInfoMachException::GetDescription(), lldb_private::ThreadPlanAssemblyTracer::GetDisassembler(), lldb_private::ScriptedThread::GetDynamicRegisterInfo(), lldb_private::FuncUnwinders::GetEHFrameAugmentedUnwindPlan(), DynamicLoaderPOSIXDYLD::GetEntryPoint(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), GetModuleConfig(), DynamicLoaderMacOS::GetNotificationFuncAddrFromImageInfos(), lldb_private::AppleObjCRuntime::GetObjCVersion(), ABISysV_mips::GetReturnValueObjectImpl(), ABISysV_mips64::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::DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan(), 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::GNUstepObjCRuntime::IsModuleObjCLibrary(), lldb_private::ThreadPlanStepInstruction::IsPlanStale(), Launch(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), DynamicLoaderPOSIXDYLD::LoadModuleAtAddress(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::CommandObjectDisassemble::CommandOptions::OptionParsingStarting(), CommandObjectTargetModulesList::PrintModule(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), JITLoaderGDB::ReadJITDescriptor(), ReadJITEntry(), DYLDRendezvous::ReadSOEntryFromMemory(), lldb_private::AssertFrameRecognizer::RecognizeFrame(), lldb_private::RegisterAssertFrameRecognizer(), ObjectFileMachO::SaveCore(), sdkSupportsBuiltinModules(), DynamicLoaderDarwinKernel::SearchForKernelNearPC(), DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), SetupTargetOpts(), DYLDRendezvous::SOEntryIsMainExecutable(), DisassemblerLLVMC::SymbolLookup(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), lldb_private::ValueObjectDynamicValue::UpdateValue(), lldb_private::ValueObjectMemory::UpdateValue(), lldb_private::ValueObjectVariable::UpdateValue(), lldb_private::DynamicLoaderDarwin::UseDYLDSPI(), and lldb_private::Watchpoint::Watchpoint().
|
inline |
Definition at line 1067 of file Target.h.
References lldb_private::Target::Arch::GetPlugin(), and 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 2821 of file Target.cpp.
References GetArchitecturePlugin().
Referenced by CreateBreakpoint().
BreakpointSP Target::GetBreakpointByID | ( | lldb::break_id_t | break_id | ) |
Definition at line 329 of file Target.cpp.
References lldb_private::BreakpointList::FindBreakpointByID(), LLDB_BREAK_ID_IS_INTERNAL, m_breakpoint_list, and m_internal_breakpoint_list.
Referenced by lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), CommandObjectBreakpointModify::DoExecute(), CommandObjectBreakpointEnable::DoExecute(), CommandObjectBreakpointList::DoExecute(), CommandObjectBreakpointDelete::DoExecute(), CommandObjectBreakpointNameConfigure::DoExecute(), CommandObjectBreakpointCommandDelete::DoExecute(), CommandObjectBreakpointCommandList::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 315 of file Target.cpp.
References m_breakpoint_list, and m_internal_breakpoint_list.
Referenced by CreateBreakpointsFromFile(), CommandObjectBreakpointModify::DoExecute(), CommandObjectBreakpointEnable::DoExecute(), CommandObjectBreakpointList::DoExecute(), CommandObjectBreakpointClear::DoExecute(), CommandObjectBreakpointDelete::DoExecute(), CommandObjectBreakpointNameConfigure::DoExecute(), CommandObjectBreakpointNameAdd::DoExecute(), CommandObjectBreakpointNameDelete::DoExecute(), CommandObjectBreakpointNameList::DoExecute(), CommandObjectBreakpointRead::DoExecute(), CommandObjectBreakpointWrite::DoExecute(), CommandObjectBreakpointCommandDelete::DoExecute(), CommandObjectBreakpointCommandList::DoExecute(), CommandObjectProcessContinue::DoExecute(), lldb_private::BreakpointIDList::FindAndReplaceIDRanges(), lldb::SBBreakpointCallbackBaton::PrivateBreakpointHitCallback(), ResetBreakpointHitCounts(), SerializeBreakpointsToFile(), and lldb_private::TargetStats::ToJSON().
const BreakpointList & Target::GetBreakpointList | ( | bool | internal = false | ) | const |
Definition at line 322 of file Target.cpp.
References m_breakpoint_list, and m_internal_breakpoint_list.
void Target::GetBreakpointNames | ( | std::vector< std::string > & | names | ) |
Definition at line 824 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 518 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 2806 of file Target.cpp.
References GetArchitecturePlugin().
Referenced by lldb_private::Address::GetCallableLoadAddress(), and lldb_private::Address::SetCallableLoadAddress().
|
inline |
Definition at line 1069 of file Target.h.
References m_debugger.
Referenced by lldb_private::ClangUserExpression::AddArguments(), Attach(), lldb_private::ScriptInterpreterLua::BreakpointCallbackFunction(), lldb_private::BreakpointOptions::BreakpointOptionsCallbackFunction(), lldb_private::TargetProperties::CheckJITObjectsDir(), lldb_private::Process::CompleteAttach(), lldb_private::Process::CreateBreakpointSite(), lldb_private::BreakpointOptions::CreateFromStructuredData(), CreateProcess(), ProcessKDP::DoConnectRemote(), lldb_private::InstructionList::Dump(), lldb_private::Thread::DumpUsingSettingsFormat(), lldb_private::StackFrame::DumpUsingSettingsFormat(), DynamicLoaderDarwinKernel::DynamicLoaderDarwinKernel(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::REPL::GetIOHandler(), lldb_private::TargetProperties::GetPreloadSymbols(), lldb_private::ScriptedThreadPlan::GetScriptInterpreter(), lldb_private::StackFrame::GetStatus(), lldb_private::Thread::GetStatus(), lldb::SBFrame::GetVariables(), lldb_private::StructuredDataDarwinLog::HandleArrivalOfStructuredData(), lldb_private::Target::StopHookCommandLine::HandleStop(), IRInterpreter::Interpret(), lldb_private::REPL::IOHandlerComplete(), lldb_private::REPL::IOHandlerInputComplete(), Launch(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), LoadScriptingResourceForModule(), lldb_private::Module::LoadScriptingResourceInTarget(), lldb_private::PlatformDarwin::LocateExecutableScriptingResources(), lldb_private::ThreadPlanAssemblyTracer::Log(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), DynamicLoaderDarwinKernel::ParseKextSummaries(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::StopInfoWatchpoint::PerformAction(), lldb_private::Process::PopProcessIOHandler(), lldb_private::Disassembler::PrintInstructions(), lldb_private::Process::ProcessIOHandlerIsActive(), lldb_private::Process::PushProcessIOHandler(), DynamicLoaderDarwinKernel::ReadKextSummaryHeader(), lldb_private::REPL::REPL(), lldb::SBThread::ResumeNewPlan(), lldb_private::InstrumentationRuntimeUBSan::RetrieveReportData(), lldb_private::REPL::RunLoop(), RunScriptFormatKeyword(), ObjectFileMachO::SaveCore(), SetArchitecture(), SetLabel(), lldb_private::AppleObjCRuntimeV2::WarnIfNoExpandedSharedCache(), and lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction().
|
static |
Definition at line 2615 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 2611 of file Target.cpp.
References lldb_private::TargetProperties::GetDebugFileSearchPaths(), and GetGlobalProperties().
Referenced by SymbolVendorELF::CreateInstance(), SymbolVendorMacOSX::CreateInstance(), SymbolVendorPECOFF::CreateInstance(), lldb_private::wasm::SymbolVendorWasm::CreateInstance(), ProcessKDP::DoConnectRemote(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(), lldb_private::plugin::dwarf::SymbolFileDWARF::GetDwpSymbolFile(), and lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress().
|
static |
Definition at line 2607 of file Target.cpp.
References lldb_private::TargetProperties::GetExecutableSearchPaths(), and GetGlobalProperties().
Referenced by lldb_private::TargetList::CreateTargetInternal(), and 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 2772 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 1423 of file Target.cpp.
References lldb_private::ObjectFile::eTypeExecutable, lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetSize(), lldb_private::ObjectFile::GetType(), and m_images.
Referenced by lldb_private::PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(), PlatformPOSIX::Attach(), Attach(), lldb_private::Process::CompleteAttach(), DynamicLoaderPOSIXDYLD::ComputeLoadOffset(), ProcessKDP::DoConnectRemote(), CommandObjectProcessAttach::DoExecute(), CommandObjectProcessLaunch::DoExecute(), ProcessElfCore::DoLoadCore(), ProcessFreeBSDKernel::FindSymbol(), DynamicLoaderHexagonDYLD::GetEntryPoint(), GetExecutableModulePointer(), ProcessElfCore::GetImageInfoAddress(), lldb_private::ProcessWindows::GetImageInfoAddress(), ProcessElfCore::GetProcessInfo(), lldb_private::ProcessTrace::GetProcessInfo(), lldb_private::minidump::ProcessMinidump::GetProcessInfo(), lldb_private::ScriptedProcess::GetProcessInfo(), lldb_private::PlatformMacOSX::GetSDKDirectory(), lldb_private::DynamicLoader::GetTargetExecutable(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), ImageSearchPathsChanged(), Install(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), DynamicLoaderFreeBSDKernel::LoadKernelModules(), lldb_private::process_gdb_remote::ProcessGDBRemote::MaybeLoadExecutableModule(), DYLDRendezvous::ResolveRendezvousAddress(), sdkSupportsBuiltinModules(), SetArchitecture(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos().
Module * Target::GetExecutableModulePointer | ( | ) |
Definition at line 1437 of file Target.cpp.
References GetExecutableModule().
Referenced by DynamicLoaderDarwinKernel::CreateInstance(), DynamicLoaderFreeBSDKernel::CreateInstance(), DynamicLoaderMacOS::CreateInstance(), CommandObjectPlatformProcessLaunch::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), Dump(), DumpTargetInfo(), DynamicLoaderFreeBSDKernel::FindKernelAtLoadAddress(), lldb_private::FormatEntity::Format(), GetEntryPointAddress(), lldb_private::DynamicLoader::GetTargetExecutable(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), HexagonDYLDRendezvous::HexagonDYLDRendezvous(), lldb_private::Process::LaunchPrivate(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), DynamicLoaderDarwinKernel::SearchForKernelAtSameLoadAddr(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), DYLDRendezvous::UpdateExecutablePath(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos().
|
inline |
Definition at line 1473 of file Target.h.
References m_frame_recognizer_manager_up.
Referenced by CommandObjectFrameRecognizerAdd::DoExecute(), CommandObjectFrameRecognizerClear::DoExecute(), CommandObjectFrameRecognizerDelete::DoExecute(), CommandObjectFrameRecognizerList::DoExecute(), CommandObjectFrameRecognizerInfo::DoExecute(), CommandObjectFrameRecognizerDelete::HandleArgumentCompletion(), lldb_private::RegisterAbortWithPayloadFrameRecognizer(), lldb_private::RegisterAssertFrameRecognizer(), RegisterObjCExceptionRecognizer(), 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 2547 of file Target.cpp.
References error(), lldb_private::Language::GetNameForLanguageType(), and GetScratchTypeSystemForLanguage().
Referenced by lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread().
|
static |
Definition at line 3058 of file Target.cpp.
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 986 of file Target.h.
References m_images.
Referenced by MinidumpFileBuilder::AddModuleList(), lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), CommandObjectTargetSymbolsAdd::AddModuleSymbols(), CommandObjectTargetSymbolsAdd::AddSymbolsForFile(), lldb_private::AppleObjCRuntime::AppleObjCRuntime(), lldb_private::OptionValueUUID::AutoComplete(), SystemRuntimeMacOSX::BacktraceRecordingHeadersInitialized(), lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), BuildModulesSection(), lldb_private::AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing(), DynamicLoaderMacOS::CanLoadImage(), lldb_private::TargetStats::CollectStats(), CreateAllImageInfosPayload(), lldb_private::MemoryHistoryASan::CreateInstance(), lldb_private::GNUstepObjCRuntime::CreateInstance(), JITLoaderGDB::DidAttach(), JITLoaderGDB::DidLaunch(), CommandObjectTargetVariable::DoExecute(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectMemoryRead::DoExecute(), CommandObjectSourceInfo::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesDumpObjfile::DoExecute(), CommandObjectTargetModulesDumpSymtab::DoExecute(), CommandObjectTargetModulesDumpSections::DoExecute(), CommandObjectTargetModulesDumpClangAST::DoExecute(), CommandObjectTargetModulesDumpSymfile::DoExecute(), CommandObjectTargetModulesDumpLineTable::DoExecute(), CommandObjectTargetModulesDumpSeparateDebugInfoFiles::DoExecute(), CommandObjectTargetModulesList::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectTargetModulesLookup::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::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), CommandObjectSourceList::FindMatchingFunctions(), CommandObjectSourceList::FindMatchingFunctionSymbols(), HexagonDYLDRendezvous::FindMetadata(), DYLDRendezvous::FindMetadata(), FindModulesByName(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::AppleObjCRuntimeV2::GetByteOffsetForIvar(), lldb_private::AppleObjCRuntimeV2::GetCFBooleanValuesIfNeeded(), lldb_private::CommandObjectDisassemble::GetContainingAddressRanges(), GetEntryPointAddress(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), lldb_private::AppleObjCRuntime::GetFoundationVersion(), lldb_private::platform_android::PlatformAndroid::GetLibdlFunctionDeclarations(), lldb_private::CommandObjectDisassemble::GetNameRanges(), lldb_private::AppleObjCRuntime::GetObjCModule(), lldb_private::AppleObjCRuntime::GetObjCVersion(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), lldb_private::AppleObjCRuntime::GetPrintForDebuggerAddr(), lldb_private::DynamicLoaderDarwin::GetPThreadLibraryModule(), DynamicLoaderHexagonDYLD::GetStepThroughTrampolinePlan(), DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan(), lldb_private::ClangExpressionDeclMap::GetSymbolAddress(), lldb_private::ItaniumABILanguageRuntime::GetTypeInfo(), 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(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::wasm::DynamicLoaderWasmDYLD::LoadModuleAtAddress(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), DynamicLoaderPOSIXDYLD::LoadVDSO(), lldb_private::ClangExpressionDeclMap::LookupFunction(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), ModuleIsExcludedForUnconstrainedSearches(), lldb_private::CommandCompletions::ModuleUUIDs(), DynamicLoaderMacOS::NotifyBreakpointHit(), lldb_private::ClangUserExpression::Parse(), DynamicLoaderFreeBSDKernel::ParseKmods(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), JITLoaderGDB::ReadJITDescriptorImpl(), SystemRuntimeMacOSX::ReadLibdispatchOffsetsAddress(), SystemRuntimeMacOSX::ReadLibdispatchTSDIndexesAddress(), SystemRuntimeMacOSX::ReadLibpthreadOffsetsAddress(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(), ResolveAddress(), lldb_private::Symbol::ResolveReExportedSymbolInModuleSpec(), lldb::SBModule::SBModule(), lldb_private::BreakpointResolverAddress::SearchCallback(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups(), lldb_private::DynamicLoaderDarwin::UnloadAllImages(), lldb_private::DynamicLoaderDarwin::UnloadImages(), lldb_private::DynamicLoaderDarwin::UpdateDYLDImageInfoFromNewImageInfo(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), lldb_private::FunctionCaller::WriteFunctionWrapper(), and lldb_private::LLVMUserExpression::~LLVMUserExpression().
PathMappingList & Target::GetImageSearchPathList | ( | ) |
Definition at line 2411 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 667 of file Target.h.
References m_last_created_breakpoint.
Referenced by lldb_private::CommandObjectMultiwordBreakpoint::VerifyIDs().
|
inline |
Definition at line 775 of file Target.h.
References m_last_created_watchpoint.
Referenced by CommandObjectWatchpointModify::DoExecute(), and lldb_private::CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs().
|
inline |
Definition at line 1435 of file Target.h.
References m_stop_hooks.
Referenced by CommandObjectTargetStopHookList::DoExecute(), and GetStopHookAtIndex().
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 2814 of file Target.cpp.
References GetArchitecturePlugin().
Referenced by lldb_private::Address::GetOpcodeLoadAddress(), lldb_private::RegisterContext::GetPC(), lldb_private::Address::SetOpcodeLoadAddress(), and lldb_private::ThreadPlanRunToAddress::ThreadPlanRunToAddress().
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.
[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. 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 2159 of file Target.cpp.
References lldb_private::ModuleList::Append(), lldb_private::Stream::AsRawOstream(), lldb_private::UUID::Clear(), lldb_private::UUID::Dump(), error(), lldb_private::ObjectFile::eTypeCoreFile, lldb_private::ObjectFile::eTypeDebugInfo, lldb_private::ObjectFile::eTypeDynamicLinker, lldb_private::ObjectFile::eTypeExecutable, lldb_private::ObjectFile::eTypeObjectFile, lldb_private::ObjectFile::eTypeSharedLibrary, lldb_private::ObjectFile::eTypeStubLibrary, lldb_private::ModuleList::FindFirstModule(), lldb_private::ModuleList::FindModules(), lldb_private::ModuleList::ForEach(), lldb_private::FileSpec::GetDirectory(), lldb_private::TargetProperties::GetExecutableSearchPaths(), lldb_private::FileSpec::GetFilename(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::ModuleList::GetIndexForModule(), lldb_private::GetLog(), lldb_private::TargetProperties::GetObjectPathMap(), lldb_private::FileSpec::GetPath(), lldb_private::TargetProperties::GetPreloadSymbols(), lldb_private::ModuleList::GetSharedModule(), lldb_private::PathMappingList::GetSize(), 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::Remove(), lldb_private::ModuleList::RemoveSharedModuleIfOrphaned(), lldb_private::ModuleList::ReplaceModule(), lldb_private::FileSpec::SetDirectory(), lldb_private::Status::SetErrorString(), lldb_private::FileSpec::SetFilename(), lldb_private::FileSpec::SetPath(), and lldb_private::Target.
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), CommandObjectTargetModulesAdd::DoExecute(), ProcessElfCore::DoLoadCore(), lldb_private::DynamicLoader::FindModuleViaTarget(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), lldb_private::DynamicLoader::GetTargetExecutable(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), lldb_private::ProcessWindows::OnDebuggerConnected(), lldb_private::DynamicLoaderWindowsDYLD::OnLoadModule(), lldb_private::trace_intel_pt::TraceIntelPTBundleLoader::ParseModule(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), and SetExecutableModule().
PersistentExpressionState * Target::GetPersistentExpressionStateForLanguage | ( | lldb::LanguageType | language | ) |
Definition at line 2494 of file Target.cpp.
References lldb_private::GetLog(), lldb_private::Language::GetNameForLanguageType(), GetScratchTypeSystemForLanguage(), LLDB_LOG, LLDB_LOG_ERROR, and lldb_private::Target.
Referenced by lldb_private::ASTResultSynthesizer::CommitPersistentDecls(), CommandObjectMemoryRead::DoExecute(), lldb_private::CommandObjectDWIMPrint::DoExecute(), lldb_private::UserExpression::Execute(), lldb_private::ABI::GetReturnValueObject(), lldb_private::ClangExpressionSourceCode::GetText(), lldb_private::REPL::IOHandlerInputComplete(), lldb_private::ClangUserExpression::Parse(), SetupDeclVendor(), and lldb_private::ClangExpressionDeclMap::WillParse().
lldb::addr_t Target::GetPersistentSymbol | ( | ConstString | name | ) |
Definition at line 2752 of file Target.cpp.
References lldb_private::TypeSystemMap::ForEach(), LLDB_INVALID_ADDRESS, and m_scratch_type_system_map.
lldb::ExpressionVariableSP Target::GetPersistentVariable | ( | ConstString | name | ) |
Definition at line 2733 of file Target.cpp.
References lldb_private::TypeSystemMap::ForEach(), and m_scratch_type_system_map.
Referenced by lldb_private::CommandObjectDWIMPrint::DoExecute(), and lldb::SBFrame::FindValue().
|
inline |
Definition at line 1449 of file Target.h.
References m_platform_sp.
Referenced by lldb_private::TargetProperties::ComputeEnvironment(), lldb_private::process_gdb_remote::ProcessGDBRemote::ConnectToDebugserver(), lldb_private::ClangModulesDeclVendor::Create(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), DoesProcessHaveSharedCache(), CommandObjectPlatformStatus::DoExecute(), CommandObjectPlatformProcessLaunch::DoExecute(), CommandObjectPlatformProcessList::DoExecute(), CommandObjectPlatformProcessInfo::DoExecute(), CommandObjectTargetSymbolsAdd::DoExecute(), CommandObjectProcessLoad::DoExecute(), CommandObjectProcessUnload::DoExecute(), CommandObjectProcessStatus::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), DumpTargetInfo(), FinalizeFileActions(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::TargetProperties::GetInheritedEnvironment(), 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(), DynamicLoaderPOSIXDYLD::ResolveExecutableModule(), lldb_private::process_gdb_remote::ProcessGDBRemote::SaveCore(), sdkSupportsBuiltinModules(), SetArchitecture(), and lldb_private::AppleObjCRuntimeV2::WarnIfNoExpandedSharedCache().
const lldb::ProcessSP & Target::GetProcessSP | ( | ) | const |
Definition at line 222 of file Target.cpp.
References m_process_sp.
Referenced by Attach(), AttachToProcess(), CheckIfWatchpointsSupported(), CheckTargetForWatchpointOperations(), lldb_private::BreakpointLocation::ClearBreakpointSite(), ClearDummySignals(), lldb_private::CompactUnwindInfo::CreateUnwindPlan_i386(), lldb_private::CompactUnwindInfo::CreateUnwindPlan_x86_64(), CommandObjectTargetModulesAdd::DoExecute(), CommandObjectProcessAttach::DoExecute(), CommandObjectWatchpointList::DoExecute(), sddarwinlog_private::EnableCommand::DoExecute(), sddarwinlog_private::StatusCommand::DoExecute(), CommandObjectProcessLaunch::DoExecute(), CommandObjectProcessHandle::DoExecute(), DumpTargetInfo(), lldb_private::Watchpoint::DumpWithLevel(), lldb_private::ExecutionContext::ExecutionContext(), GetAPIMutex(), lldb_private::Address::GetCallableLoadAddress(), lldb_private::CompactUnwindInfo::GetCompactUnwindInfoForFunction(), lldb_private::CommandObject::GetDefaultThread(), lldb_private::BreakpointLocation::GetDescription(), GetStopInfoForHardwareBP(), lldb_private::CompactUnwindInfo::GetUnwindPlan(), lldb_private::REPL::IOHandlerActivated(), lldb_private::REPL::IOHandlerInputComplete(), Launch(), QuitCommandOverrideCallback(), lldb_private::BreakpointLocation::ResolveBreakpointSite(), lldb_private::Symbol::ResolveCallableAddress(), lldb_private::REPL::RunLoop(), lldb::SBWatchpoint::SetEnabled(), SetSectionLoadAddress(), SetSectionUnloaded(), lldb_private::TargetStats::ToJSON(), UnloadModuleSections(), and lldb_private::Watchpoint::Watchpoint().
Return a recommended size for memory reads at addr, optimizing for cache usage.
Definition at line 2027 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 2450 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 224 of file Target.cpp.
References lldb_private::REPL::Create(), lldb::eLanguageTypeUnknown, lldb_private::LanguageSet::Empty(), lldb_private::Language::GetLanguagesSupportingREPLs(), lldb_private::Language::GetNameForLanguageType(), lldb_private::Debugger::GetREPLLanguage(), lldb_private::LanguageSet::GetSingularLanguage(), m_debugger, m_repl_map, lldb_private::Status::SetErrorString(), lldb_private::Status::SetErrorStringWithFormat(), and lldb_private::Status::Success().
llvm::Expected< lldb::TypeSystemSP > Target::GetScratchTypeSystemForLanguage | ( | lldb::LanguageType | language, |
bool | create_on_demand = true |
||
) |
Definition at line 2424 of file Target.cpp.
References lldb_private::LanguageSet::bitvector, lldb::eLanguageTypeC, lldb::eLanguageTypeMipsAssembler, lldb::eLanguageTypeUnknown, lldb_private::LanguageSet::Empty(), lldb_private::Language::GetLanguagesSupportingTypeSystemsForExpressions(), lldb_private::TypeSystemMap::GetTypeSystemForLanguage(), m_scratch_type_system_map, and m_valid.
Referenced by lldb_private::Process::CallVoidArgVoidPtrReturn(), CreateUtilityFunction(), EvaluateExpression(), lldb_private::ScratchTypeSystemClang::GetForTarget(), GetFunctionCallerForLanguage(), GetPersistentExpressionStateForLanguage(), GetScratchTypeSystems(), GetUserExpressionForLanguage(), lldb_private::InferiorCallMmap(), and lldb_private::Watchpoint::Watchpoint().
std::vector< lldb::TypeSystemSP > Target::GetScratchTypeSystems | ( | bool | create_on_demand = true | ) |
Definition at line 2459 of file Target.cpp.
References 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.
SearchFilterSP Target::GetSearchFilterForModule | ( | const FileSpec * | containingModule | ) |
Definition at line 575 of file Target.cpp.
References m_search_filter_sp.
Referenced by lldb_private::LanguageRuntime::CreateExceptionSearchFilter().
SearchFilterSP Target::GetSearchFilterForModuleAndCUList | ( | const FileSpecList * | containingModules, |
const FileSpecList * | containingSourceFiles | ||
) |
Definition at line 610 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 593 of file Target.cpp.
References lldb_private::FileSpecList::GetSize(), and m_search_filter_sp.
Referenced by CreateBreakpoint(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), CreateScriptedBreakpoint(), and GetSearchFilterForModuleAndCUList().
|
inline |
Definition at line 1143 of file Target.h.
References lldb_private::SectionLoadHistory::GetCurrentSectionLoadList(), and m_section_load_history.
Referenced by lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), BuildModulesSection(), CreateBreakpoint(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectSourceList::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectTargetDumpSectionLoadList::DoExecute(), lldb_private::ProcessTrace::DoReadMemory(), lldb_private::SectionList::Dump(), DumpAddressAndContent(), CommandObjectRegisterRead::DumpRegister(), lldb_private::BreakpointLocationList::FindByAddress(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb::SBBreakpoint::FindLocationByAddress(), lldb::SBBreakpoint::FindLocationIDByAddress(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), lldb_private::CommandObjectDisassemble::GetContainingAddressRanges(), lldb_private::ObjectFile::GetLoadableData(), lldb_private::Section::GetLoadBaseAddress(), CommandObjectSourceInfo::GetSymbolContextsForAddress(), lldb_private::Value::GetValueAsData(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), lldb_private::ThreadPlanAssemblyTracer::Log(), LookupAddressInModule(), DynamicLoaderMacOS::NotifyBreakpointHit(), CommandObjectTargetModulesList::PrintModule(), ReadAddress(), JITLoaderGDB::ReadJITDescriptorImpl(), ReadMemory(), ReadPointerFromMemory(), ResolveAddress(), lldb_private::Address::SetLoadAddress(), lldb_private::ObjectFileJIT::SetLoadAddress(), ObjectFileELF::SetLoadAddress(), ObjectFileMachO::SetLoadAddress(), ObjectFilePECOFF::SetLoadAddress(), ObjectFilePlaceholder::SetLoadAddress(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and DisassemblerLLVMC::SymbolLookup().
SourceManager & Target::GetSourceManager | ( | ) |
Definition at line 2826 of file Target.cpp.
References m_source_manager_up.
Referenced by CommandObjectSourceList::DisplayFunctionSource(), CommandObjectSourceList::DoExecute(), CommandObjectBreakpointSet::GetDefaultFile(), lldb_private::StackFrame::GetStatus(), lldb_private::REPL::IOHandlerInputComplete(), and lldb_private::REPL::RunLoop().
|
static |
Definition at line 91 of file Target.cpp.
Referenced by lldb_private::Debugger::DefaultEventHandler(), GetBroadcasterClass(), and lldb::SBTarget::GetBroadcasterClassName().
|
inline |
Definition at line 1623 of file Target.h.
References m_stats.
Referenced by lldb_private::BreakpointResolverFileLine::DeduceSourceMapping(), CommandObjectFrameVariable::DoExecute(), lldb_private::BreakpointResolverFileLine::SearchCallback(), lldb_private::Process::SetPrivateState(), and lldb_private::Process::SetPublicState().
|
inline |
Definition at line 1437 of file Target.h.
References GetNumStopHooks(), and m_stop_hooks.
Referenced by CommandObjectTargetStopHookList::DoExecute().
Target::StopHookSP Target::GetStopHookByID | ( | lldb::user_id_t | uid | ) |
Definition at line 2861 of file Target.cpp.
References m_stop_hooks.
size_t lldb_private::Target::GetStopHookSize | ( | ) |
|
inline |
Definition at line 1423 of file Target.h.
References m_suppress_stop_hooks.
|
static |
Definition at line 2646 of file Target.cpp.
References lldb_private::ExecutionContext::GetTargetPtr(), and lldb_private::SymbolContext::target_sp.
Referenced by DumpAddressAndContent(), DumpAddressOffsetFromFunction(), and RunScriptFormatKeyword().
TraceSP Target::GetTrace | ( | ) |
Get the Trace object containing processor trace information of this target.
Definition at line 3378 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 3405 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 2514 of file Target.cpp.
References lldb_private::SourceLanguage::AsLanguageType(), error(), lldb_private::SourceLanguage::GetDescription(), lldb_private::Language::GetNameForLanguageType(), and GetScratchTypeSystemForLanguage().
Referenced by lldb_private::UserExpression::Evaluate(), and lldb_private::Watchpoint::SetCondition().
|
inline |
Definition at line 779 of file Target.h.
References m_watchpoint_list.
Referenced by CleanupProcess(), lldb_private::StopInfoMachException::CreateStopReasonWithMachException(), CreateWatchpoint(), CommandObjectWatchpointList::DoExecute(), CommandObjectWatchpointEnable::DoExecute(), CommandObjectWatchpointDisable::DoExecute(), CommandObjectWatchpointDelete::DoExecute(), CommandObjectWatchpointIgnore::DoExecute(), CommandObjectWatchpointModify::DoExecute(), CommandObjectWatchpointCommandDelete::DoExecute(), CommandObjectWatchpointCommandList::DoExecute(), lldb_private::ScriptInterpreterLua::WatchpointCallbackFunction(), and lldb_private::CommandCompletions::WatchPointIDs().
bool Target::IgnoreAllWatchpoints | ( | uint32_t | ignore_count | ) |
Definition at line 1336 of file Target.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, ProcessIsValid(), lldb_private::WatchpointList::Watchpoints(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointIgnore::DoExecute().
bool Target::IgnoreWatchpointByID | ( | lldb::watch_id_t | watch_id, |
uint32_t | ignore_count | ||
) |
Definition at line 1407 of file Target.cpp.
References lldb_private::WatchpointList::FindByID(), lldb_private::GetLog(), LLDB_LOGF, m_watchpoint_list, ProcessIsValid(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointIgnore::DoExecute().
|
staticprotected |
Definition at line 2415 of file Target.cpp.
References lldb_private::eLoadDependentsYes, GetExecutableModule(), and SetExecutableModule().
Status Target::Install | ( | ProcessLaunchInfo * | launch_info | ) |
Definition at line 3066 of file Target.cpp.
References lldb_private::FileSpec::AppendPathComponent(), error(), lldb_private::TargetProperties::GetAutoInstallMainExecutable(), GetExecutableModule(), GetImages(), lldb_private::ModuleList::GetModuleAtIndex(), GetPlatform(), lldb_private::ModuleList::GetSize(), and lldb_private::ProcessInfo::SetExecutableFile().
Referenced by lldb_private::Process::LaunchPrivate().
|
inline |
Definition at line 573 of file Target.h.
References m_is_dummy_target.
|
inline |
Definition at line 651 of file Target.h.
References m_valid.
Referenced by lldb_private::TypeSystemClang::CreateInstance().
Status Target::Launch | ( | ProcessLaunchInfo & | launch_info, |
Stream * | stream | ||
) |
Definition at line 3208 of file Target.cpp.
References CreateProcess(), DeleteCurrentProcess(), error(), lldb::eStateConnected, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateStopped, FinalizeFileActions(), lldb_private::ProcessInfo::GetArchitecture(), GetArchitecture(), lldb_private::Debugger::GetCommandInterpreter(), GetDebugger(), lldb_private::ProcessInfo::GetExecutableFile(), lldb_private::ProcessLaunchInfo::GetFlags(), 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(), SaveScriptedLaunchInfo(), lldb_private::Flags::Set(), lldb_private::Status::SetErrorStringWithFormat(), lldb_private::ProcessInfo::SetHijackListener(), lldb_private::TargetStats::SetLaunchOrAttachTime(), lldb_private::StateAsCString(), lldb_private::Target, and lldb_private::Flags::Test().
Referenced by CommandObjectProcessLaunch::DoExecute().
|
inline |
Definition at line 962 of file Target.h.
References lldb_private::ModuleList::LoadScriptingResourcesInTarget(), and m_images.
bool Target::MergeArchitecture | ( | const ArchSpec & | arch_spec | ) |
Definition at line 1628 of file Target.cpp.
References lldb_private::GetLog(), lldb_private::Target::Arch::GetSpec(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsCompatibleMatch(), 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().
bool Target::ModuleIsExcludedForUnconstrainedSearches | ( | const FileSpec & | module_spec | ) |
Return whether this FileSpec corresponds to a module that should be considered for general searches.
This API will be consulted by the SearchFilterForUnconstrainedSearches and any module that returns true will not be searched. Note the SearchFilterForUnconstrainedSearches is the search filter that gets used in the CreateBreakpoint calls when no modules is provided.
The target call at present just consults the Platform's call of the same name.
[in] | module_spec | Path to the module. |
Definition at line 1765 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 1787 of file Target.cpp.
References lldb_private::TargetProperties::GetBreakpointsConsultPlatformAvoidList(), and m_platform_sp.
void Target::ModulesDidLoad | ( | ModuleList & | module_list | ) |
Definition at line 1691 of file Target.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), eBroadcastBitModulesLoaded, lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetSize(), LoadScriptingResourceForModule(), m_breakpoint_list, m_internal_breakpoint_list, m_process_sp, m_valid, and lldb_private::BreakpointList::UpdateBreakpoints().
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), DynamicLoaderHexagonDYLD::DidAttach(), DynamicLoaderPOSIXDYLD::DidAttach(), lldb_private::DynamicLoaderWindowsDYLD::DidAttach(), DynamicLoaderPOSIXDYLD::DidLaunch(), lldb_private::DynamicLoaderWindowsDYLD::DidLaunch(), CommandObjectTargetModulesLoad::DoExecute(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), DynamicLoaderHexagonDYLD::LoadAllCurrentModules(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::process_gdb_remote::ProcessGDBRemote::MaybeLoadExecutableModule(), NotifyModuleAdded(), lldb_private::DynamicLoaderWindowsDYLD::OnLoadModule(), DynamicLoaderDarwinKernel::ParseKextSummaries(), DynamicLoaderFreeBSDKernel::ParseKmods(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), JITLoaderGDB::ReadJITDescriptorImpl(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), and SetExecutableModule().
void Target::ModulesDidUnload | ( | ModuleList & | module_list, |
bool | delete_locations | ||
) |
Definition at line 1725 of file Target.cpp.
References lldb_private::ModuleList::AnyOf(), lldb_private::Broadcaster::BroadcastEvent(), lldb_private::TypeSystemMap::Clear(), eBroadcastBitModulesUnloaded, lldb_private::ObjectFile::eTypeExecutable, lldb_private::ObjectFile::eTypeObjectFile, lldb_private::ObjectFile::eTypeSharedLibrary, lldb_private::Module::FileHasChanged(), lldb_private::Module::GetObjectFile(), lldb_private::ModuleList::GetSize(), lldb_private::ObjectFile::GetType(), m_breakpoint_list, m_internal_breakpoint_list, m_scratch_type_system_map, m_valid, UnloadModuleSections(), and lldb_private::BreakpointList::UpdateBreakpoints().
Referenced by ClearModules(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), NotifyModuleRemoved(), NotifyModulesRemoved(), lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule(), DynamicLoaderDarwinKernel::ParseKextSummaries(), DynamicLoaderFreeBSDKernel::ParseKmods(), DynamicLoaderHexagonDYLD::RefreshModules(), and DynamicLoaderPOSIXDYLD::RefreshModules().
|
overrideprotectedvirtual |
Implementing of ModuleList::Notifier.
Implements lldb_private::ModuleList::Notifier.
Definition at line 1655 of file Target.cpp.
References lldb_private::ModuleList::Append(), m_valid, and ModulesDidLoad().
|
overrideprotectedvirtual |
Implements lldb_private::ModuleList::Notifier.
Definition at line 1665 of file Target.cpp.
References lldb_private::ModuleList::Append(), m_valid, and ModulesDidUnload().
|
overrideprotectedvirtual |
Implements lldb_private::ModuleList::Notifier.
Definition at line 1687 of file Target.cpp.
References ModulesDidUnload().
|
overrideprotectedvirtual |
Implements lldb_private::ModuleList::Notifier.
Definition at line 1675 of file Target.cpp.
References m_breakpoint_list, m_internal_breakpoint_list, m_valid, and lldb_private::BreakpointList::UpdateBreakpointsWhenModuleIsReplaced().
|
overrideprotectedvirtual |
Implements lldb_private::ModuleList::Notifier.
Definition at line 1653 of file Target.cpp.
|
protected |
Definition at line 137 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, and m_stop_hooks.
Print all the signals set in this target.
Definition at line 3670 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 832 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 1973 of file Target.cpp.
References lldb_private::Status::Clear(), error(), lldb_private::Address::GetLoadAddress(), ReadMemory(), and lldb_private::Status::SetErrorString().
size_t Target::ReadCStringFromMemory | ( | const Address & | addr, |
std::string & | out_str, | ||
Status & | error, | ||
bool | force_live_memory = false |
||
) |
Definition at line 1950 of file Target.cpp.
References error(), lldb_private::Address::GetLoadAddress(), and ReadCStringFromMemory().
Referenced by CommandObjectMemoryRead::DoExecute(), ReadCStringFromMemory(), and lldb_private::InstrumentationRuntimeMainThreadChecker::RetrieveReportData().
|
virtual |
Definition at line 1829 of file Target.cpp.
References error(), 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::ModuleList::ResolveFileAddress(), lldb_private::SectionLoadList::ResolveLoadAddress(), and lldb_private::Address::SetLoadAddress().
Referenced by CommandObjectMemoryRead::DoExecute(), lldb_private::DWARFExpression::Evaluate(), UnwindAssembly_x86::FirstNonPrologueInsn(), UnwindAssembly_x86::GetFastUnwindPlan(), lldb_private::ValueObject::GetPointeeData(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::Value::GetValueAsData(), lldb_private::Disassembler::ParseInstructions(), ReadCStringFromMemory(), DynamicLoaderDarwinKernel::ReadKextSummaries(), DynamicLoaderDarwinKernel::ReadKextSummaryHeader(), ReadScalarIntegerFromMemory(), ReadStringFromMemory(), and EmulateInstructionMIPS::SetInstruction().
size_t Target::ReadMemoryFromFileCache | ( | const Address & | addr, |
void * | dst, | ||
size_t | dst_len, | ||
Status & | error | ||
) |
Definition at line 1797 of file Target.cpp.
References error(), lldb_private::ModuleChild::GetModule(), 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 2129 of file Target.cpp.
References error(), lldb_private::ArchSpec::GetAddressByteSize(), GetSectionLoadList(), lldb_private::Target::Arch::GetSpec(), lldb_private::SectionLoadList::IsEmpty(), lldb_private::Address::IsValid(), LLDB_INVALID_ADDRESS, m_arch, m_images, ReadScalarIntegerFromMemory(), lldb_private::ModuleList::ResolveFileAddress(), lldb_private::SectionLoadList::ResolveLoadAddress(), lldb_private::Address::SetOffset(), and lldb_private::Scalar::ULongLong().
Referenced by ObjectFileELF::GetImageInfoAddress(), and DynamicLoaderDarwinKernel::ReadKextSummaryHeader().
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 2089 of file Target.cpp.
References error(), lldb_private::ArchSpec::GetAddressByteSize(), lldb_private::ArchSpec::GetByteOrder(), lldb_private::DataExtractor::GetMaxU32(), lldb_private::DataExtractor::GetMaxU64(), lldb_private::Target::Arch::GetSpec(), m_arch, ReadMemory(), and lldb_private::Scalar::SignExtend().
Referenced by ReadPointerFromMemory(), and ReadUnsignedIntegerFromMemory().
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 2040 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 2118 of file Target.cpp.
References error(), ReadScalarIntegerFromMemory(), and lldb_private::Scalar::ULongLong().
Referenced by DYLDRendezvous::FindMetadata(), ObjectFileELF::GetImageInfoAddress(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), and SystemRuntimeMacOSX::ReadLibdispatchTSDIndexes().
void Target::RemoveAllBreakpoints | ( | bool | internal_also = false | ) |
Definition at line 959 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, m_internal_breakpoint_list, m_last_created_breakpoint, and lldb_private::BreakpointList::RemoveAll().
void Target::RemoveAllowedBreakpoints | ( | ) |
Definition at line 950 of file Target.cpp.
References lldb_private::Breakpoints, lldb_private::GetLog(), LLDB_LOGF, m_breakpoint_list, m_last_created_breakpoint, and lldb_private::BreakpointList::RemoveAllowed().
Referenced by CommandObjectBreakpointDelete::DoExecute().
void Target::RemoveAllStopHooks | ( | ) |
Definition at line 2859 of file Target.cpp.
References m_stop_hooks.
Referenced by CommandObjectTargetStopHookDelete::DoExecute().
bool Target::RemoveAllWatchpoints | ( | bool | end_to_end = true | ) |
Definition at line 1225 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(), lldb_private::WatchpointList::RemoveAll(), lldb_private::WatchpointList::Watchpoints(), and lldb_private::Watchpoints.
Referenced by CommandObjectWatchpointDelete::DoExecute().
bool Target::RemoveBreakpointByID | ( | lldb::break_id_t | break_id | ) |
Definition at line 1005 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, m_last_created_breakpoint, and lldb_private::BreakpointList::Remove().
Referenced by lldb_private::ThreadPlanStepUntil::Clear(), lldb_private::ThreadPlanStepThrough::ClearBackstopBreakpoint(), DynamicLoaderMacOS::ClearDYLDHandoverBreakpoint(), lldb_private::ThreadPlanStepRange::ClearNextBranchBreakpoint(), DynamicLoaderMacOS::ClearNotificationBreakpoint(), DynamicLoaderMacOSXDYLD::ClearNotificationBreakpoint(), DynamicLoaderMacOS::DoClear(), DynamicLoaderMacOSXDYLD::DoClear(), CommandObjectBreakpointSet::DoExecute(), CommandObjectBreakpointClear::DoExecute(), CommandObjectBreakpointDelete::DoExecute(), lldb_private::ThreadPlanRunToAddress::MischiefManaged(), lldb_private::ThreadPlanStepOut::MischiefManaged(), DynamicLoaderMacOS::SetNotificationBreakpoint(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), lldb_private::AppleThreadPlanStepThroughDirectDispatch::~AppleThreadPlanStepThroughDirectDispatch(), DynamicLoaderHexagonDYLD::~DynamicLoaderHexagonDYLD(), DynamicLoaderMacOS::~DynamicLoaderMacOS(), DynamicLoaderMacOSXDYLD::~DynamicLoaderMacOSXDYLD(), DynamicLoaderPOSIXDYLD::~DynamicLoaderPOSIXDYLD(), JITLoaderGDB::~JITLoaderGDB(), lldb_private::ThreadPlanRunToAddress::~ThreadPlanRunToAddress(), and lldb_private::ThreadPlanStepOut::~ThreadPlanStepOut().
void Target::RemoveNameFromBreakpoint | ( | lldb::BreakpointSP & | bp_sp, |
ConstString | name | ||
) |
Definition at line 797 of file Target.cpp.
References lldb_private::ConstString::AsCString().
Referenced by CommandObjectBreakpointNameDelete::DoExecute().
bool Target::RemoveStopHookByID | ( | lldb::user_id_t | uid | ) |
Definition at line 2854 of file Target.cpp.
References m_stop_hooks.
Referenced by CommandObjectTargetStopHookDelete::DoExecute(), and UndoCreateStopHook().
bool Target::RemoveWatchpointByID | ( | lldb::watch_id_t | watch_id | ) |
Definition at line 1391 of file Target.cpp.
References DisableWatchpointByID(), lldb_private::WatchpointList::FindByID(), lldb_private::GetLog(), LLDB_LOGF, m_last_created_watchpoint, m_watchpoint_list, lldb_private::WatchpointList::Remove(), 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 4972 of file Target.cpp.
References m_stats, and lldb_private::TargetStats::ToJSON().
Referenced by lldb_private::DebuggerStats::ReportStatistics().
void Target::ResetBreakpointHitCounts | ( | ) |
Resets the hit count of all breakpoints.
Definition at line 1062 of file Target.cpp.
References GetBreakpointList(), and lldb_private::BreakpointList::ResetHitCounts().
Referenced by CleanupProcess().
|
staticprotected |
Definition at line 3618 of file Target.cpp.
References lldb_private::eLazyBoolCalculate, and LLDB_INVALID_SIGNAL_NUMBER.
Referenced by ClearDummySignals().
bool Target::ResolveFileAddress | ( | lldb::addr_t | load_addr, |
Address & | so_addr | ||
) |
Definition at line 3119 of file Target.cpp.
References m_images, and lldb_private::ModuleList::ResolveFileAddress().
Referenced by lldb_private::ArchitectureMips::GetBreakableLoadAddress().
bool Target::ResolveLoadAddress | ( | lldb::addr_t | load_addr, |
Address & | so_addr, | ||
uint32_t | stop_id = SectionLoadHistory::eStopIDNow |
||
) |
Definition at line 3114 of file Target.cpp.
References m_section_load_history, and lldb_private::SectionLoadHistory::ResolveLoadAddress().
Referenced by lldb_private::StopInfoMachException::DeterminePtrauthFailure(), CommandObjectMemoryRegion::DumpRegion(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), lldb_private::IndirectCallEdge::GetCallee(), lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), getModuleFileSize(), lldb_private::AppleObjCTrampolineHandler::GetStepThroughDispatchPlan(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::ItaniumABILanguageRuntime::GetVTableInfo(), line_entry_helper(), lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule(), SystemRuntimeMacOSX::PopulatePendingItemsForQueue(), SystemRuntimeMacOSX::ReadLibdispatchTSDIndexes(), and DynamicLoaderMacOSXDYLD::SetNotificationBreakpoint().
bool Target::RunStopHooks | ( | ) |
Definition at line 2889 of file Target.cpp.
References lldb_private::Target::StopHook::AlreadyContinued, lldb::eDescriptionLevelBrief, error(), lldb::eStateStopped, lldb_private::Debugger::GetAsyncOutputStream(), 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_latest_stop_hook_id, m_process_sp, m_stop_hooks, m_suppress_stop_hooks, lldb_private::Stream::Printf(), lldb_private::Process, and lldb_private::Target::StopHook::RequestContinue.
void Target::SaveScriptedLaunchInfo | ( | lldb_private::ProcessInfo & | process_info | ) |
Definition at line 3197 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 1066 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::StructuredData::Object::GetAsArray(), 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 2882 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 1539 of file Target.cpp.
References ClearModules(), lldb_private::ArchSpec::CompatibleMatch, lldb_private::eLoadDependentsYes, error(), lldb_private::ArchSpec::GetArchitectureName(), GetDebugger(), GetExecutableModule(), lldb_private::TargetProperties::GetExecutableSearchPaths(), lldb_private::GetLog(), GetPlatform(), lldb_private::ModuleList::GetSharedModule(), lldb_private::Target::Arch::GetSpec(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsCompatibleMatch(), lldb_private::ArchSpec::IsValid(), LLDB_LOG, LLDB_LOGF, m_arch, lldb_private::ArchSpec::MergeFrom(), SetExecutableModule(), SetPlatform(), and lldb_private::Target.
Referenced by DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(), lldb_private::Process::CompleteAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), ProcessElfCore::DoLoadCore(), ProcessMachCore::DoLoadCore(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), MergeArchitecture(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::ReadMemoryModule(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos().
|
static |
Definition at line 2619 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 1472 of file Target.cpp.
References lldb_private::ModuleList::Append(), lldb_private::ModuleList::AppendIfNeeded(), ClearModules(), elapsed(), lldb_private::eLoadDependentsDefault, lldb_private::eLoadDependentsNo, lldb_private::eLoadDependentsYes, lldb_private::ArchSpec::GetArchitectureName(), lldb_private::TargetStats::GetCreateTime(), lldb_private::ObjectFile::GetDependentModules(), lldb_private::FileSpecList::GetFileSpecAtIndex(), lldb_private::GetLog(), GetOrCreateModule(), lldb_private::FileSpecList::GetSize(), lldb_private::Target::Arch::GetSpec(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsValid(), LLDB_LOG, LLDB_SCOPED_TIMERF, m_arch, m_images, m_platform_sp, m_stats, ModulesDidLoad(), and lldb_private::Target.
Referenced by lldb_private::Process::CompleteAttach(), ProcessKDP::DoConnectRemote(), ProcessElfCore::DoLoadCore(), lldb_private::DynamicLoader::GetTargetExecutable(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), ImageSearchPathsChanged(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::ProcessWindows::OnDebuggerConnected(), SetArchitecture(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), and lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos().
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 2626 of file Target.cpp.
References GetDebugger(), lldb_private::TargetList::GetNumTargets(), lldb_private::TargetList::GetTargetAtIndex(), lldb_private::Debugger::GetTargetList(), LLDB_INVALID_INDEX32, and m_label.
|
inline |
Definition at line 1451 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 274 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 3124 of file Target.cpp.
References lldb_private::SectionLoadHistory::eStopIDNow, lldb_private::SectionLoadHistory::GetLastStopID(), GetProcessSP(), lldb_private::SectionLoadHistory::GetSectionLoadAddress(), m_section_load_history, and lldb_private::SectionLoadHistory::SetSectionLoadAddress().
Referenced by ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), lldb_private::wasm::ObjectFileWasm::SetLoadAddress(), lldb_private::DynamicLoaderDarwin::UpdateImageLoadAddress(), DynamicLoaderHexagonDYLD::UpdateLoadedSections(), and updateSectionLoadAddress().
bool Target::SetSectionUnloaded | ( | const lldb::SectionSP & | section_sp | ) |
Definition at line 3173 of file Target.cpp.
References lldb_private::SectionLoadHistory::GetLastStopID(), GetProcessSP(), m_section_load_history, and lldb_private::SectionLoadHistory::SetSectionUnloaded().
Referenced by lldb_private::DynamicLoaderDarwin::UnloadModuleSections(), DynamicLoaderHexagonDYLD::UnloadSections(), and lldb_private::DynamicLoader::UnloadSectionsCommon().
bool Target::SetSectionUnloaded | ( | const lldb::SectionSP & | section_sp, |
lldb::addr_t | load_addr | ||
) |
Definition at line 3183 of file Target.cpp.
References lldb_private::SectionLoadHistory::GetLastStopID(), GetProcessSP(), m_section_load_history, and lldb_private::SectionLoadHistory::SetSectionUnloaded().
bool Target::SetStopHookActiveStateByID | ( | lldb::user_id_t | uid, |
bool | active_state | ||
) |
Definition at line 2871 of file Target.cpp.
References m_stop_hooks.
Referenced by CommandObjectTargetStopHookEnableDisable::DoExecute().
|
inline |
Definition at line 1417 of file Target.h.
References m_suppress_stop_hooks.
|
static |
Definition at line 2603 of file Target.cpp.
References lldb_private::Process::SettingsInitialize().
Referenced by lldb_private::Debugger::SettingsInitialize().
|
static |
Definition at line 2605 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 3376 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 1709 of file Target.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), eBroadcastBitSymbolsLoaded, lldb_private::ModuleList::GetSize(), m_breakpoint_list, m_internal_breakpoint_list, m_process_sp, m_valid, and lldb_private::BreakpointList::UpdateBreakpoints().
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 2847 of file Target.cpp.
References m_stop_hook_next_id, and RemoveStopHookByID().
size_t Target::UnloadModuleSections | ( | const lldb::ModuleSP & | module_sp | ) |
Definition at line 3154 of file Target.cpp.
References lldb_private::SectionLoadHistory::GetLastStopID(), lldb_private::SectionList::GetNumSections(), GetProcessSP(), lldb_private::SectionList::GetSectionAtIndex(), m_section_load_history, and lldb_private::SectionLoadHistory::SetSectionUnloaded().
Referenced by ModulesDidUnload(), and UnloadModuleSections().
size_t Target::UnloadModuleSections | ( | const ModuleList & | module_list | ) |
Definition at line 3144 of file Target.cpp.
References lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetSize(), and UnloadModuleSections().
|
staticprotected |
Definition at line 3591 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 3633 of file Target.cpp.
References m_dummy_signals, and UpdateSignalFromDummy().
Referenced by lldb_private::Process::CompleteAttach().
|
friend |
|
protected |
Definition at line 1556 of file Target.h.
Referenced by Destroy(), DidExec(), GetArchitecture(), GetArchitecturePlugin(), MergeArchitecture(), ReadPointerFromMemory(), ReadScalarIntegerFromMemory(), SetArchitecture(), and SetExecutableModule().
|
protected |
Definition at line 1561 of file Target.h.
Referenced by AddBreakpoint(), AddNameToBreakpoint(), ApplyNameToBreakpoints(), CleanupProcess(), DeleteBreakpointName(), Destroy(), DidExec(), DisableAllBreakpoints(), DisableAllowedBreakpoints(), DisableBreakpointByID(), Dump(), EnableAllBreakpoints(), EnableAllowedBreakpoints(), EnableBreakpointByID(), GetBreakpointByID(), GetBreakpointList(), ModulesDidLoad(), ModulesDidUnload(), NotifyModuleUpdated(), PrimeFromDummyTarget(), RemoveAllBreakpoints(), RemoveAllowedBreakpoints(), RemoveBreakpointByID(), and SymbolsDidLoad().
|
protected |
Definition at line 1565 of file Target.h.
Referenced by AddBreakpointName(), DeleteBreakpointName(), FindBreakpointName(), GetBreakpointNames(), and PrimeFromDummyTarget().
|
protected |
Definition at line 1546 of file Target.h.
Referenced by GetDebugger(), GetREPL(), and RunStopHooks().
|
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 1600 of file Target.h.
Referenced by AddDummySignal(), ClearDummySignals(), PrimeFromDummyTarget(), PrintDummySignals(), and UpdateSignalsFromDummy().
|
protected |
Stores the frame recognizers of this target.
Definition at line 1596 of file Target.h.
Referenced by GetFrameRecognizerManager(), and PrimeFromDummyTarget().
|
protected |
Definition at line 1575 of file Target.h.
Referenced by Destroy(), GetImageSearchPathList(), and GetOrCreateModule().
|
protected |
The list of images for this process (shared libraries and anything dynamically loaded).
Definition at line 1558 of file Target.h.
Referenced by ClearModules(), Dump(), GetExecutableModule(), GetImages(), GetOrCreateModule(), LoadScriptingResources(), ReadMemory(), ReadPointerFromMemory(), ResolveFileAddress(), and SetExecutableModule().
|
protected |
Definition at line 1562 of file Target.h.
Referenced by AddBreakpoint(), CleanupProcess(), Destroy(), DidExec(), DisableAllBreakpoints(), DisableBreakpointByID(), Dump(), EnableAllBreakpoints(), EnableBreakpointByID(), GetBreakpointByID(), GetBreakpointList(), ModulesDidLoad(), ModulesDidUnload(), NotifyModuleUpdated(), RemoveAllBreakpoints(), RemoveBreakpointByID(), and SymbolsDidLoad().
|
protected |
Used to not run stop hooks for expressions.
Definition at line 1590 of file Target.h.
Referenced by IsDummyTarget().
|
protected |
Definition at line 1557 of file Target.h.
Referenced by GetLabel(), and SetLabel().
|
protected |
Definition at line 1567 of file Target.h.
Referenced by AddBreakpoint(), Destroy(), GetLastCreatedBreakpoint(), RemoveAllBreakpoints(), RemoveAllowedBreakpoints(), and RemoveBreakpointByID().
|
protected |
Definition at line 1569 of file Target.h.
Referenced by CreateWatchpoint(), Destroy(), GetLastCreatedWatchpoint(), RemoveAllWatchpoints(), and RemoveWatchpointByID().
|
protected |
Definition at line 1586 of file Target.h.
Referenced by CleanupProcess(), and RunStopHooks().
|
protected |
An API mutex that is used by the lldb::SB* classes make the SB interface thread safe.
Definition at line 1548 of file Target.h.
Referenced by Destroy(), and GetAPIMutex().
|
protected |
|
protected |
The platform for this target.
Definition at line 1547 of file Target.h.
Referenced by Destroy(), FinalizeFileActions(), GetOrCreateModule(), GetPlatform(), ModuleIsExcludedForUnconstrainedSearches(), SetExecutableModule(), and SetPlatform().
|
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 1555 of file Target.h.
Referenced by GetAPIMutex().
|
protected |
Definition at line 1573 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(), and SymbolsDidLoad().
|
protected |
|
protected |
Definition at line 1576 of file Target.h.
Referenced by ClearModules(), GetPersistentSymbol(), GetPersistentVariable(), GetScratchTypeSystemForLanguage(), and ModulesDidUnload().
|
protected |
Definition at line 1574 of file Target.h.
Referenced by Destroy(), GetSearchFilterForModule(), and GetSearchFilterForModuleList().
|
protected |
Definition at line 1560 of file Target.h.
Referenced by ClearAllLoadedSections(), ClearModules(), DeleteCurrentProcess(), Destroy(), GetSectionLoadList(), ResolveLoadAddress(), SetSectionLoadAddress(), SetSectionUnloaded(), and UnloadModuleSections().
|
protected |
Definition at line 1581 of file Target.h.
Referenced by GetSourceManager().
|
private |
Definition at line 1608 of file Target.h.
Referenced by Attach(), EvaluateExpression(), GetStatistics(), Launch(), ReportStatistics(), and SetExecutableModule().
|
protected |
Definition at line 1585 of file Target.h.
Referenced by CreateStopHook(), Destroy(), and UndoCreateStopHook().
|
protected |
Definition at line 1584 of file Target.h.
Referenced by CreateStopHook(), Destroy(), GetNumStopHooks(), GetStopHookAtIndex(), GetStopHookByID(), PrimeFromDummyTarget(), RemoveAllStopHooks(), RemoveStopHookByID(), RunStopHooks(), SetAllStopHooksActiveState(), and SetStopHookActiveStateByID().
|
protected |
Definition at line 1589 of file Target.h.
Referenced by Destroy(), EvaluateExpression(), GetSuppressStopHooks(), RunStopHooks(), and SetSuppresStopHooks().
|
protected |
An optional lldb_private::Trace object containing processor trace information of this target.
Definition at line 1594 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 1588 of file Target.h.
Referenced by Destroy(), GetScratchTypeSystemForLanguage(), GetScratchTypeSystems(), IsValid(), ModulesDidLoad(), ModulesDidUnload(), NotifyModuleAdded(), NotifyModuleRemoved(), NotifyModuleUpdated(), and SymbolsDidLoad().
|
protected |
Definition at line 1568 of file Target.h.
Referenced by ClearAllWatchpointHistoricValues(), ClearAllWatchpointHitCounts(), CreateWatchpoint(), Destroy(), DisableAllWatchpoints(), DisableWatchpointByID(), EnableAllWatchpoints(), EnableWatchpointByID(), GetWatchpointList(), IgnoreAllWatchpoints(), IgnoreWatchpointByID(), RemoveAllWatchpoints(), and RemoveWatchpointByID().