9#ifndef LLDB_TARGET_TARGET_H
10#define LLDB_TARGET_TARGET_H
40#include "llvm/ADT/StringRef.h"
130 llvm::StringRef
GetArg0()
const;
132 void SetArg0(llvm::StringRef arg);
311#pragma warning(disable : 4268)
349 if (prefix && prefix[0])
436 if (path && path[0]) {
506class Target :
public std::enable_shared_from_this<Target>,
595 llvm::Error
SetLabel(llvm::StringRef label);
629 Status *error_ptr =
nullptr);
656 llvm::StringRef plugin_name,
689 const FileSpec &file, uint32_t line_no,
692 LazyBool skip_prologue,
bool internal,
693 bool request_hardware,
702 const std::unordered_set<std::string> &function_names,
708 bool request_hardware);
714 bool request_hardware);
718 bool request_hardware);
728 bool internal,
bool request_hardware);
737 const FileSpecList *containingSourceFiles,
const char *func_name,
740 bool request_hardware);
744 bool throw_bp,
bool internal,
745 Args *additional_args =
nullptr,
746 Status *additional_args_error =
nullptr);
749 const llvm::StringRef class_name,
const FileSpecList *containingModules,
750 const FileSpecList *containingSourceFiles,
bool internal,
752 Status *creation_error =
nullptr);
761 const FileSpecList *containingSourceFiles,
const char *func_names[],
762 size_t num_names, lldb::FunctionNameType func_name_type_mask,
764 bool internal,
bool request_hardware);
769 const std::vector<std::string> &func_names,
770 lldb::FunctionNameType func_name_type_mask,
772 LazyBool skip_prologue,
bool internal,
773 bool request_hardware);
778 bool internal,
bool request_hardware,
779 bool resolve_indirect_symbols);
869 std::vector<std::string> &names,
975 bool continue_on_error =
true) {
977 this, errors, feedback_stream, continue_on_error);
1106 size_t dst_max_len,
Status &result_error,
1107 bool force_live_memory =
false);
1138 bool force_live_memory =
true);
1141 bool is_signed,
Scalar &scalar,
1143 bool force_live_memory =
false);
1146 size_t integer_byte_size,
1148 bool force_live_memory =
false);
1152 bool force_live_memory =
false);
1174 llvm::Expected<lldb::TypeSystemSP>
1176 bool create_on_demand =
true);
1178 std::vector<lldb::TypeSystemSP>
1205 const Address &function_address,
1210 llvm::Expected<std::unique_ptr<UtilityFunction>>
1225 bool warn_multiple =
false);
1277 std::string *fixed_expression =
nullptr,
ValueObject *ctx_obj =
nullptr);
1303 uint32_t byte_size);
1454 StopHookCollection::iterator pos =
m_stop_hooks.begin();
1460 return (*pos).second;
1483 const char *repl_options,
bool can_create);
1579 std::map<ConstString, std::unique_ptr<BreakpointName>>;
1593 typedef std::map<lldb::LanguageType, lldb::REPLSP>
REPLMap;
static llvm::raw_ostream & error(Stream &strm)
A section + offset based address class.
An architecture specification class.
A command line argument class.
General Outline: Allows adding and removing breakpoints and find by ID and index.
"lldb/Breakpoint/BreakpointOptions.h" Class that manages the options on a breakpoint or breakpoint lo...
An event broadcasting class.
Generic representation of a type in a programming language.
A uniqued constant string class.
A class to manage flag bits.
const char * GetPrefix() const
bool GetColorizeErrors() const
void SetOneThreadTimeout(const Timeout< std::micro > &timeout)
uint64_t m_retries_with_fixits
uint64_t GetRetriesWithFixIts() const
void SetUnwindOnError(bool unwind=false)
SourceLanguage GetLanguage() const
const char * GetPoundLineFilePath() const
bool GetAutoApplyFixIts() const
bool m_suppress_persistent_result
uint32_t GetPoundLineLine() const
bool GetStopOthers() const
bool DoesKeepInMemory() const
bool DoesIgnoreBreakpoints() const
lldb::DynamicValueType m_use_dynamic
void SetExecutionPolicy(ExecutionPolicy policy=eExecutionPolicyAlways)
void * m_cancel_callback_baton
Timeout< std::micro > m_one_thread_timeout
bool InvokeCancelCallback(lldb::ExpressionEvaluationPhase phase) const
lldb::DynamicValueType GetUseDynamic() const
void SetKeepInMemory(bool keep=true)
bool GetREPLEnabled() const
void SetCoerceToId(bool coerce=true)
void SetLanguage(lldb::LanguageType language_type)
bool IsForUtilityExpr() const
bool GetTryAllThreads() const
ExecutionPolicy GetExecutionPolicy() const
void SetTrapExceptions(bool b)
bool m_ignore_breakpoints
Timeout< std::micro > m_timeout
bool GetSuppressPersistentResult() const
void SetPrefix(const char *prefix)
void SetTryAllThreads(bool try_others=true)
EvaluateExpressionOptions()=default
void SetPoundLine(const char *path, uint32_t line) const
void SetRetriesWithFixIts(uint64_t number_of_retries)
void SetTimeout(const Timeout< std::micro > &timeout)
SourceLanguage m_language
uint32_t m_pound_line_line
static constexpr ExecutionPolicy default_execution_policy
void SetAutoApplyFixIts(bool b)
std::string m_pound_line_file
void SetColorizeErrors(bool b)
void SetStopOthers(bool stop_others=true)
bool GetTrapExceptions() const
bool m_running_utility_expression
True if the executed code should be treated as utility code that is only used by LLDB internally.
ExecutionPolicy m_execution_policy
void SetIsForUtilityExpr(bool b)
bool DoesUnwindOnError() const
void SetCancelCallback(lldb::ExpressionCancelCallback callback, void *baton)
void SetREPLEnabled(bool b)
const Timeout< std::micro > & GetTimeout() const
bool GetGenerateDebugInfo() const
void SetSuppressPersistentResult(bool b)
bool m_generate_debug_info
void SetIgnoreBreakpoints(bool ignore=false)
void SetLanguage(uint16_t name, uint32_t version)
Set the language using a pair of language code and version as defined by the DWARF 6 specification.
void SetUseDynamic(lldb::DynamicValueType dynamic=lldb::eDynamicCanRunTarget)
lldb::ExpressionCancelCallback m_cancel_callback
static constexpr std::chrono::milliseconds default_timeout
bool DoesCoerceToId() const
const Timeout< std::micro > & GetOneThreadTimeout() const
void SetGenerateDebugInfo(bool b)
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Encapsulates a function that can be called.
A collection class for Module objects.
bool LoadScriptingResourcesInTarget(Target *target, std::list< Status > &errors, Stream &feedback_stream, bool continue_on_error=true)
A class that describes an executable image and its associated object and symbol files.
SectionLoadList & GetCurrentSectionLoadList()
Class that provides a registry of known stack frame recognizers.
A stream class that can stream formatted output to a file.
std::shared_ptr< Object > ObjectSP
A class that wraps a std::map of SummaryStatistics objects behind a mutex.
Defines a symbol context baton that can be handed other debug core functions.
TargetExperimentalProperties()
uint32_t GetMaximumSizeOfStringSummary() const
FileSpecList GetDebugFileSearchPaths()
llvm::StringRef GetLaunchWorkingDirectory() const
bool GetDisplayRecognizedArguments() const
ImportStdModule GetImportStdModule() const
bool GetDisableSTDIO() const
bool GetMoveToNearestCode() const
~TargetProperties() override
void AppendExecutableSearchPaths(const FileSpec &)
void SetInheritTCC(bool b)
bool GetEnableSyntheticValue() const
void SetStandardInputPath(const char *path)=delete
void UpdateLaunchInfoFromProperties()
ProcessLaunchInfo m_launch_info
uint64_t GetExprAllocAlign() const
MemoryModuleLoadLevel GetMemoryModuleLoadLevel() const
llvm::StringRef GetArg0() const
uint32_t GetMaximumMemReadSize() const
void SetRunArguments(const Args &args)
FileSpec GetStandardErrorPath() const
bool GetEnableNotifyAboutFixIts() const
bool SetPreferDynamicValue(lldb::DynamicValueType d)
void SetDisplayRecognizedArguments(bool b)
std::optional< bool > GetExperimentalPropertyValue(size_t prop_idx, ExecutionContext *exe_ctx=nullptr) const
bool GetDisableASLR() const
bool GetUseFastStepping() const
const ProcessLaunchInfo & GetProcessLaunchInfo() const
Environment ComputeEnvironment() const
void Arg0ValueChangedCallback()
void SetStandardOutputPath(const char *path)=delete
bool GetUserSpecifiedTrapHandlerNames(Args &args) const
uint64_t GetExprErrorLimit() const
bool GetEnableAutoImportClangModules() const
bool GetDebugUtilityExpression() const
void CheckJITObjectsDir()
bool GetSkipPrologue() const
DynamicClassInfoHelper GetDynamicClassInfoHelper() const
FileSpec GetStandardOutputPath() const
void InputPathValueChangedCallback()
void SetDisplayRuntimeSupportValues(bool b)
uint32_t GetMaximumNumberOfChildrenToDisplay() const
void SetRequireHardwareBreakpoints(bool b)
void SetDisableSTDIO(bool b)
bool GetAutoInstallMainExecutable() const
const char * GetDisassemblyFeatures() const
RealpathPrefixes GetSourceRealpathPrefixes() const
uint64_t GetNumberOfRetriesWithFixits() const
uint64_t GetExprAllocSize() const
llvm::StringRef GetExpressionPrefixContents()
PathMappingList & GetObjectPathMap() const
const char * GetDisassemblyFlavor() const
void SetPreloadSymbols(bool b)
FileSpec GetStandardInputPath() const
bool GetInheritTCC() const
void InheritTCCValueChangedCallback()
lldb::DynamicValueType GetPreferDynamicValue() const
void DisableSTDIOValueChangedCallback()
InlineStrategy GetInlineStrategy() const
Environment GetTargetEnvironment() const
bool GetDisplayRuntimeSupportValues() const
void SetDetachOnError(bool b)
void SetUserSpecifiedTrapHandlerNames(const Args &args)
bool GetUseHexImmediates() const
bool GetPreloadSymbols() const
uint32_t GetMaxZeroPaddingInFloatFormat() const
uint64_t GetExprAllocAddress() const
void DetachOnErrorValueChangedCallback()
LoadCWDlldbinitFile GetLoadCWDlldbinitFile() const
Environment GetInheritedEnvironment() const
void SetArg0(llvm::StringRef arg)
void EnvVarsValueChangedCallback()
bool GetInjectLocalVariables(ExecutionContext *exe_ctx) const
void SetStandardErrorPath(const char *path)=delete
bool ShowHexVariableValuesWithLeadingZeroes() const
SourceLanguage GetLanguage() const
void OutputPathValueChangedCallback()
Environment GetEnvironment() const
void SetProcessLaunchInfo(const ProcessLaunchInfo &launch_info)
void RunArgsValueChangedCallback()
FileSpec GetSaveJITObjectsDir() const
void SetEnvironment(Environment env)
LoadScriptFromSymFile GetLoadScriptFromSymbolFile() const
const char * GetDisassemblyCPU() const
void SetStandardErrorPath(llvm::StringRef path)
bool GetRunArguments(Args &args) const
bool GetBreakpointsConsultPlatformAvoidList()
FileSpecList GetExecutableSearchPaths()
void SetDisableASLR(bool b)
ArchSpec GetDefaultArchitecture() const
Disassembler::HexImmediateStyle GetHexImmediateStyle() const
void SetUseDIL(ExecutionContext *exe_ctx, bool b)
std::unique_ptr< TargetExperimentalProperties > m_experimental_properties_up
FileSpecList GetClangModuleSearchPaths()
void SetStandardOutputPath(llvm::StringRef path)
void ErrorPathValueChangedCallback()
bool GetRequireHardwareBreakpoints() const
PathMappingList & GetSourcePathMap() const
bool GetAutoSourceMapRelative() const
bool GetUseDIL(ExecutionContext *exe_ctx) const
void SetDefaultArchitecture(const ArchSpec &arch)
void SetStandardInputPath(llvm::StringRef path)
bool GetDisplayExpressionsInCrashlogs() const
void DisableASLRValueChangedCallback()
bool GetEnableAutoApplyFixIts() const
void SetDebugUtilityExpression(bool debug)
std::pair< uint32_t, bool > GetMaximumDepthOfChildrenToDisplay() const
Get the max depth value, augmented with a bool to indicate whether the depth is the default.
bool GetDetachOnError() const
A class that represents statistics for a since lldb_private::Target.
std::unique_ptr< Architecture > m_plugin_up
const ArchSpec & GetSpec() const
const Arch & operator=(const ArchSpec &spec)
Architecture * GetPlugin() const
StringList & GetCommands()
~StopHookCommandLine() override=default
void SetActionFromString(const std::string &strings)
StopHookCommandLine(lldb::TargetSP target_sp, lldb::user_id_t uid)
void SetActionFromStrings(const std::vector< std::string > &strings)
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output_sp) override
void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const override
Status SetScriptCallback(std::string class_name, StructuredData::ObjectSP extra_args_sp)
StopHookResult HandleStop(ExecutionContext &exc_ctx, lldb::StreamSP output) override
StopHookScripted(lldb::TargetSP target_sp, lldb::user_id_t uid)
Use CreateStopHook to make a new empty stop hook.
void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const override
StructuredDataImpl m_extra_args
This holds the dictionary of keys & values that can be used to parametrize any given callback's behav...
lldb::ScriptedStopHookInterfaceSP m_interface_sp
~StopHookScripted() override=default
SymbolContextSpecifier * GetSpecifier()
void SetSpecifier(SymbolContextSpecifier *specifier)
virtual StopHookResult HandleStop(ExecutionContext &exe_ctx, lldb::StreamSP output)=0
std::unique_ptr< ThreadSpec > m_thread_spec_up
void SetIsActive(bool is_active)
void SetThreadSpecifier(ThreadSpec *specifier)
ThreadSpec * GetThreadSpecifier()
lldb::TargetSP m_target_sp
bool GetAutoContinue() const
bool ExecutionContextPasses(const ExecutionContext &exe_ctx)
lldb::TargetSP & GetTarget()
lldb::SymbolContextSpecifierSP m_specifier_sp
virtual void GetSubclassDescription(Stream &s, lldb::DescriptionLevel level) const =0
void GetDescription(Stream &s, lldb::DescriptionLevel level) const
void SetAutoContinue(bool auto_continue)
virtual ~StopHook()=default
const ModuleList & GetModuleList() const
void Dump(Stream *s) const override
static llvm::StringRef GetFlavorString()
static ModuleList GetModuleListFromEvent(const Event *event_ptr)
~TargetEventData() override
static const TargetEventData * GetEventDataFromEvent(const Event *event_ptr)
llvm::StringRef GetFlavor() const override
const lldb::TargetSP & GetTarget() const
TargetEventData(const TargetEventData &)=delete
lldb::TargetSP m_target_sp
const TargetEventData & operator=(const TargetEventData &)=delete
static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr)
void ModulesDidLoad(ModuleList &module_list)
lldb::ThreadSP CalculateThread() override
StopHookCollection m_stop_hooks
Module * GetExecutableModulePointer()
void Dump(Stream *s, lldb::DescriptionLevel description_level)
Dump a description of this object to a Stream.
bool m_suppress_stop_hooks
void DisableAllBreakpoints(bool internal_also=false)
lldb::WatchpointSP CreateWatchpoint(lldb::addr_t addr, size_t size, const CompilerType *type, uint32_t kind, Status &error)
void ApplyNameToBreakpoints(BreakpointName &bp_name)
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...
lldb::TraceSP GetTrace()
Get the Trace object containing processor trace information of this target.
PathMappingList & GetImageSearchPathList()
void FinalizeFileActions(ProcessLaunchInfo &info)
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::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)
static Target * GetTargetFromContexts(const ExecutionContext *exe_ctx_ptr, const SymbolContext *sc_ptr)
lldb::addr_t GetBreakableLoadAddress(lldb::addr_t addr)
void ClearDummySignals(Args &signal_names)
Clear the dummy signals in signal_names from the target, or all signals if signal_names is empty.
bool SetSuppresStopHooks(bool suppress)
static void ImageSearchPathsChanged(const PathMappingList &path_list, void *baton)
llvm::Expected< lldb_private::Address > GetEntryPointAddress()
This method will return the address of the starting function for this binary, e.g.
bool IgnoreWatchpointByID(lldb::watch_id_t watch_id, uint32_t ignore_count)
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 GetBreakpointByID(lldb::break_id_t break_id)
std::shared_ptr< StopHook > StopHookSP
llvm::StringRef GetBroadcasterClass() const override
This needs to be filled in if you are going to register the broadcaster with the broadcaster manager ...
void SymbolsDidLoad(ModuleList &module_list)
bool ClearAllWatchpointHistoricValues()
void SetTrace(const lldb::TraceSP &trace_sp)
Set the Trace object containing processor trace information of this target.
BreakpointList & GetBreakpointList(bool internal=false)
CompilerType GetRegisterType(const std::string &name, const lldb_private::RegisterFlags &flags, uint32_t byte_size)
BreakpointNameList m_breakpoint_names
lldb_private::SummaryStatisticsCache & GetSummaryStatisticsCache()
llvm::StringRef GetABIName() const
Returns the name of the target's ABI plugin.
SourceManager & GetSourceManager()
lldb::SearchFilterSP GetSearchFilterForModuleList(const FileSpecList *containingModuleList)
StopHookSP GetStopHookByID(lldb::user_id_t uid)
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 t...
lldb::ProcessSP m_process_sp
lldb::SearchFilterSP m_search_filter_sp
PersistentExpressionState * GetPersistentExpressionStateForLanguage(lldb::LanguageType language)
void UpdateSignalsFromDummy(lldb::UnixSignalsSP signals_sp, lldb::StreamSP warning_stream_sp)
Updates the signals in signals_sp using the stored dummy signals.
bool m_is_dummy_target
Used to not run stop hooks for expressions.
static bool UpdateSignalFromDummy(lldb::UnixSignalsSP signals_sp, const DummySignalElement &element)
PathMappingList m_image_search_paths
bool ModuleIsExcludedForUnconstrainedSearches(const FileSpec &module_spec)
Return whether this FileSpec corresponds to a module that should be considered for general searches.
lldb::StackFrameSP CalculateStackFrame() override
SectionLoadList & GetSectionLoadList()
lldb::addr_t GetPersistentSymbol(ConstString name)
void PrimeFromDummyTarget(Target &target)
std::map< ConstString, std::unique_ptr< BreakpointName > > BreakpointNameList
static void SettingsTerminate()
bool EnableWatchpointByID(lldb::watch_id_t watch_id)
bool ResolveFileAddress(lldb::addr_t load_addr, Address &so_addr)
bool ClearAllWatchpointHitCounts()
size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len, Status &error)
void ClearAllLoadedSections()
size_t GetNumStopHooks() const
std::vector< lldb::TypeSystemSP > GetScratchTypeSystems(bool create_on_demand=true)
size_t ReadScalarIntegerFromMemory(const Address &addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Status &error, bool force_live_memory=false)
void AddNameToBreakpoint(BreakpointID &id, llvm::StringRef name, Status &error)
bool LoadScriptingResources(std::list< Status > &errors, Stream &feedback_stream, bool continue_on_error=true)
void DeleteCurrentProcess()
BreakpointList m_internal_breakpoint_list
void DisableAllowedBreakpoints()
bool SetSectionUnloaded(const lldb::SectionSP §ion_sp)
lldb::TargetSP CalculateTarget() override
const lldb::ProcessSP & GetProcessSP() const
void ClearModules(bool delete_locations)
bool RemoveBreakpointByID(lldb::break_id_t break_id)
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 th...
static bool ResetSignalFromDummy(lldb::UnixSignalsSP signals_sp, const DummySignalElement &element)
Architecture * GetArchitecturePlugin() const
llvm::json::Value ReportStatistics(const lldb_private::StatisticsOptions &options)
Get metrics associated with this target in JSON format.
FunctionCaller * GetFunctionCallerForLanguage(lldb::LanguageType language, const CompilerType &return_type, const Address &function_address, const ValueList &arg_value_list, const char *name, Status &error)
TargetStats & GetStatistics()
void EnableAllBreakpoints(bool internal_also=false)
Status Launch(ProcessLaunchInfo &launch_info, Stream *stream)
bool DisableBreakpointByID(lldb::break_id_t break_id)
lldb::BreakpointSP CreateBreakpointAtUserEntry(Status &error)
BreakpointName * FindBreakpointName(ConstString name, bool can_create, Status &error)
std::map< lldb::user_id_t, StopHookSP > StopHookCollection
llvm::Expected< lldb::TraceSP > CreateTrace()
Create a Trace object for the current target using the using the default supported tracing technology...
lldb::TraceSP m_trace_sp
An optional lldb_private::Trace object containing processor trace information of this target.
bool RemoveAllWatchpoints(bool end_to_end=true)
bool ReadPointerFromMemory(const Address &addr, Status &error, Address &pointer_addr, bool force_live_memory=false)
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,...
WatchpointList m_watchpoint_list
BreakpointList m_breakpoint_list
lldb::SourceManagerUP m_source_manager_up
virtual size_t ReadMemory(const Address &addr, void *dst, size_t dst_len, Status &error, bool force_live_memory=false, lldb::addr_t *load_addr_ptr=nullptr)
bool RemoveWatchpointByID(lldb::watch_id_t watch_id)
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.
void DeleteBreakpointName(ConstString name)
void NotifyWillClearList(const ModuleList &module_list) override
bool SetArchitecture(const ArchSpec &arch_spec, bool set_platform=false, bool merge=true)
Set the architecture for this target.
void NotifyModuleAdded(const ModuleList &module_list, const lldb::ModuleSP &module_sp) override
Implementing of ModuleList::Notifier.
llvm::Expected< lldb::TypeSystemSP > GetScratchTypeSystemForLanguage(lldb::LanguageType language, bool create_on_demand=true)
void ConfigureBreakpointName(BreakpointName &bp_name, const BreakpointOptions &options, const BreakpointName::Permissions &permissions)
lldb_private::SummaryStatisticsSP GetSummaryStatisticsSPForProviderName(lldb_private::TypeSummaryImpl &summary_provider)
lldb::SearchFilterSP GetSearchFilterForModuleAndCUList(const FileSpecList *containingModules, const FileSpecList *containingSourceFiles)
lldb::ModuleSP GetExecutableModule()
Gets the module for the main executable.
bool SetStopHookActiveStateByID(lldb::user_id_t uid, bool active_state)
const lldb::ProcessSP & CreateProcess(lldb::ListenerSP listener_sp, llvm::StringRef plugin_name, const FileSpec *crash_file, bool can_connect)
void SetAllStopHooksActiveState(bool active_state)
lldb::ExpressionVariableSP GetPersistentVariable(ConstString name)
void NotifyModulesRemoved(lldb_private::ModuleList &module_list) override
size_t ReadCStringFromMemory(const Address &addr, std::string &out_str, Status &error, bool force_live_memory=false)
std::recursive_mutex m_mutex
An API mutex that is used by the lldb::SB* classes make the SB interface thread safe.
void ModulesDidUnload(ModuleList &module_list, bool delete_locations)
void CalculateExecutionContext(ExecutionContext &exe_ctx) override
Reconstruct the object's execution context into sc.
llvm::Expected< lldb::TraceSP > GetTraceOrCreate()
If a Trace object is present, this returns it, otherwise a new Trace is created with Trace::CreateTra...
void NotifyModuleUpdated(const ModuleList &module_list, const lldb::ModuleSP &old_module_sp, const lldb::ModuleSP &new_module_sp) override
SummaryStatisticsCache m_summary_statistics_cache
Target(const Target &)=delete
Status SerializeBreakpointsToFile(const FileSpec &file, const BreakpointIDList &bp_ids, bool append)
void DidExec()
Called as the last function in Process::DidExec().
void SaveScriptedLaunchInfo(lldb_private::ProcessInfo &process_info)
bool GetSuppressStopHooks()
lldb::user_id_t m_stop_hook_next_id
void RemoveAllStopHooks()
static FileSpecList GetDefaultExecutableSearchPaths()
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::SearchFilterSP GetSearchFilterForModule(const FileSpec *containingModule)
llvm::StringMapEntry< DummySignalValues > DummySignalElement
std::recursive_mutex & GetAPIMutex()
static llvm::StringRef GetStaticBroadcasterClass()
static FileSpecList GetDefaultDebugFileSearchPaths()
void EnableAllowedBreakpoints()
llvm::Error SetLabel(llvm::StringRef label)
Set a label for a target.
uint32_t m_latest_stop_hook_id
@ eBroadcastBitModulesLoaded
@ eBroadcastBitSymbolsChanged
@ eBroadcastBitSymbolsLoaded
@ eBroadcastBitModulesUnloaded
@ eBroadcastBitWatchpointChanged
@ eBroadcastBitBreakpointChanged
StackFrameRecognizerManager & GetFrameRecognizerManager()
void RemoveAllowedBreakpoints()
StopHookSP GetStopHookAtIndex(size_t index)
bool DisableAllWatchpoints(bool end_to_end=true)
const Target & operator=(const Target &)=delete
lldb::addr_t GetReasonableReadSize(const Address &addr)
Return a recommended size for memory reads at addr, optimizing for cache usage.
lldb::PlatformSP m_platform_sp
The platform for this target.
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.
static TargetProperties & GetGlobalProperties()
Status Install(ProcessLaunchInfo *launch_info)
lldb::PlatformSP GetPlatform()
void NotifyModuleRemoved(const ModuleList &module_list, const lldb::ModuleSP &module_sp) override
lldb::BreakpointSP CreateAddressInModuleBreakpoint(lldb::addr_t file_addr, bool internal, const FileSpec &file_spec, bool request_hardware)
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)
bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr, uint32_t stop_id=SectionLoadHistory::eStopIDNow)
void RemoveAllBreakpoints(bool internal_also=false)
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)
static ArchSpec GetDefaultArchitecture()
void ResetBreakpointHitCounts()
Resets the hit count of all breakpoints.
const ModuleList & GetImages() const
Get accessor for the images for this process.
const ArchSpec & GetArchitecture() const
WatchpointList & GetWatchpointList()
unsigned m_next_persistent_variable_index
bool EnableBreakpointByID(lldb::break_id_t break_id)
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)
uint64_t ReadUnsignedIntegerFromMemory(const Address &addr, size_t integer_byte_size, uint64_t fail_value, Status &error, bool force_live_memory=false)
bool IgnoreAllWatchpoints(uint32_t ignore_count)
void AddBreakpoint(lldb::BreakpointSP breakpoint_sp, bool internal)
TypeSystemMap m_scratch_type_system_map
void AddBreakpointName(std::unique_ptr< BreakpointName > bp_name)
SectionLoadHistory m_section_load_history
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)
void GetBreakpointNames(std::vector< std::string > &names)
bool IsDummyTarget() const
size_t UnloadModuleSections(const lldb::ModuleSP &module_sp)
const std::string & GetLabel() const
bool m_valid
This records the last natural stop at which we ran a stop-hook.
bool DisableWatchpointByID(lldb::watch_id_t watch_id)
void AddDummySignal(llvm::StringRef name, LazyBool pass, LazyBool print, LazyBool stop)
Add a signal to the Target's list of stored signals/actions.
lldb::WatchpointSP m_last_created_watchpoint
Status CreateBreakpointsFromFile(const FileSpec &file, BreakpointIDList &new_bps)
void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp)
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)
void SetExecutableModule(lldb::ModuleSP &module_sp, LoadDependentFiles load_dependent_files=eLoadDependentsDefault)
Set the main executable module.
lldb::StackFrameRecognizerManagerUP m_frame_recognizer_manager_up
Stores the frame recognizers of this target.
lldb::REPLSP GetREPL(Status &err, lldb::LanguageType language, const char *repl_options, bool can_create)
UserExpression * GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix, SourceLanguage language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj, Status &error)
ModuleList m_images
The list of images for this process (shared libraries and anything dynamically loaded).
lldb::ProcessSP CalculateProcess() override
void PrintDummySignals(Stream &strm, Args &signals)
Print all the signals set in this target.
void SetPlatform(const lldb::PlatformSP &platform_sp)
bool SetSectionLoadAddress(const lldb::SectionSP §ion, lldb::addr_t load_addr, bool warn_multiple=false)
Status Attach(ProcessAttachInfo &attach_info, Stream *stream)
std::map< lldb::LanguageType, lldb::REPLSP > REPLMap
static void SetDefaultArchitecture(const ArchSpec &arch)
lldb::BreakpointSP m_last_created_breakpoint
lldb::WatchpointSP GetLastCreatedWatchpoint()
void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, ConstString name)
bool RemoveStopHookByID(lldb::user_id_t uid)
lldb::BreakpointSP GetLastCreatedBreakpoint()
static void SettingsInitialize()
bool EnableAllWatchpoints(bool end_to_end=true)
std::recursive_mutex m_private_mutex
When the private state thread calls SB API's - usually because it is running OS plugin or Python Thre...
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)
bool MergeArchitecture(const ArchSpec &arch_spec)
Encapsulates a one-time expression for use in lldb.
This class is used by Watchpoint to manage a list of watchpoints,.
A class that represents a running process on the host machine.
std::shared_ptr< SummaryStatistics > SummaryStatisticsSP
@ eLoadScriptFromSymFileTrue
@ eLoadScriptFromSymFileFalse
@ eLoadScriptFromSymFileWarn
ExecutionPolicy
Expression execution policies.
@ eExecutionPolicyOnlyWhenNeeded
@ eDynamicClassInfoHelperCopyRealizedClassList
@ eDynamicClassInfoHelperGetRealizedClassList
@ eDynamicClassInfoHelperAuto
@ eDynamicClassInfoHelperRealizedClassesStruct
OptionEnumValues GetDynamicValueTypes()
@ eImportStdModuleFallback
llvm::ArrayRef< OptionEnumValueElement > OptionEnumValues
@ eInlineBreakpointsNever
@ eInlineBreakpointsAlways
@ eInlineBreakpointsHeaders
ExpressionEvaluationPhase
Expression Evaluation Stages.
std::shared_ptr< lldb_private::Trace > TraceSP
std::shared_ptr< lldb_private::ScriptedStopHookInterface > ScriptedStopHookInterfaceSP
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::SearchFilter > SearchFilterSP
std::shared_ptr< lldb_private::BreakpointResolver > BreakpointResolverSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::unique_ptr< lldb_private::StackFrameRecognizerManager > StackFrameRecognizerManagerUP
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::ExpressionVariable > ExpressionVariableSP
std::shared_ptr< lldb_private::UnixSignals > UnixSignalsSP
std::shared_ptr< lldb_private::Platform > PlatformSP
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Stream > StreamSP
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
ExpressionResults
The results of expression evaluation.
std::unique_ptr< lldb_private::SourceManager > SourceManagerUP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::SymbolContextSpecifier > SymbolContextSpecifierSP
std::shared_ptr< lldb_private::Watchpoint > WatchpointSP
std::shared_ptr< lldb_private::Listener > ListenerSP
std::shared_ptr< lldb_private::Section > SectionSP
std::shared_ptr< lldb_private::Target > TargetSP
bool(* ExpressionCancelCallback)(lldb::ExpressionEvaluationPhase phase, void *baton)
std::shared_ptr< lldb_private::Module > ModuleSP
std::shared_ptr< lldb_private::REPL > REPLSP
A type-erased pair of llvm::dwarf::SourceLanguageName and version.
Add a signal for the target.
DummySignalValues(LazyBool pass, LazyBool notify, LazyBool stop)
DummySignalValues()=default
A mix in class that contains a generic user ID.