LLDB mainline
lldb_private::wasm::ProcessWasm Class Reference

ProcessWasm provides the access to the Wasm program state retrieved from the Wasm engine. More...

#include <ProcessWasm.h>

Inheritance diagram for lldb_private::wasm::ProcessWasm:
[legend]

Public Member Functions

 ProcessWasm (lldb::TargetSP target_sp, lldb::ListenerSP listener_sp)
 ~ProcessWasm () override=default
llvm::StringRef GetPluginName () override
size_t ReadMemory (lldb::addr_t vm_addr, void *buf, size_t size, Status &error) override
 Read of memory from a process.
bool CanDebug (lldb::TargetSP target_sp, bool plugin_specified_by_name) override
 Check if a plug-in instance can debug the file in module.
llvm::Expected< std::vector< lldb::addr_t > > GetWasmCallStack (lldb::tid_t tid)
 Retrieve the current call stack from the WebAssembly remote process.
llvm::Expected< lldb::DataBufferSPGetWasmVariable (WasmVirtualRegisterKinds kind, int frame_index, int index)
 Query the value of a WebAssembly variable from the WebAssembly remote process.
Public Member Functions inherited from lldb_private::process_gdb_remote::ProcessGDBRemote
 ~ProcessGDBRemote () override
ArchSpec GetSystemArchitecture () override
 Get the system architecture for this process.
CommandObjectGetPluginCommandObject () override
 Return a multi-word command object that can be used to expose plug-in specific commands.
void DumpPluginHistory (Stream &s) override
 The underlying plugin might store the low-level communication history for this session.
Status DoWillLaunch (Module *module) override
 Called before launching to a process.
Status DoLaunch (Module *exe_module, ProcessLaunchInfo &launch_info) override
 Launch a new process.
void DidLaunch () override
 Called after launching a process.
Status DoWillAttachToProcessWithID (lldb::pid_t pid) override
 Called before attaching to a process.
Status DoWillAttachToProcessWithName (const char *process_name, bool wait_for_launch) override
 Called before attaching to a process.
Status DoConnectRemote (llvm::StringRef remote_url) override
 Attach to a remote system via a URL.
Status WillLaunchOrAttach ()
Status DoAttachToProcessWithID (lldb::pid_t pid, const ProcessAttachInfo &attach_info) override
 Attach to an existing process using a process ID.
Status DoAttachToProcessWithName (const char *process_name, const ProcessAttachInfo &attach_info) override
 Attach to an existing process using a partial process name.
void DidAttach (ArchSpec &process_arch) override
 Called after attaching a process.
Status WillResume () override
 Called before resuming to a process.
bool SupportsReverseDirection () override
 Reports whether this process supports reverse execution.
Status DoResume (lldb::RunDirection direction) override
 Resumes all of a process's threads as configured using the Thread run control functions.
Status DoHalt (bool &caused_stop) override
 Halts a running process.
Status DoDetach (bool keep_stopped) override
 Detaches from a running or stopped process.
bool DetachRequiresHalt () override
Status DoSignal (int signal) override
 Sends a process a UNIX signal signal.
Status DoDestroy () override
void RefreshStateAfterStop () override
 Currently called as part of ShouldStop.
void SetUnixSignals (const lldb::UnixSignalsSP &signals_sp)
bool IsAlive () override
 Check if a process is still alive.
lldb::addr_t GetImageInfoAddress () override
 Get the image information address for the current process.
void WillPublicStop () override
 Called when the process is about to broadcast a public stop.
size_t DoReadMemory (lldb::addr_t addr, void *buf, size_t size, Status &error) override
 Actually do the reading of memory from a process.
Status WriteObjectFile (std::vector< ObjectFile::LoadableData > entries) override
size_t DoWriteMemory (lldb::addr_t addr, const void *buf, size_t size, Status &error) override
 Actually do the writing of memory to a process.
lldb::addr_t DoAllocateMemory (size_t size, uint32_t permissions, Status &error) override
 Actually allocate memory in the process.
Status DoDeallocateMemory (lldb::addr_t ptr) override
 Actually deallocate memory in the process.
size_t PutSTDIN (const char *buf, size_t buf_size, Status &error) override
 Puts data into this process's STDIN.
Status EnableBreakpointSite (BreakpointSite *bp_site) override
Status DisableBreakpointSite (BreakpointSite *bp_site) override
Status EnableWatchpoint (lldb::WatchpointSP wp_sp, bool notify=true) override
Status DisableWatchpoint (lldb::WatchpointSP wp_sp, bool notify=true) override
std::optional< uint32_t > GetWatchpointSlotCount () override
 Get the number of watchpoints supported by this target.
llvm::Expected< TraceSupportedResponseTraceSupported () override
 Get the processor tracing type supported for this process.
llvm::Error TraceStop (const TraceStopRequest &request) override
 Stop tracing a live process or its threads.
llvm::Error TraceStart (const llvm::json::Value &request) override
 Start tracing a process or its threads.
llvm::Expected< std::string > TraceGetState (llvm::StringRef type) override
 Get the current tracing state of the process and its threads.
llvm::Expected< std::vector< uint8_t > > TraceGetBinaryData (const TraceGetBinaryDataRequest &request) override
 Get binary data given a trace technology and a data identifier.
std::optional< boolDoGetWatchpointReportedAfter () override
 Provide an override value in the subclass for lldb's CPU-based logic for whether watchpoint exceptions are received before or after an instruction executes.
bool StartNoticingNewThreads () override
 Call this to set the lldb in the mode where it breaks on new thread creations, and then auto-restarts.
bool StopNoticingNewThreads () override
 Call this to turn off the stop & notice new threads mode.
GDBRemoteCommunicationClientGetGDBRemote ()
Status SendEventData (const char *data) override
void DidExit () override
void SetUserSpecifiedMaxMemoryTransferSize (uint64_t user_specified_max)
bool GetModuleSpec (const FileSpec &module_file_spec, const ArchSpec &arch, ModuleSpec &module_spec) override
 Try to fetch the module specification for a module with the given file name and architecture.
void PrefetchModuleSpecs (llvm::ArrayRef< FileSpec > module_file_specs, const llvm::Triple &triple) override
llvm::VersionTuple GetHostOSVersion () override
 Sometimes the connection to a process can detect the host OS version that the process is running on.
llvm::VersionTuple GetHostMacCatalystVersion () override
llvm::Error LoadModules () override
 Sometimes processes know how to retrieve and load shared libraries.
llvm::Expected< LoadedModuleInfoListGetLoadedModuleList () override
 Query remote GDBServer for a detailed loaded library list.
Status GetFileLoadAddress (const FileSpec &file, bool &is_loaded, lldb::addr_t &load_addr) override
 Try to find the load address of a file.
void ModulesDidLoad (ModuleList &module_list) override
StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos (lldb::addr_t image_list_address, lldb::addr_t image_count) override
 Retrieve the list of shared libraries that are loaded for this process This method is used on pre-macOS 10.12, pre-iOS 10, pre-tvOS 10, pre- watchOS 3 systems.
Status ConfigureStructuredData (llvm::StringRef type_name, const StructuredData::ObjectSP &config_sp) override
 Configure asynchronous structured data feature.
StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos () override
StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos (const std::vector< lldb::addr_t > &load_addresses) override
StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos_sender (StructuredData::ObjectSP args)
StructuredData::ObjectSP GetSharedCacheInfo () override
StructuredData::ObjectSP GetDynamicLoaderProcessState () override
std::string HarmonizeThreadIdsForProfileData (StringExtractorGDBRemote &inputStringExtractor)
void DidFork (lldb::pid_t child_pid, lldb::tid_t child_tid) override
 Called after a reported fork.
void DidVFork (lldb::pid_t child_pid, lldb::tid_t child_tid) override
 Called after a reported vfork.
void DidVForkDone () override
 Called after reported vfork completion.
void DidExec () override
 Called after a process re-execs itself.
llvm::Expected< boolSaveCore (llvm::StringRef outfile) override
 Save core dump into the specified file.
Public Member Functions inherited from lldb_private::Process
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.
 ~Process () override
 Destructor.
lldb::ByteOrder GetByteOrder () const
uint32_t GetAddressByteSize () const
lldb::pid_t GetID () const
 Returns the pid of the process or LLDB_INVALID_PROCESS_ID if there is no known pid.
void SetID (lldb::pid_t new_pid)
 Sets the stored pid.
uint32_t GetUniqueID () const
virtual void Finalize (bool destructing)
 This object is about to be destroyed, do any necessary cleanup.
bool IsValid () const
 Return whether this object is valid (i.e.
virtual Status Launch (ProcessLaunchInfo &launch_info)
 Launch a new process.
virtual Status LoadCore ()
virtual Status DoLoadCore ()
void SetShadowListener (lldb::ListenerSP shadow_listener_sp)
 The "ShadowListener" for a process is just an ordinary Listener that listens for all the Process event bits.
UtilityFunctionGetLoadImageUtilityFunction (Platform *platform, llvm::function_ref< std::unique_ptr< UtilityFunction >()> factory)
 Get the cached UtilityFunction that assists in loading binary images into the process.
void SetDynamicLoader (lldb::DynamicLoaderUP dyld)
Status CalculateCoreFileSaveRanges (const SaveCoreOptions &core_options, CoreFileMemoryRanges &ranges)
 Helper function for Process::SaveCore(...) that calculates the address ranges that should be saved.
std::vector< lldb::ThreadSPCalculateCoreFileThreadList (const SaveCoreOptions &core_options)
 Helper function for Process::SaveCore(...) that calculates the thread list based upon options set within a given core_options object.
virtual SystemRuntimeGetSystemRuntime ()
 Get the system runtime plug-in for this process.
virtual Status Attach (ProcessAttachInfo &attach_info)
 Attach to an existing process using the process attach info.
virtual Status ConnectRemote (llvm::StringRef remote_url)
 Attach to a remote system via a URL.
bool GetShouldDetach () const
void SetShouldDetach (bool b)
const std::vector< lldb::addr_t > & GetImageTokens ()
 Get the image vector for the current process.
void RegisterNotificationCallbacks (const Process::Notifications &callbacks)
 Register for process and thread notifications.
bool UnregisterNotificationCallbacks (const Process::Notifications &callbacks)
 Unregister for process and thread notifications.
Status Resume ()
 Resumes all of a process's threads as configured using the Thread run control functions.
Status ResumeSynchronous (Stream *stream)
 Resume a process, and wait for it to stop.
Status Halt (bool clear_thread_plans=false, bool use_run_lock=true)
 Halts a running process.
Status Detach (bool keep_stopped)
 Detaches from a running or stopped process.
Status Destroy (bool force_kill)
 Kills the process and shuts down all threads that were spawned to track and monitor the process.
Status Signal (int signal)
 Sends a process a UNIX signal signal.
void SetUnixSignals (lldb::UnixSignalsSP &&signals_sp)
const lldb::UnixSignalsSPGetUnixSignals ()
Status WillAttachToProcessWithID (lldb::pid_t pid)
 Called before attaching to a process.
Status WillAttachToProcessWithName (const char *process_name, bool wait_for_launch)
 Called before attaching to a process.
virtual void DoDidExec ()
 Subclasses of Process should implement this function if they need to do anything after a process exec's itself.
Status WillLaunch (Module *module)
 Called before launching to a process.
virtual void DidResume ()
 Called after resuming a process.
virtual Status WillHalt ()
 Called before halting to a process.
virtual void DidHalt ()
 Called after halting a process.
virtual Status WillDetach ()
 Called before detaching from a process.
virtual void DidDetach ()
 Called after detaching from a process.
virtual Status WillSignal ()
 Called before sending a signal to a process.
virtual Status WillDestroy ()
virtual void DidDestroy ()
virtual bool DestroyRequiresHalt ()
virtual void DidSignal ()
 Called after sending a signal to a process.
TargetGetTarget ()
 Get the target object pointer for this module.
const TargetGetTarget () const
 Get the const target object pointer for this module.
void Flush ()
 Flush all data in the process.
lldb::StateType GetState ()
 Get accessor for the current process state.
lldb::ExpressionResults RunThreadPlan (ExecutionContext &exe_ctx, lldb::ThreadPlanSP &thread_plan_sp, const EvaluateExpressionOptions &options, DiagnosticManager &diagnostic_manager)
void GetStatus (Stream &ostrm)
size_t GetThreadStatus (Stream &ostrm, bool only_threads_with_stop_reason, uint32_t start_frame, uint32_t num_frames, uint32_t num_frames_with_source, bool stop_format)
void SendAsyncInterrupt (Thread *thread=nullptr)
 Send an async interrupt request.
void PrintWarningOptimization (const SymbolContext &sc)
 Print a user-visible warning about a module being built with optimization.
void PrintWarningUnsupportedLanguage (const SymbolContext &sc)
 Print a user-visible warning about a function written in a language that this version of LLDB doesn't support.
virtual bool GetProcessInfo (ProcessInstanceInfo &info)
virtual lldb_private::UUID FindModuleUUID (const llvm::StringRef path)
int GetExitStatus ()
 Get the exit status for a process.
const char * GetExitDescription ()
 Get a textual description of what the process exited.
lldb::addr_t GetCodeAddressMask ()
 Get the current address mask in the Process.
lldb::addr_t GetDataAddressMask ()
lldb::addr_t GetHighmemCodeAddressMask ()
 The highmem masks are for targets where we may have different masks for low memory versus high memory addresses, and they will be left as LLDB_INVALID_ADDRESS_MASK normally, meaning the base masks should be applied to all addresses.
lldb::addr_t GetHighmemDataAddressMask ()
void SetCodeAddressMask (lldb::addr_t code_address_mask)
void SetDataAddressMask (lldb::addr_t data_address_mask)
void SetHighmemCodeAddressMask (lldb::addr_t code_address_mask)
void SetHighmemDataAddressMask (lldb::addr_t data_address_mask)
lldb::addr_t FixCodeAddress (lldb::addr_t pc)
 Some targets might use bits in a code address to indicate a mode switch, ARM uses bit zero to signify a code address is thumb, so any ARM ABI plug-ins would strip those bits.
lldb::addr_t FixDataAddress (lldb::addr_t pc)
lldb::addr_t FixAnyAddress (lldb::addr_t pc)
 Use this method when you do not know, or do not care what kind of address you are fixing.
ProcessModID GetModID () const
 Get the Modification ID of the process.
const ProcessModIDGetModIDRef () const
uint32_t GetStopID () const
uint32_t GetResumeID () const
uint32_t GetLastUserExpressionResumeID () const
uint32_t GetLastNaturalStopID () const
lldb::EventSP GetStopEventForStopID (uint32_t stop_id) const
virtual bool SetExitStatus (int exit_status, llvm::StringRef exit_string)
 Set accessor for the process exit status (return code).
virtual bool IsLiveDebugSession () const
 Check if a process is a live debug session, or a corefile/post-mortem.
virtual FileSpec GetCoreFile () const
 Provide a way to retrieve the core dump file that is loaded for debugging.
virtual bool WarnBeforeDetach () const
 Before lldb detaches from a process, it warns the user that they are about to lose their debug session.
size_t ReadMemoryFromInferior (lldb::addr_t vm_addr, void *buf, size_t size, Status &error)
 Read of memory from a process.
lldb::offset_t ReadMemoryInChunks (lldb::addr_t vm_addr, void *buf, lldb::addr_t chunk_size, lldb::offset_t total_size, ReadMemoryChunkCallback callback)
 Read of memory from a process in discrete chunks, terminating either when all bytes are read, or the supplied callback returns IterationAction::Stop.
size_t ReadCStringFromMemory (lldb::addr_t vm_addr, char *cstr, size_t cstr_max_len, Status &error)
 Read a NULL terminated C string from memory.
size_t ReadCStringFromMemory (lldb::addr_t vm_addr, std::string &out_str, Status &error)
uint64_t ReadUnsignedIntegerFromMemory (lldb::addr_t load_addr, size_t byte_size, uint64_t fail_value, Status &error)
 Reads an unsigned integer of the specified byte size from process memory.
int64_t ReadSignedIntegerFromMemory (lldb::addr_t load_addr, size_t byte_size, int64_t fail_value, Status &error)
lldb::addr_t ReadPointerFromMemory (lldb::addr_t vm_addr, Status &error)
bool WritePointerToMemory (lldb::addr_t vm_addr, lldb::addr_t ptr_value, Status &error)
size_t WriteScalarToMemory (lldb::addr_t vm_addr, const Scalar &scalar, size_t size, Status &error)
 Write all or part of a scalar value to memory.
size_t ReadScalarIntegerFromMemory (lldb::addr_t addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Status &error)
size_t WriteMemory (lldb::addr_t vm_addr, const void *buf, size_t size, Status &error)
 Write memory to a process.
lldb::addr_t AllocateMemory (size_t size, uint32_t permissions, Status &error)
 The public interface to allocating memory in the process.
lldb::addr_t CallocateMemory (size_t size, uint32_t permissions, Status &error)
 The public interface to allocating memory in the process, this also clears the allocated memory.
llvm::Expected< const MemoryTagManager * > GetMemoryTagManager ()
 If this architecture and process supports memory tagging, return a tag manager that can be used to maniupulate those memory tags.
virtual llvm::Expected< std::vector< lldb::addr_t > > ReadMemoryTags (lldb::addr_t addr, size_t len)
 Read memory tags for the range addr to addr+len.
Status WriteMemoryTags (lldb::addr_t addr, size_t len, const std::vector< lldb::addr_t > &tags)
 Write memory tags for a range of memory.
virtual lldb::addr_t ResolveIndirectFunction (const Address *address, Status &error)
 Resolve dynamically loaded indirect functions.
Status GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info)
 Locate the memory region that contains load_addr.
virtual Status GetMemoryRegions (lldb_private::MemoryRegionInfos &region_list)
 Obtain all the mapped memory regions within this process.
bool GetWatchpointReportedAfter ()
 Whether lldb will be notified about watchpoints after the instruction has completed executing, or if the instruction is rolled back and it is notified before it executes.
lldb::ModuleSP ReadModuleFromMemory (const FileSpec &file_spec, lldb::addr_t header_addr, size_t size_to_read=512)
virtual bool GetLoadAddressPermissions (lldb::addr_t load_addr, uint32_t &permissions)
 Attempt to get the attributes for a region of memory in the process.
bool CanJIT ()
 Determines whether executing JIT-compiled code in this process is possible.
void SetCanJIT (bool can_jit)
 Sets whether executing JIT-compiled code in this process is possible.
bool CanInterpretFunctionCalls ()
 Determines whether executing function calls using the interpreter is possible for this process.
void SetCanInterpretFunctionCalls (bool can_interpret_function_calls)
 Sets whether executing function calls using the interpreter is possible for this process.
void SetCanRunCode (bool can_run_code)
 Sets whether executing code in this process is possible.
Status DeallocateMemory (lldb::addr_t ptr)
 The public interface to deallocating memory in the process.
virtual size_t GetSTDOUT (char *buf, size_t buf_size, Status &error)
 Get any available STDOUT.
virtual size_t GetSTDERR (char *buf, size_t buf_size, Status &error)
 Get any available STDERR.
virtual size_t GetAsyncProfileData (char *buf, size_t buf_size, Status &error)
 Get any available profile data.
size_t GetSoftwareBreakpointTrapOpcode (BreakpointSite *bp_site)
virtual Status EnableSoftwareBreakpoint (BreakpointSite *bp_site)
virtual Status DisableSoftwareBreakpoint (BreakpointSite *bp_site)
StopPointSiteList< lldb_private::BreakpointSite > & GetBreakpointSiteList ()
const StopPointSiteList< lldb_private::BreakpointSite > & GetBreakpointSiteList () const
void DisableAllBreakpointSites ()
Status ClearBreakpointSiteByID (lldb::user_id_t break_id)
lldb::break_id_t CreateBreakpointSite (const lldb::BreakpointLocationSP &owner, bool use_hardware)
Status DisableBreakpointSiteByID (lldb::user_id_t break_id)
Status EnableBreakpointSiteByID (lldb::user_id_t break_id)
void RemoveConstituentFromBreakpointSite (lldb::user_id_t site_id, lldb::user_id_t constituent_id, lldb::BreakpointSiteSP &bp_site_sp)
bool UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_thread_list)
 Update the thread list.
void UpdateThreadListIfNeeded ()
ThreadListGetThreadList ()
StopPointSiteList< lldb_private::WatchpointResource > & GetWatchpointResourceList ()
ThreadListGetExtendedThreadList ()
ThreadList::ThreadIterable Threads ()
uint32_t GetNextThreadIndexID (uint64_t thread_id)
lldb::ThreadSP CreateOSPluginThread (lldb::tid_t tid, lldb::addr_t context)
bool HasAssignedIndexIDToThread (uint64_t sb_thread_id)
uint32_t AssignIndexIDToThread (uint64_t thread_id)
virtual void UpdateQueueListIfNeeded ()
QueueListGetQueueList ()
QueueList::QueueIterable Queues ()
lldb::StateType GetNextEvent (lldb::EventSP &event_sp)
lldb::StateType WaitForProcessToStop (const Timeout< std::micro > &timeout, lldb::EventSP *event_sp_ptr=nullptr, bool wait_always=true, lldb::ListenerSP hijack_listener=lldb::ListenerSP(), Stream *stream=nullptr, bool use_run_lock=true, SelectMostRelevant select_most_relevant=DoNoSelectMostRelevantFrame)
uint32_t GetIOHandlerID () const
void SyncIOHandler (uint32_t iohandler_id, const Timeout< std::micro > &timeout)
 Waits for the process state to be running within a given msec timeout.
lldb::StateType GetStateChangedEvents (lldb::EventSP &event_sp, const Timeout< std::micro > &timeout, lldb::ListenerSP hijack_listener)
EventPeekAtStateChangedEvents ()
bool HijackProcessEvents (lldb::ListenerSP listener_sp)
 If you need to ensure that you and only you will hear about some public event, then make a new listener, set to listen to process events, and then call this with that listener.
void RestoreProcessEvents ()
 Restores the process event broadcasting to its normal state.
bool StateChangedIsHijackedForSynchronousResume ()
bool StateChangedIsExternallyHijacked ()
const lldb::ABISPGetABI ()
OperatingSystemGetOperatingSystem ()
std::vector< LanguageRuntime * > GetLanguageRuntimes ()
LanguageRuntimeGetLanguageRuntime (lldb::LanguageType language)
bool IsPossibleDynamicValue (ValueObject &in_value)
bool IsRunning () const
DynamicCheckerFunctionsGetDynamicCheckers ()
void SetDynamicCheckers (DynamicCheckerFunctions *dynamic_checkers)
bool PruneThreadPlansForTID (lldb::tid_t tid)
 Prune ThreadPlanStacks for unreported threads.
void PruneThreadPlans ()
 Prune ThreadPlanStacks for all unreported threads.
ThreadPlanStackFindThreadPlans (lldb::tid_t tid)
 Find the thread plan stack associated with thread with tid.
bool DumpThreadPlansForTID (Stream &strm, lldb::tid_t tid, lldb::DescriptionLevel desc_level, bool internal, bool condense_trivial, bool skip_unreported_plans)
 Dump the thread plans associated with thread with tid.
void DumpThreadPlans (Stream &strm, lldb::DescriptionLevel desc_level, bool internal, bool condense_trivial, bool skip_unreported_plans)
 Dump all the thread plans for this process.
void SetRunningUserExpression (bool on)
void SetRunningUtilityFunction (bool on)
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.
void SetSTDIOFileDescriptor (int file_descriptor)
void AddInvalidMemoryRegion (const LoadRange &region)
bool RemoveInvalidMemoryRange (const LoadRange &region)
void AddPreResumeAction (PreResumeActionCallback callback, void *baton)
bool RunPreResumeActions ()
void ClearPreResumeActions ()
void ClearPreResumeAction (PreResumeActionCallback callback, void *baton)
ProcessRunLockGetRunLock ()
bool CurrentThreadIsPrivateStateThread ()
bool CurrentThreadPosesAsPrivateStateThread ()
lldb::ThreadCollectionSP GetHistoryThreads (lldb::addr_t addr)
lldb::InstrumentationRuntimeSP GetInstrumentationRuntime (lldb::InstrumentationRuntimeType type)
virtual StructuredData::DictionarySP GetMetadata ()
 Fetch process defined metadata.
StructuredData::DictionarySP GetExtendedCrashInfoDict ()
 Fetch extended crash information held by the process.
void ResetExtendedCrashInfoDict ()
size_t AddImageToken (lldb::addr_t image_ptr)
lldb::addr_t GetImagePtrFromToken (size_t token) const
void ResetImageToken (size_t token)
Address AdvanceAddressToNextBranchInstruction (Address default_stop_addr, AddressRange range_bounds)
 Find the next branch instruction to set a breakpoint on.
void BroadcastStructuredData (const StructuredData::ObjectSP &object_sp, const lldb::StructuredDataPluginSP &plugin_sp)
 Broadcasts the given structured data object from the given plugin.
lldb::StructuredDataPluginSP GetStructuredDataPlugin (llvm::StringRef type_name) const
 Returns the StructuredDataPlugin associated with a given type name, if there is one.
virtual void * GetImplementation ()
virtual void ForceScriptedState (lldb::StateType state)
SourceManager::SourceFileCacheGetSourceFileCache ()
lldb::addr_t FindInMemory (lldb::addr_t low, lldb::addr_t high, const uint8_t *buf, size_t size)
 Find a pattern within a memory region.
AddressRanges FindRangesInMemory (const uint8_t *buf, uint64_t size, const AddressRanges &ranges, size_t alignment, size_t max_matches, Status &error)
lldb::addr_t FindInMemory (const uint8_t *buf, uint64_t size, const AddressRange &range, size_t alignment, Status &error)
lldb::RunDirection GetBaseDirection () const
 Get the base run direction for the process.
void SetBaseDirection (lldb::RunDirection direction)
 Set the base run direction for the process.
Public Member Functions inherited from lldb_private::ProcessProperties
 ProcessProperties (lldb_private::Process *process)
 ~ProcessProperties () override
bool GetDisableMemoryCache () const
uint64_t GetMemoryCacheLineSize () const
Args GetExtraStartupCommands () const
void SetExtraStartupCommands (const Args &args)
FileSpec GetPythonOSPluginPath () const
uint32_t GetVirtualAddressableBits () const
void SetVirtualAddressableBits (uint32_t bits)
uint32_t GetHighmemVirtualAddressableBits () const
void SetHighmemVirtualAddressableBits (uint32_t bits)
void SetPythonOSPluginPath (const FileSpec &file)
bool GetIgnoreBreakpointsInExpressions () const
void SetIgnoreBreakpointsInExpressions (bool ignore)
bool GetUnwindOnErrorInExpressions () const
void SetUnwindOnErrorInExpressions (bool ignore)
bool GetStopOnSharedLibraryEvents () const
void SetStopOnSharedLibraryEvents (bool stop)
bool GetDisableLangRuntimeUnwindPlans () const
void SetDisableLangRuntimeUnwindPlans (bool disable)
void DisableLanguageRuntimeUnwindPlansCallback ()
bool GetDetachKeepsStopped () const
void SetDetachKeepsStopped (bool keep_stopped)
bool GetWarningsOptimization () const
bool GetWarningsUnsupportedLanguage () const
bool GetStopOnExec () const
std::chrono::seconds GetUtilityExpressionTimeout () const
std::chrono::seconds GetInterruptTimeout () const
bool GetOSPluginReportsAllThreads () const
void SetOSPluginReportsAllThreads (bool does_report)
bool GetSteppingRunsAllThreads () const
FollowForkMode GetFollowForkMode () const
bool TrackMemoryCacheChanges () const
Public Member Functions inherited from lldb_private::Properties
 Properties ()
 Properties (const lldb::OptionValuePropertiesSP &collection_sp)
virtual ~Properties ()
lldb::OptionValuePropertiesSP GetValueProperties () const
virtual lldb::OptionValueSP GetPropertyValue (const ExecutionContext *exe_ctx, llvm::StringRef property_path, Status &error) const
virtual Status SetPropertyValue (const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef property_path, llvm::StringRef value)
virtual Status DumpPropertyValue (const ExecutionContext *exe_ctx, Stream &strm, llvm::StringRef property_path, uint32_t dump_mask, bool is_json=false)
virtual void DumpAllPropertyValues (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask, bool is_json=false)
virtual void DumpAllDescriptions (CommandInterpreter &interpreter, Stream &strm) const
size_t Apropos (llvm::StringRef keyword, std::vector< const Property * > &matching_properties) const
template<typename T>
GetPropertyAtIndexAs (uint32_t idx, T default_value, const ExecutionContext *exe_ctx=nullptr) const
template<typename T, typename U = typename std::remove_pointer<T>::type, std::enable_if_t< std::is_pointer_v< T >, bool > = true>
const U * GetPropertyAtIndexAs (uint32_t idx, const ExecutionContext *exe_ctx=nullptr) const
template<typename T>
bool SetPropertyAtIndex (uint32_t idx, T t, const ExecutionContext *exe_ctx=nullptr) const
Public Member Functions inherited from lldb_private::Broadcaster
 Broadcaster (lldb::BroadcasterManagerSP manager_sp, std::string name)
 Construct with a broadcaster with a name.
virtual ~Broadcaster ()
 Destructor.
void CheckInWithManager ()
void BroadcastEvent (lldb::EventSP &event_sp)
 Broadcast an event which has no associated data.
void BroadcastEventIfUnique (lldb::EventSP &event_sp)
void BroadcastEvent (uint32_t event_type, const lldb::EventDataSP &event_data_sp)
void BroadcastEvent (uint32_t event_type)
void BroadcastEventIfUnique (uint32_t event_type)
void Clear ()
virtual void AddInitialEventsToListener (const lldb::ListenerSP &listener_sp, uint32_t requested_events)
uint32_t AddListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask)
 Listen for any events specified by event_mask.
const std::string & GetBroadcasterName ()
 Get this broadcaster's name.
bool GetEventNames (Stream &s, const uint32_t event_mask, bool prefix_with_broadcaster_name) const
 Get the event name(s) for one or more event bits.
void SetEventName (uint32_t event_mask, const char *name)
 Set the name for an event bit.
const char * GetEventName (uint32_t event_mask) const
bool EventTypeHasListeners (uint32_t event_type)
bool RemoveListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX)
 Removes a Listener from this broadcasters list and frees the event bits specified by event_mask that were previously acquired by listener (assuming listener was listening to this object) for other listener objects to use.
bool HijackBroadcaster (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX)
 Provides a simple mechanism to temporarily redirect events from broadcaster.
bool IsHijackedForEvent (uint32_t event_mask)
void RestoreBroadcaster ()
 Restore the state of the Broadcaster from a previous hijack attempt.
lldb::BroadcasterManagerSP GetManager ()
void SetPrimaryListener (lldb::ListenerSP listener_sp)
lldb::ListenerSP GetPrimaryListener ()
Public Member Functions inherited from lldb_private::ExecutionContextScope
virtual ~ExecutionContextScope ()=default
Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
virtual ~PluginInterface ()=default
 PluginInterface (const PluginInterface &)=delete
PluginInterfaceoperator= (const PluginInterface &)=delete

Static Public Member Functions

static lldb::ProcessSP CreateInstance (lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
static void Initialize ()
static void DebuggerInitialize (Debugger &debugger)
static void Terminate ()
static llvm::StringRef GetPluginNameStatic ()
static llvm::StringRef GetPluginDescriptionStatic ()
Static Public Member Functions inherited from lldb_private::process_gdb_remote::ProcessGDBRemote
static lldb::ProcessSP CreateInstance (lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
static void Initialize ()
static void DebuggerInitialize (Debugger &debugger)
static void Terminate ()
static llvm::StringRef GetPluginNameStatic ()
static llvm::StringRef GetPluginDescriptionStatic ()
static std::chrono::seconds GetPacketTimeout ()
Static Public Member Functions inherited from lldb_private::Process
static llvm::StringRef GetStaticBroadcasterClass ()
static void SettingsInitialize ()
static void SettingsTerminate ()
static ProcessPropertiesGetGlobalProperties ()
static lldb::ProcessSP FindPlugin (lldb::TargetSP target_sp, llvm::StringRef plugin_name, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
 Find a Process plug-in that can debug module using the currently selected architecture.
static bool SetProcessExitStatus (lldb::pid_t pid, bool exited, int signo, int status)
 Static function that can be used with the host function Host::StartMonitoringChildProcess ().
static bool HandleProcessStateChangedEvent (const lldb::EventSP &event_sp, Stream *stream, SelectMostRelevant select_most_relevant, bool &pop_process_io_handler)
 Centralize the code that handles and prints descriptions for process state changes.
Static Public Member Functions inherited from lldb_private::Properties
static llvm::StringRef GetExperimentalSettingsName ()
static bool IsSettingExperimental (llvm::StringRef setting)

Protected Member Functions

std::shared_ptr< process_gdb_remote::ThreadGDBRemoteCreateThread (lldb::tid_t tid) override
Protected Member Functions inherited from lldb_private::process_gdb_remote::ProcessGDBRemote
 ProcessGDBRemote (lldb::TargetSP target_sp, lldb::ListenerSP listener_sp)
bool SupportsMemoryTagging () override
 Check whether the process supports memory tagging.
bool IsRunning (lldb::StateType state)
bool IsStepping (lldb::StateType state)
bool CanResume (lldb::StateType state)
bool HasExited (lldb::StateType state)
void Clear ()
bool DoUpdateThreadList (ThreadList &old_thread_list, ThreadList &new_thread_list) override
 Update the thread list following process plug-in's specific logic.
Status EstablishConnectionIfNeeded (const ProcessInfo &process_info)
Status LaunchAndConnectToDebugserver (const ProcessInfo &process_info)
void KillDebugserverProcess ()
void BuildDynamicRegisterInfo (bool force)
void SetLastStopPacket (const StringExtractorGDBRemote &response)
bool ParsePythonTargetDefinition (const FileSpec &target_definition_fspec)
DataExtractor GetAuxvData () override
StructuredData::ObjectSP GetExtendedInfoForThread (lldb::tid_t tid)
void GetMaxMemorySize ()
bool CalculateThreadStopInfo (ThreadGDBRemote *thread)
size_t UpdateThreadPCsFromStopReplyThreadsValue (llvm::StringRef value)
size_t UpdateThreadIDsFromStopReplyThreadsValue (llvm::StringRef value)
bool StartAsyncThread ()
void StopAsyncThread ()
lldb::thread_result_t AsyncThread ()
lldb::StateType SetThreadStopInfo (StringExtractor &stop_packet)
bool GetThreadStopInfoFromJSON (ThreadGDBRemote *thread, const StructuredData::ObjectSP &thread_infos_sp)
lldb::ThreadSP SetThreadStopInfo (StructuredData::Dictionary *thread_dict)
lldb::ThreadSP SetThreadStopInfo (lldb::tid_t tid, ExpeditedRegisterMap &expedited_register_map, uint8_t signo, const std::string &thread_name, const std::string &reason, const std::string &description, uint32_t exc_type, const std::vector< lldb::addr_t > &exc_data, lldb::addr_t thread_dispatch_qaddr, bool queue_vars_valid, lldb_private::LazyBool associated_with_libdispatch_queue, lldb::addr_t dispatch_queue_t, std::string &queue_name, lldb::QueueKind queue_kind, uint64_t queue_serial)
void ClearThreadIDList ()
bool UpdateThreadIDList ()
void DidLaunchOrAttach (ArchSpec &process_arch)
void LoadStubBinaries ()
void MaybeLoadExecutableModule ()
Status ConnectToDebugserver (llvm::StringRef host_port)
const char * GetDispatchQueueNameForThread (lldb::addr_t thread_dispatch_qaddr, std::string &dispatch_queue_name)
DynamicLoaderGetDynamicLoader () override
 Get the dynamic loader plug-in for this process.
bool GetGDBServerRegisterInfoXMLAndProcess (ArchSpec &arch_to_use, std::string xml_filename, std::vector< DynamicRegisterInfo::Register > &registers)
void AddRemoteRegisters (std::vector< DynamicRegisterInfo::Register > &registers, const ArchSpec &arch_to_use)
bool GetGDBServerRegisterInfo (ArchSpec &arch)
lldb::ModuleSP LoadModuleAtAddress (const FileSpec &file, lldb::addr_t link_map, lldb::addr_t base_addr, bool value_is_offset)
Status UpdateAutomaticSignalFiltering () override
Status FlashErase (lldb::addr_t addr, size_t size)
Status FlashDone ()
bool HasErased (FlashRange range)
llvm::Expected< std::vector< uint8_t > > DoReadMemoryTags (lldb::addr_t addr, size_t len, int32_t type) override
 Does the final operation to read memory tags.
Status DoWriteMemoryTags (lldb::addr_t addr, size_t len, int32_t type, const std::vector< uint8_t > &tags) override
 Does the final operation to write memory tags.
Status DoGetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &region_info) override
 DoGetMemoryRegionInfo is called by GetMemoryRegionInfo after it has removed non address bits from load_addr.
Protected Member Functions inherited from lldb_private::Process
virtual JITLoaderListGetJITLoaders ()
 Process (lldb::TargetSP target_sp, lldb::ListenerSP listener_sp)
 Construct with a shared pointer to a target, and the Process listener.
 Process (lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const lldb::UnixSignalsSP &unix_signals_sp)
 Construct with a shared pointer to a target, the Process listener, and the appropriate UnixSignalsSP for the process.
bool CallVoidArgVoidPtrReturn (const Address *address, lldb::addr_t &returned_func, bool trap_exceptions=false)
virtual void DoFindInMemory (lldb::addr_t start_addr, lldb::addr_t end_addr, const uint8_t *buf, size_t size, AddressRanges &matches, size_t alignment, size_t max_matches)
lldb::StateType GetPrivateState ()
Status PrivateResume ()
 The "private" side of resuming a process.
void CompleteAttach ()
void SetNextEventAction (Process::NextEventAction *next_event_action)
bool PrivateStateThreadIsValid () const
void ForceNextEventDelivery ()
void MapSupportedStructuredDataPlugins (const StructuredData::Array &supported_type_names)
 Loads any plugins associated with asynchronous structured data and maps the relevant supported type name to the plugin.
bool RouteAsyncStructuredData (const StructuredData::ObjectSP object_sp)
 Route the incoming structured data dictionary to the right plugin.
size_t RemoveBreakpointOpcodesFromBuffer (lldb::addr_t addr, size_t size, uint8_t *buf) const
void SynchronouslyNotifyStateChanged (lldb::StateType state)
void SetPublicState (lldb::StateType new_state, bool restarted)
void SetPrivateState (lldb::StateType state)
bool StartPrivateStateThread (bool is_secondary_thread=false)
void StopPrivateStateThread ()
void PausePrivateStateThread ()
void ResumePrivateStateThread ()
void HandlePrivateEvent (lldb::EventSP &event_sp)
Status HaltPrivate ()
lldb::StateType WaitForProcessStopPrivate (lldb::EventSP &event_sp, const Timeout< std::micro > &timeout)
bool GetEventsPrivate (lldb::EventSP &event_sp, const Timeout< std::micro > &timeout, bool control_only)
lldb::StateType GetStateChangedEventsPrivate (lldb::EventSP &event_sp, const Timeout< std::micro > &timeout)
size_t WriteMemoryPrivate (lldb::addr_t addr, const void *buf, size_t size, Status &error)
void AppendSTDOUT (const char *s, size_t len)
void AppendSTDERR (const char *s, size_t len)
void BroadcastAsyncProfileData (const std::string &one_profile_data)
bool PushProcessIOHandler ()
bool PopProcessIOHandler ()
bool ProcessIOHandlerIsActive ()
bool ProcessIOHandlerExists () const
Status StopForDestroyOrDetach (lldb::EventSP &exit_event_sp)
void LoadOperatingSystemPlugin (bool flush)
void SetAddressableBitMasks (AddressableBits bit_masks)
Protected Member Functions inherited from lldb_private::Broadcaster
BroadcasterImplSP GetBroadcasterImpl ()
const char * GetHijackingListenerName ()

Private Member Functions

process_gdb_remote::GDBRemoteDynamicRegisterInfoSPGetRegisterInfo ()
 ProcessWasm (const ProcessWasm &)
const ProcessWasmoperator= (const ProcessWasm &)=delete

Friends

class UnwindWasm
class ThreadWasm

Additional Inherited Members

Public Types inherited from lldb_private::Process
enum  {
  eBroadcastBitStateChanged = (1 << 0) , eBroadcastBitInterrupt = (1 << 1) , eBroadcastBitSTDOUT = (1 << 2) , eBroadcastBitSTDERR = (1 << 3) ,
  eBroadcastBitProfileData = (1 << 4) , eBroadcastBitStructuredData = (1 << 5)
}
 Broadcaster event bits definitions. More...
enum  { eBroadcastInternalStateControlStop = (1 << 0) , eBroadcastInternalStateControlPause = (1 << 1) , eBroadcastInternalStateControlResume = (1 << 2) }
typedef Range< lldb::addr_t, lldb::addr_tLoadRange
typedef ProcessRunLock::ProcessRunLocker StopLocker
typedef std::function< IterationAction(lldb_private::Status &error, lldb::addr_t bytes_addr, const void *bytes, lldb::offset_t bytes_size)> ReadMemoryChunkCallback
typedef bool PreResumeActionCallback(void *)
Static Public Attributes inherited from lldb_private::Process
static constexpr int g_all_event_bits
static constexpr llvm::StringRef AttachSynchronousHijackListenerName
static constexpr llvm::StringRef LaunchSynchronousHijackListenerName
static constexpr llvm::StringRef ResumeSynchronousHijackListenerName
Protected Types inherited from lldb_private::process_gdb_remote::ProcessGDBRemote
enum  { eBroadcastBitAsyncContinue = (1 << 0) , eBroadcastBitAsyncThreadShouldExit = (1 << 1) , eBroadcastBitAsyncThreadDidExit = (1 << 2) }
 Broadcaster event bits definitions. More...
typedef std::vector< lldb::tid_ttid_collection
typedef std::vector< std::pair< lldb::tid_t, int > > tid_sig_collection
typedef std::map< lldb::addr_t, lldb::addr_tMMapMap
typedef std::map< uint32_t, std::string > ExpeditedRegisterMap
using FlashRangeVector = lldb_private::RangeVector<lldb::addr_t, size_t>
using FlashRange = FlashRangeVector::Entry
Protected Types inherited from lldb_private::Process
enum  { eCanJITDontKnow = 0 , eCanJITYes , eCanJITNo }
typedef std::map< lldb::LanguageType, lldb::LanguageRuntimeSPLanguageRuntimeCollection
Protected Types inherited from lldb_private::Broadcaster
typedef std::shared_ptr< BroadcasterImplBroadcasterImplSP
typedef std::weak_ptr< BroadcasterImplBroadcasterImplWP
Static Protected Member Functions inherited from lldb_private::process_gdb_remote::ProcessGDBRemote
static void MonitorDebugserverProcess (std::weak_ptr< ProcessGDBRemote > process_wp, lldb::pid_t pid, int signo, int exit_status)
Static Protected Member Functions inherited from lldb_private::Process
static void STDIOReadThreadBytesReceived (void *baton, const void *src, size_t src_len)
Protected Attributes inherited from lldb_private::process_gdb_remote::ProcessGDBRemote
GDBRemoteCommunicationClient m_gdb_comm
std::atomic< lldb::pid_tm_debugserver_pid
std::optional< StringExtractorGDBRemotem_last_stop_packet
std::recursive_mutex m_last_stop_packet_mutex
GDBRemoteDynamicRegisterInfoSP m_register_info_sp
Broadcaster m_async_broadcaster
lldb::ListenerSP m_async_listener_sp
HostThread m_async_thread
std::recursive_mutex m_async_thread_state_mutex
tid_collection m_thread_ids
std::vector< lldb::addr_tm_thread_pcs
StructuredData::ObjectSP m_jstopinfo_sp
StructuredData::ObjectSP m_jthreadsinfo_sp
tid_collection m_continue_c_tids
tid_sig_collection m_continue_C_tids
tid_collection m_continue_s_tids
tid_sig_collection m_continue_S_tids
uint64_t m_max_memory_size
uint64_t m_remote_stub_max_memory_size
MMapMap m_addr_to_mmap_size
lldb::BreakpointSP m_thread_create_bp_sp
bool m_waiting_for_attach
lldb::CommandObjectSP m_command_sp
int64_t m_breakpoint_pc_offset
lldb::tid_t m_initial_tid
bool m_use_g_packet_for_reading
bool m_allow_flash_writes
FlashRangeVector m_erased_flash_ranges
uint32_t m_vfork_in_progress_count
Protected Attributes inherited from lldb_private::Process
std::weak_ptr< Targetm_target_wp
 The target that owns this process.
lldb::pid_t m_pid = LLDB_INVALID_PROCESS_ID
ThreadSafeValue< lldb::StateTypem_public_state
ThreadSafeValue< lldb::StateTypem_private_state
Broadcaster m_private_state_broadcaster
Broadcaster m_private_state_control_broadcaster
lldb::ListenerSP m_private_state_listener_sp
HostThread m_private_state_thread
 Thread ID for the thread that watches internal state events.
ProcessModID m_mod_id
 Tracks the state of the process over stops and other alterations.
uint32_t m_process_unique_id
 Each lldb_private::Process class that is created gets a unique integer ID that increments with each new instance.
uint32_t m_thread_index_id
 Each thread is created with a 1 based index that won't get re-used.
std::map< uint64_t, uint32_t > m_thread_id_to_index_id_map
int m_exit_status
 The exit status of the process, or -1 if not set.
std::string m_exit_string
 A textual description of why a process exited.
std::mutex m_exit_status_mutex
 Mutex so m_exit_status m_exit_string can be safely accessed from multiple threads.
std::recursive_mutex m_thread_mutex
ThreadList m_thread_list_real
 The threads for this process as are known to the protocol we are debugging with.
ThreadList m_thread_list
 The threads for this process as the user will see them.
ThreadPlanStackMap m_thread_plans
 This is the list of thread plans for threads in m_thread_list, as well as threads we knew existed, but haven't determined that they have died yet.
ThreadList m_extended_thread_list
 Constituent for extended threads that may be generated, cleared on natural stops.
lldb::RunDirection m_base_direction
 ThreadPlanBase run direction.
uint32_t m_extended_thread_stop_id
 The natural stop id when extended_thread_list was last updated.
QueueList m_queue_list
 The list of libdispatch queues at a given stop point.
uint32_t m_queue_list_stop_id
 The natural stop id when queue list was last fetched.
StopPointSiteList< lldb_private::WatchpointResourcem_watchpoint_resource_list
 Watchpoint resources currently in use.
std::vector< Notificationsm_notifications
 The list of notifications that this process can deliver.
std::vector< lldb::addr_tm_image_tokens
StopPointSiteList< lldb_private::BreakpointSitem_breakpoint_site_list
 This is the list of breakpoint locations we intend to insert in the target.
lldb::DynamicLoaderUP m_dyld_up
lldb::JITLoaderListUP m_jit_loaders_up
lldb::DynamicCheckerFunctionsUP m_dynamic_checkers_up
 The functions used by the expression parser to validate data that expressions use.
lldb::OperatingSystemUP m_os_up
lldb::SystemRuntimeUP m_system_runtime_up
lldb::UnixSignalsSP m_unix_signals_sp
lldb::ABISP m_abi_sp
 This is the current signal set for this process.
lldb::IOHandlerSP m_process_input_reader
std::mutex m_process_input_reader_mutex
ThreadedCommunication m_stdio_communication
std::recursive_mutex m_stdio_communication_mutex
bool m_stdin_forward
std::string m_stdout_data
 Remember if stdin must be forwarded to remote debug server.
std::string m_stderr_data
std::recursive_mutex m_profile_data_comm_mutex
std::vector< std::string > m_profile_data
Predicate< uint32_t > m_iohandler_sync
MemoryCache m_memory_cache
AllocatedMemoryCache m_allocated_memory_cache
bool m_should_detach
LanguageRuntimeCollection m_language_runtimes
 Should we detach if the process object goes away with an explicit call to Kill or Detach?
std::recursive_mutex m_language_runtimes_mutex
InstrumentationRuntimeCollection m_instrumentation_runtimes
std::unique_ptr< NextEventActionm_next_event_action_up
std::vector< PreResumeCallbackAndBatonm_pre_resume_actions
ProcessRunLock m_public_run_lock
ProcessRunLock m_private_run_lock
bool m_currently_handling_do_on_removals
bool m_resume_requested
lldb::tid_t m_interrupt_tid
std::atomic< boolm_finalizing
 The tid of the thread that issued the async interrupt, used by thread plan timeout.
std::atomic< boolm_destructing
bool m_clear_thread_plans_on_stop
bool m_force_next_event_delivery
lldb::StateType m_last_broadcast_state
std::map< lldb::addr_t, lldb::addr_tm_resolved_indirect_addresses
 This helps with the Public event coalescing in ShouldBroadcastEvent.
bool m_destroy_in_process
bool m_can_interpret_function_calls
std::mutex m_run_thread_plan_lock
llvm::StringMap< lldb::StructuredDataPluginSPm_structured_data_plugin_map
enum lldb_private::Process:: { ... }  m_can_jit
std::unique_ptr< UtilityFunctionm_dlopen_utility_func_up
llvm::once_flag m_dlopen_utility_func_flag_once
SourceManager::SourceFileCache m_source_file_cache
 Per process source file cache.
StructuredData::DictionarySP m_crash_info_dict_sp
 A repository for extra crash information, consulted in GetExtendedCrashInformation.
lldb::addr_t m_code_address_mask = LLDB_INVALID_ADDRESS_MASK
 Mask for code an data addresses.
lldb::addr_t m_data_address_mask = LLDB_INVALID_ADDRESS_MASK
lldb::addr_t m_highmem_code_address_mask = LLDB_INVALID_ADDRESS_MASK
lldb::addr_t m_highmem_data_address_mask = LLDB_INVALID_ADDRESS_MASK
Protected Attributes inherited from lldb_private::ProcessProperties
Processm_process
std::unique_ptr< ProcessExperimentalPropertiesm_experimental_properties_up
Protected Attributes inherited from lldb_private::Properties
lldb::OptionValuePropertiesSP m_collection_sp

Detailed Description

ProcessWasm provides the access to the Wasm program state retrieved from the Wasm engine.

Definition at line 47 of file ProcessWasm.h.

Constructor & Destructor Documentation

◆ ProcessWasm() [1/2]

◆ ~ProcessWasm()

lldb_private::wasm::ProcessWasm::~ProcessWasm ( )
overridedefault

◆ ProcessWasm() [2/2]

lldb_private::wasm::ProcessWasm::ProcessWasm ( const ProcessWasm & )
private

References ProcessWasm().

Member Function Documentation

◆ CanDebug()

bool ProcessWasm::CanDebug ( lldb::TargetSP target,
bool plugin_specified_by_name )
overridevirtual

Check if a plug-in instance can debug the file in module.

Each plug-in is given a chance to say whether it can debug the file in module. If the Process plug-in instance can debug a file on the current system, it should return true.

Returns
Returns true if this Process plug-in instance can debug the executable, false otherwise.

Reimplemented from lldb_private::process_gdb_remote::ProcessGDBRemote.

Definition at line 68 of file ProcessWasm.cpp.

◆ CreateInstance()

lldb::ProcessSP ProcessWasm::CreateInstance ( lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
const FileSpec * crash_file_path,
bool can_connect )
static

Definition at line 59 of file ProcessWasm.cpp.

Referenced by Initialize(), and Terminate().

◆ CreateThread()

std::shared_ptr< ThreadGDBRemote > ProcessWasm::CreateThread ( lldb::tid_t tid)
overrideprotectedvirtual

Reimplemented from lldb_private::process_gdb_remote::ProcessGDBRemote.

Definition at line 84 of file ProcessWasm.cpp.

◆ DebuggerInitialize()

void ProcessWasm::DebuggerInitialize ( Debugger & debugger)
static

◆ GetPluginDescriptionStatic()

llvm::StringRef ProcessWasm::GetPluginDescriptionStatic ( )
static

Definition at line 51 of file ProcessWasm.cpp.

Referenced by Initialize().

◆ GetPluginName()

llvm::StringRef ProcessWasm::GetPluginName ( )
overridevirtual

Reimplemented from lldb_private::process_gdb_remote::ProcessGDBRemote.

Definition at line 47 of file ProcessWasm.cpp.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

llvm::StringRef ProcessWasm::GetPluginNameStatic ( )
static

Definition at line 49 of file ProcessWasm.cpp.

Referenced by GetPluginName(), and Initialize().

◆ GetRegisterInfo()

◆ GetWasmCallStack()

◆ GetWasmVariable()

◆ Initialize()

◆ operator=()

const ProcessWasm & lldb_private::wasm::ProcessWasm::operator= ( const ProcessWasm & )
privatedelete

References ProcessWasm().

◆ ReadMemory()

size_t ProcessWasm::ReadMemory ( lldb::addr_t vm_addr,
void * buf,
size_t size,
Status & error )
overridevirtual

Read of memory from a process.

This function will read memory from the current process's address space and remove any traps that may have been inserted into the memory.

This function is not meant to be overridden by Process subclasses, the subclasses should implement Process::DoReadMemory (lldb::addr_t, size_t, void *).

Parameters
[in]vm_addrA virtual load address that indicates where to start reading memory from.
[out]bufA byte buffer that is at least size bytes long that will receive the memory bytes.
[in]sizeThe number of bytes to read.
[out]errorAn error that indicates the success or failure of this operation. If error indicates success (error.Success()), then the value returned can be trusted, otherwise zero will be returned.
Returns
The number of bytes that were actually read into buf. If the returned number is greater than zero, yet less than size, then this function will get called again with vm_addr, buf, and size updated appropriately. Zero is returned in the case of an error.

Reimplemented from lldb_private::Process.

Definition at line 88 of file ProcessWasm.cpp.

References error(), lldb_private::wasm::wasm_addr_t::GetType(), lldb_private::wasm::Invalid, lldb_private::wasm::Memory, lldb_private::wasm::Object, and lldb_private::Process::ReadMemory().

◆ Terminate()

void ProcessWasm::Terminate ( )
static

◆ ThreadWasm

friend class ThreadWasm
friend

Definition at line 86 of file ProcessWasm.h.

References ThreadWasm.

Referenced by ThreadWasm.

◆ UnwindWasm

friend class UnwindWasm
friend

Definition at line 85 of file ProcessWasm.h.

References UnwindWasm.

Referenced by UnwindWasm.


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