LLDB mainline
|
A plug-in interface definition class for debugging a process. More...
#include "lldb/Target/Process.h"
Classes | |
class | AttachCompletionHandler |
struct | CoreFileMemoryRange |
class | NextEventAction |
struct | Notifications |
A notification structure that can be used by clients to listen for changes in a process's lifetime. More... | |
struct | PreResumeCallbackAndBaton |
class | ProcessEventData |
class | ProcessEventHijacker |
Public Types | |
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_t > | LoadRange |
typedef ProcessRunLock::ProcessRunLocker | StopLocker |
using | CoreFileMemoryRanges = std::vector< CoreFileMemoryRange > |
typedef bool() | PreResumeActionCallback(void *) |
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. | |
~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 bool | CanDebug (lldb::TargetSP target, bool plugin_specified_by_name)=0 |
Check if a plug-in instance can debug the file in module. | |
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 CommandObject * | GetPluginCommandObject () |
Return a multi-word command object that can be used to expose plug-in specific commands. | |
virtual void | DumpPluginHistory (Stream &s) |
The underlying plugin might store the low-level communication history for this session. | |
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. | |
UtilityFunction * | GetLoadImageUtilityFunction (Platform *platform, llvm::function_ref< std::unique_ptr< UtilityFunction >()> factory) |
Get the cached UtilityFunction that assists in loading binary images into the process. | |
virtual DynamicLoader * | GetDynamicLoader () |
Get the dynamic loader plug-in for this process. | |
void | SetDynamicLoader (lldb::DynamicLoaderUP dyld) |
virtual DataExtractor | GetAuxvData () |
virtual llvm::Error | LoadModules () |
Sometimes processes know how to retrieve and load shared libraries. | |
virtual llvm::Expected< LoadedModuleInfoList > | GetLoadedModuleList () |
Query remote GDBServer for a detailed loaded library list. | |
virtual llvm::Expected< bool > | SaveCore (llvm::StringRef outfile) |
Save core dump into the specified file. | |
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::ThreadSP > | CalculateCoreFileThreadList (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 ArchSpec | GetSystemArchitecture () |
Get the system architecture for this process. | |
virtual SystemRuntime * | GetSystemRuntime () |
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. | |
virtual lldb::addr_t | GetImageInfoAddress () |
Get the image information address for the current process. | |
virtual void | WillPublicStop () |
Called when the process is about to broadcast a public stop. | |
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::UnixSignalsSP & | GetUnixSignals () |
Status | WillAttachToProcessWithID (lldb::pid_t pid) |
Called before attaching to a process. | |
virtual Status | DoWillAttachToProcessWithID (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 Status | DoWillAttachToProcessWithName (const char *process_name, bool wait_for_launch) |
Called before attaching to a process. | |
virtual Status | DoConnectRemote (llvm::StringRef remote_url) |
Attach to a remote system via a URL. | |
virtual Status | DoAttachToProcessWithID (lldb::pid_t pid, const ProcessAttachInfo &attach_info) |
Attach to an existing process using a process ID. | |
virtual Status | DoAttachToProcessWithName (const char *process_name, const ProcessAttachInfo &attach_info) |
Attach to an existing process using a partial process name. | |
virtual void | DidAttach (ArchSpec &process_arch) |
Called after attaching a process. | |
virtual void | DidExec () |
Called after a process re-execs itself. | |
virtual void | DoDidExec () |
Subclasses of Process should implement this function if they need to do anything after a process exec's itself. | |
virtual void | DidFork (lldb::pid_t child_pid, lldb::tid_t child_tid) |
Called after a reported fork. | |
virtual void | DidVFork (lldb::pid_t child_pid, lldb::tid_t child_tid) |
Called after a reported vfork. | |
virtual void | DidVForkDone () |
Called after reported vfork completion. | |
Status | WillLaunch (Module *module) |
Called before launching to a process. | |
virtual Status | DoWillLaunch (Module *module) |
Called before launching to a process. | |
virtual Status | DoLaunch (Module *exe_module, ProcessLaunchInfo &launch_info) |
Launch a new process. | |
virtual void | DidLaunch () |
Called after launching a process. | |
virtual Status | WillResume () |
Called before resuming to a process. | |
virtual Status | DoResume () |
Resumes all of a process's threads as configured using the Thread run control functions. | |
virtual void | DidResume () |
Called after resuming a process. | |
virtual Status | WillHalt () |
Called before halting to a process. | |
virtual Status | DoHalt (bool &caused_stop) |
Halts a running process. | |
virtual void | DidHalt () |
Called after halting a process. | |
virtual Status | WillDetach () |
Called before detaching from a process. | |
virtual Status | DoDetach (bool keep_stopped) |
Detaches from a running or stopped process. | |
virtual void | DidDetach () |
Called after detaching from a process. | |
virtual bool | DetachRequiresHalt () |
virtual Status | WillSignal () |
Called before sending a signal to a process. | |
virtual Status | DoSignal (int signal) |
Sends a process a UNIX signal signal. | |
virtual Status | WillDestroy () |
virtual Status | DoDestroy ()=0 |
virtual void | DidDestroy () |
virtual bool | DestroyRequiresHalt () |
virtual void | DidSignal () |
Called after sending a signal to a process. | |
virtual void | RefreshStateAfterStop ()=0 |
Currently called as part of ShouldStop. | |
virtual llvm::VersionTuple | GetHostOSVersion () |
Sometimes the connection to a process can detect the host OS version that the process is running on. | |
virtual llvm::VersionTuple | GetHostMacCatalystVersion () |
Target & | GetTarget () |
Get the target object pointer for this module. | |
const Target & | GetTarget () 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. | |
virtual void | ModulesDidLoad (ModuleList &module_list) |
virtual lldb_private::StructuredData::ObjectSP | GetLoadedDynamicLibrariesInfos (lldb::addr_t image_list_address, lldb::addr_t image_count) |
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. | |
virtual lldb_private::StructuredData::ObjectSP | GetLoadedDynamicLibrariesInfos () |
virtual lldb_private::StructuredData::ObjectSP | GetLoadedDynamicLibrariesInfos (const std::vector< lldb::addr_t > &load_addresses) |
virtual lldb_private::StructuredData::ObjectSP | GetSharedCacheInfo () |
virtual lldb_private::StructuredData::ObjectSP | GetDynamicLoaderProcessState () |
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) |
int | GetExitStatus () |
Get the exit status for a process. | |
const char * | GetExitDescription () |
Get a textual description of what the process exited. | |
virtual void | DidExit () |
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 ProcessModID & | GetModIDRef () 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 | IsAlive () |
Check if a process is still alive. | |
virtual bool | IsLiveDebugSession () const |
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. | |
virtual size_t | ReadMemory (lldb::addr_t vm_addr, void *buf, size_t size, Status &error) |
Read of memory from a process. | |
size_t | ReadMemoryFromInferior (lldb::addr_t vm_addr, void *buf, size_t size, Status &error) |
Read of memory from a process. | |
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) |
virtual size_t | DoWriteMemory (lldb::addr_t vm_addr, const void *buf, size_t size, Status &error) |
Actually do the writing of memory to a process. | |
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. | |
virtual lldb::addr_t | DoAllocateMemory (size_t size, uint32_t permissions, Status &error) |
Actually allocate memory in the process. | |
virtual Status | WriteObjectFile (std::vector< ObjectFile::LoadableData > entries) |
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 ®ion_list) |
Obtain all the mapped memory regions within this process. | |
virtual std::optional< uint32_t > | GetWatchpointSlotCount () |
Get the number of watchpoints supported by this target. | |
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. | |
virtual Status | DoDeallocateMemory (lldb::addr_t ptr) |
Actually deallocate memory in the process. | |
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 | PutSTDIN (const char *buf, size_t buf_size, Status &error) |
Puts data into this process's STDIN. | |
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 | EnableBreakpointSite (BreakpointSite *bp_site) |
virtual Status | DisableBreakpointSite (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) |
virtual Status | EnableWatchpoint (lldb::WatchpointSP wp_sp, bool notify=true) |
virtual Status | DisableWatchpoint (lldb::WatchpointSP wp_sp, bool notify=true) |
bool | UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_thread_list) |
Update the thread list. | |
void | UpdateThreadListIfNeeded () |
ThreadList & | GetThreadList () |
StopPointSiteList< lldb_private::WatchpointResource > & | GetWatchpointResourceList () |
ThreadList & | GetExtendedThreadList () |
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 () |
QueueList & | GetQueueList () |
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) |
Event * | PeekAtStateChangedEvents () |
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::ABISP & | GetABI () |
OperatingSystem * | GetOperatingSystem () |
std::vector< LanguageRuntime * > | GetLanguageRuntimes () |
LanguageRuntime * | GetLanguageRuntime (lldb::LanguageType language) |
bool | IsPossibleDynamicValue (ValueObject &in_value) |
bool | IsRunning () const |
DynamicCheckerFunctions * | GetDynamicCheckers () |
void | SetDynamicCheckers (DynamicCheckerFunctions *dynamic_checkers) |
bool | PruneThreadPlansForTID (lldb::tid_t tid) |
Prune ThreadPlanStacks for unreported threads. | |
void | PruneThreadPlans () |
Prune ThreadPlanStacks for all unreported threads. | |
ThreadPlanStack * | FindThreadPlans (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. | |
virtual bool | StartNoticingNewThreads () |
Call this to set the lldb in the mode where it breaks on new thread creations, and then auto-restarts. | |
virtual bool | StopNoticingNewThreads () |
Call this to turn off the stop & notice new threads mode. | |
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 ®ion) |
bool | RemoveInvalidMemoryRange (const LoadRange ®ion) |
void | AddPreResumeAction (PreResumeActionCallback callback, void *baton) |
bool | RunPreResumeActions () |
void | ClearPreResumeActions () |
void | ClearPreResumeAction (PreResumeActionCallback callback, void *baton) |
ProcessRunLock & | GetRunLock () |
bool | CurrentThreadIsPrivateStateThread () |
virtual Status | SendEventData (const char *data) |
lldb::ThreadCollectionSP | GetHistoryThreads (lldb::addr_t addr) |
lldb::InstrumentationRuntimeSP | GetInstrumentationRuntime (lldb::InstrumentationRuntimeType type) |
virtual bool | GetModuleSpec (const FileSpec &module_file_spec, const ArchSpec &arch, ModuleSpec &module_spec) |
Try to fetch the module specification for a module with the given file name and architecture. | |
virtual void | PrefetchModuleSpecs (llvm::ArrayRef< FileSpec > module_file_specs, const llvm::Triple &triple) |
virtual Status | GetFileLoadAddress (const FileSpec &file, bool &is_loaded, lldb::addr_t &load_addr) |
Try to find the load address of a file. | |
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. | |
virtual Status | ConfigureStructuredData (llvm::StringRef type_name, const StructuredData::ObjectSP &config_sp) |
Configure asynchronous structured data feature. | |
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::SourceFileCache & | GetSourceFileCache () |
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) |
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) |
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 |
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::PluginInterface | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
virtual llvm::StringRef | GetPluginName ()=0 |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
static llvm::StringRef | GetStaticBroadcasterClass () |
static void | SettingsInitialize () |
static void | SettingsTerminate () |
static ProcessProperties & | GetGlobalProperties () |
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 const char * | ExecutionResultAsCString (lldb::ExpressionResults result) |
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) |
Static Public Attributes | |
static constexpr int | g_all_event_bits |
static constexpr llvm::StringRef | AttachSynchronousHijackListenerName |
static constexpr llvm::StringRef | LaunchSynchronousHijackListenerName |
static constexpr llvm::StringRef | ResumeSynchronousHijackListenerName |
Protected Types | |
enum | { eCanJITDontKnow = 0 , eCanJITYes , eCanJITNo } |
typedef std::map< lldb::LanguageType, lldb::LanguageRuntimeSP > | LanguageRuntimeCollection |
Protected Types inherited from lldb_private::Broadcaster | |
typedef std::shared_ptr< BroadcasterImpl > | BroadcasterImplSP |
typedef std::weak_ptr< BroadcasterImpl > | BroadcasterImplWP |
Protected Member Functions | |
virtual JITLoaderList & | GetJITLoaders () |
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. | |
virtual llvm::Expected< TraceSupportedResponse > | TraceSupported () |
Get the processor tracing type supported for this process. | |
virtual llvm::Error | TraceStart (const llvm::json::Value &request) |
Start tracing a process or its threads. | |
virtual llvm::Error | TraceStop (const TraceStopRequest &request) |
Stop tracing a live process or its threads. | |
virtual llvm::Expected< std::string > | TraceGetState (llvm::StringRef type) |
Get the current tracing state of the process and its threads. | |
virtual llvm::Expected< std::vector< uint8_t > > | TraceGetBinaryData (const TraceGetBinaryDataRequest &request) |
Get binary data given a trace technology and a data identifier. | |
bool | CallVoidArgVoidPtrReturn (const Address *address, lldb::addr_t &returned_func, bool trap_exceptions=false) |
virtual bool | DoUpdateThreadList (ThreadList &old_thread_list, ThreadList &new_thread_list)=0 |
Update the thread list following process plug-in's specific logic. | |
virtual size_t | DoReadMemory (lldb::addr_t vm_addr, void *buf, size_t size, Status &error)=0 |
Actually do the reading of memory from a process. | |
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) |
virtual Status | DoGetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info) |
DoGetMemoryRegionInfo is called by GetMemoryRegionInfo after it has removed non address bits from load_addr. | |
virtual std::optional< bool > | DoGetWatchpointReportedAfter () |
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. | |
virtual lldb::ThreadSP | HandleThreadAsyncInterrupt (uint8_t signo, const std::string &description) |
Handle thread specific async interrupt and return the original thread that requested the async interrupt. | |
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. | |
virtual bool | SupportsMemoryTagging () |
Check whether the process supports memory tagging. | |
virtual llvm::Expected< std::vector< uint8_t > > | DoReadMemoryTags (lldb::addr_t addr, size_t len, int32_t type) |
Does the final operation to read memory tags. | |
virtual Status | DoWriteMemoryTags (lldb::addr_t addr, size_t len, int32_t type, const std::vector< uint8_t > &tags) |
Does the final operation to write memory tags. | |
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) |
virtual Status | UpdateAutomaticSignalFiltering () |
void | LoadOperatingSystemPlugin (bool flush) |
void | SetAddressableBitMasks (AddressableBits bit_masks) |
Protected Member Functions inherited from lldb_private::Broadcaster | |
BroadcasterImplSP | GetBroadcasterImpl () |
const char * | GetHijackingListenerName () |
Static Protected Member Functions | |
static void | STDIOReadThreadBytesReceived (void *baton, const void *src, size_t src_len) |
Private Member Functions | |
lldb::thread_result_t | RunPrivateStateThread (bool is_secondary_thread) |
Status | DestroyImpl (bool force_kill) |
bool | ShouldBroadcastEvent (Event *event_ptr) |
This is the part of the event handling that for a process event. | |
void | ControlPrivateStateThread (uint32_t signal) |
Status | LaunchPrivate (ProcessLaunchInfo &launch_info, lldb::StateType &state, lldb::EventSP &event_sp) |
lldb::EventSP | CreateEventFromProcessState (uint32_t event_type) |
Process (const Process &)=delete | |
const Process & | operator= (const Process &)=delete |
Friends | |
class | FunctionCaller |
class | Debugger |
class | DynamicLoader |
class | ProcessEventData |
class | StopInfo |
class | Target |
class | ThreadList |
class | ProcessEventHijacker |
class | ProcessProperties |
class | Trace |
A plug-in interface definition class for debugging a process.
using lldb_private::Process::CoreFileMemoryRanges = std::vector<CoreFileMemoryRange> |
|
protected |
typedef bool() lldb_private::Process::PreResumeActionCallback(void *) |
anonymous enum |
Broadcaster event bits definitions.
Enumerator | |
---|---|
eBroadcastBitStateChanged | |
eBroadcastBitInterrupt | |
eBroadcastBitSTDOUT | |
eBroadcastBitSTDERR | |
eBroadcastBitProfileData | |
eBroadcastBitStructuredData |
anonymous enum |
|
protected |
|
override |
Destructor.
The destructor is virtual since this class is designed to be inherited from by the plug-in instance.
Definition at line 536 of file Process.cpp.
References lldb_private::ThreadList::Clear(), lldb_private::GetLog(), LLDB_LOGF, m_thread_list, lldb_private::Object, and StopPrivateStateThread().
|
protected |
Construct with a shared pointer to a target, and the Process listener.
Uses the Host UnixSignalsSP by default.
Definition at line 445 of file Process.cpp.
|
protected |
Construct with a shared pointer to a target, the Process listener, and the appropriate UnixSignalsSP for the process.
Definition at line 451 of file Process.cpp.
References lldb_private::Broadcaster::CheckInWithManager(), eBroadcastBitInterrupt, eBroadcastBitProfileData, eBroadcastBitStateChanged, eBroadcastBitSTDERR, eBroadcastBitSTDOUT, eBroadcastBitStructuredData, eBroadcastInternalStateControlPause, eBroadcastInternalStateControlResume, eBroadcastInternalStateControlStop, lldb_private::GetLog(), LLDB_LOGF, lldb_private::Properties::m_collection_sp, m_private_state_broadcaster, m_private_state_control_broadcaster, m_private_state_listener_sp, m_unix_signals_sp, lldb_private::Object, lldb_private::RegisterAssertFrameRecognizer(), lldb_private::RegisterVerboseTrapFrameRecognizer(), lldb_private::Broadcaster::SetEventName(), and lldb_private::Broadcaster::SetPrimaryListener().
|
privatedelete |
size_t Process::AddImageToken | ( | lldb::addr_t | image_ptr | ) |
Definition at line 6138 of file Process.cpp.
References m_image_tokens.
Referenced by PlatformPOSIX::DoLoadImage(), and lldb_private::PlatformWindows::DoLoadImage().
void Process::AddInvalidMemoryRegion | ( | const LoadRange & | region | ) |
Definition at line 5835 of file Process.cpp.
References lldb_private::MemoryCache::AddInvalidRange(), lldb_private::Range< B, S >::GetByteSize(), lldb_private::Range< B, S >::GetRangeBase(), and m_memory_cache.
Referenced by lldb_private::DynamicLoaderDarwin::UpdateImageLoadAddress().
void Process::AddPreResumeAction | ( | PreResumeActionCallback | callback, |
void * | baton | ||
) |
Definition at line 5844 of file Process.cpp.
References m_pre_resume_actions.
Referenced by lldb_private::AppleThreadPlanStepThroughObjCTrampoline::DidPush().
Address Process::AdvanceAddressToNextBranchInstruction | ( | Address | default_stop_addr, |
AddressRange | range_bounds | ||
) |
Find the next branch instruction to set a breakpoint on.
When instruction stepping through a source line, instead of stepping through each instruction, we can put a breakpoint on the next branch instruction (within the range of instructions we are stepping through) and continue the process to there, yielding significant performance benefits over instruction stepping.
[in] | default_stop_addr | The address of the instruction where lldb would put a breakpoint normally. |
[in] | range_bounds | The range which the breakpoint must be contained within. Typically a source line. |
Definition at line 6155 of file Process.cpp.
References lldb_private::AddressRange::ContainsFileAddress(), lldb_private::Disassembler::DisassembleRange(), lldb_private::Target::GetArchitecture(), lldb_private::InstructionList::GetIndexOfInstructionAtAddress(), lldb_private::InstructionList::GetIndexOfNextBranchInstruction(), lldb_private::InstructionList::GetInstructionAtIndex(), GetTarget(), lldb_private::TargetProperties::GetUseFastStepping(), lldb_private::Address::IsValid(), and UINT32_MAX.
Referenced by lldb_private::ThreadPlanStepOut::ThreadPlanStepOut().
The public interface to allocating memory in the process.
This function will allocate memory in the process's address space. This can't rely on the generic function calling mechanism, since that requires this function.
[in] | size | The size of the allocation requested. |
[in] | permissions | Or together any of the lldb::Permissions bits. The permissions on a given memory allocation can't be changed after allocation. Note that a block that isn't set writable can still be written on from lldb, just not by the process itself. |
[in,out] | error | An error object to fill in if things go wrong. |
Definition at line 2437 of file Process.cpp.
References lldb_private::AllocatedMemoryCache::AllocateMemory(), DoAllocateMemory(), error(), lldb::eStateStopped, lldb_private::GetLog(), lldb_private::ProcessModID::GetMemoryID(), lldb_private::GetPermissionsAsCString(), GetPrivateState(), lldb_private::ProcessModID::GetStopID(), LLDB_INVALID_ADDRESS, LLDB_LOGF, m_allocated_memory_cache, m_mod_id, and lldb_private::Process.
Referenced by CallocateMemory(), CanJIT(), PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap(), lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap(), and lldb_private::FunctionCaller::WriteFunctionArguments().
|
protected |
Definition at line 4505 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEventIfUnique(), CreateEventFromProcessState(), eBroadcastBitSTDERR, m_stderr_data, and m_stdio_communication_mutex.
|
protected |
Definition at line 4498 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEventIfUnique(), CreateEventFromProcessState(), eBroadcastBitSTDOUT, m_stdio_communication_mutex, and m_stdout_data.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAsyncStdout(), and STDIOReadThreadBytesReceived().
uint32_t Process::AssignIndexIDToThread | ( | uint64_t | thread_id | ) |
Definition at line 1321 of file Process.cpp.
References m_thread_id_to_index_id_map, and m_thread_index_id.
Referenced by GetNextThreadIndexID(), and lldb_private::process_gdb_remote::ProcessGDBRemote::HarmonizeThreadIdsForProfileData().
|
virtual |
Attach to an existing process using the process attach info.
This function is not meant to be overridden by Process subclasses. It will first call WillAttach (lldb::pid_t) or WillAttach (const char *), and if that returns true, DoAttach (lldb::pid_t) or DoAttach (const char *) will be called to actually do the attach. If DoAttach returns true, then Process::DidAttach() will be called.
[in] | attach_info | The process attach info. |
Definition at line 2972 of file Process.cpp.
References DoAttachToProcessWithID(), DoAttachToProcessWithName(), lldb_private::ProcessInstanceInfo::DumpTableHeader(), lldb_private::Equals, error(), lldb::eStateAttaching, lldb_private::StreamString::GetData(), lldb_private::ProcessInfo::GetExecutableFile(), GetID(), lldb_private::FileSpec::GetPath(), lldb_private::ProcessInfo::GetProcessID(), lldb_private::ProcessInstanceInfoMatch::GetProcessInfo(), lldb_private::ProcessAttachInfo::GetResumeCount(), GetTarget(), lldb_private::ProcessAttachInfo::GetWaitForLaunch(), LLDB_INVALID_PROCESS_ID, m_abi_sp, m_dyld_up, m_jit_loaders_up, m_os_up, m_process_input_reader, m_process_input_reader_mutex, m_public_run_lock, m_should_detach, m_system_runtime_up, PATH_MAX, SetExitStatus(), SetID(), lldb_private::ProcessInstanceInfoMatch::SetNameMatchType(), SetNextEventAction(), SetPublicState(), StartPrivateStateThread(), lldb_private::ProcessRunLock::TrySetRunning(), WillAttachToProcessWithID(), and WillAttachToProcessWithName().
|
protected |
Definition at line 4512 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEventIfUnique(), CreateEventFromProcessState(), eBroadcastBitProfileData, m_profile_data, and m_profile_data_comm_mutex.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAsyncMisc().
void Process::BroadcastStructuredData | ( | const StructuredData::ObjectSP & | object_sp, |
const lldb::StructuredDataPluginSP & | plugin_sp | ||
) |
Broadcasts the given structured data object from the given plugin.
StructuredDataPlugin instances can use this to optionally broadcast any of their data if they want to make it available for clients. The data will come in on the structured data event bit (eBroadcastBitStructuredData).
[in] | object_sp | The structured data object to broadcast. |
[in] | plugin_sp | The plugin that will be reported in the event's plugin parameter. |
Definition at line 4519 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), and eBroadcastBitStructuredData.
Referenced by lldb_private::StructuredDataDarwinLog::HandleArrivalOfStructuredData().
Status Process::CalculateCoreFileSaveRanges | ( | const SaveCoreOptions & | core_options, |
CoreFileMemoryRanges & | ranges | ||
) |
Helper function for Process::SaveCore(...) that calculates the address ranges that should be saved.
This allows all core file plug-ins to save consistent memory ranges given a core_style.
Definition at line 6654 of file Process.cpp.
References lldb::eSaveCoreDirtyOnly, lldb::eSaveCoreFull, lldb::eSaveCoreStackOnly, lldb::eSaveCoreUnspecified, lldb_private::Status::Fail(), GetCoreFileSaveRangesDirtyOnly(), GetCoreFileSaveRangesFull(), GetCoreFileSaveRangesStackOnly(), GetMemoryRegions(), lldb_private::SaveCoreOptions::GetStyle(), and SaveOffRegionsWithStackPointers().
std::vector< ThreadSP > Process::CalculateCoreFileThreadList | ( | const SaveCoreOptions & | core_options | ) |
Helper function for Process::SaveCore(...) that calculates the thread list based upon options set within a given core_options object.
Definition at line 6697 of file Process.cpp.
References m_thread_list, lldb_private::SaveCoreOptions::ShouldThreadBeSaved(), and lldb_private::ThreadCollection::Threads().
|
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 4466 of file Process.cpp.
References GetTarget(), lldb_private::ExecutionContext::SetFramePtr(), lldb_private::ExecutionContext::SetProcessPtr(), lldb_private::ExecutionContext::SetTargetPtr(), and lldb_private::ExecutionContext::SetThreadPtr().
|
inlineoverridevirtual |
Implements lldb_private::ExecutionContextScope.
|
inlineoverridevirtual |
Implements lldb_private::ExecutionContextScope.
|
overridevirtual |
Implements lldb_private::ExecutionContextScope.
Definition at line 4464 of file Process.cpp.
References m_target_wp.
Referenced by lldb_private::AppleObjCRuntimeV2::GetDynamicTypeAndAddress(), lldb_private::ThreadPlanAssemblyTracer::GetIntPointerType(), and lldb_private::ProcessWindows::OnExitProcess().
|
inlineoverridevirtual |
Implements lldb_private::ExecutionContextScope.
The public interface to allocating memory in the process, this also clears the allocated memory.
This function will allocate memory in the process's address space. This can't rely on the generic function calling mechanism, since that requires this function.
[in] | size | The size of the allocation requested. |
[in] | permissions | Or together any of the lldb::Permissions bits. The permissions on a given memory allocation can't be changed after allocation. Note that a block that isn't set writable can still be written on from lldb, just not by the process itself. |
[in,out] | error | An error object to fill in if things go wrong. |
Definition at line 2460 of file Process.cpp.
References AllocateMemory(), error(), and WriteMemory().
Referenced by PlatformPOSIX::DoLoadImage().
|
protected |
Definition at line 6377 of file Process.cpp.
References lldb_private::StackFrame::CalculateExecutionContext(), lldb::eBasicTypeVoid, lldb::eExpressionCompleted, lldb::eLanguageTypeC, GetAddressByteSize(), lldb_private::CompilerType::GetBasicTypeFromAST(), lldb_private::ThreadList::GetExpressionExecutionThread(), lldb_private::CompilerType::GetPointerType(), lldb_private::Target::GetScratchTypeSystemForLanguage(), lldb_private::Thread::GetStackFrameAtIndex(), GetTarget(), GetThreadList(), lldb_private::ProcessProperties::GetUtilityExpressionTimeout(), LLDB_INVALID_ADDRESS, RunThreadPlan(), lldb_private::EvaluateExpressionOptions::SetDebug(), lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints(), lldb_private::EvaluateExpressionOptions::SetStopOthers(), lldb_private::EvaluateExpressionOptions::SetTimeout(), lldb_private::EvaluateExpressionOptions::SetTrapExceptions(), lldb_private::EvaluateExpressionOptions::SetTryAllThreads(), lldb_private::EvaluateExpressionOptions::SetUnwindOnError(), UINT32_MAX, and UINT64_MAX.
Referenced by ResolveIndirectFunction().
|
pure virtual |
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.
Implemented in lldb_private::ProcessTrace, ProcessElfCore, ProcessFreeBSDKernel, lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessMachCore, ProcessKDP, lldb_private::minidump::ProcessMinidump, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
|
inline |
Determines whether executing function calls using the interpreter is possible for this process.
Definition at line 2009 of file Process.h.
References m_can_interpret_function_calls.
Referenced by lldb_private::ClangExpressionParser::DoPrepareForExecution().
bool Process::CanJIT | ( | ) |
Determines whether executing JIT-compiled code in this process is possible.
Definition at line 2470 of file Process.cpp.
References AllocateMemory(), lldb_private::Status::AsCString(), DeallocateMemory(), eCanJITDontKnow, eCanJITNo, eCanJITYes, GetID(), lldb_private::GetLog(), LLDB_LOGF, m_can_jit, lldb_private::Process, and lldb_private::Status::Success().
Referenced by lldb_private::UserExpression::Evaluate().
Status Process::ClearBreakpointSiteByID | ( | lldb::user_id_t | break_id | ) |
Definition at line 1626 of file Process.cpp.
References DisableBreakpointSiteByID(), error(), m_breakpoint_site_list, and lldb_private::StopPointSiteList< StopPointSite >::Remove().
Referenced by DynamicLoaderDarwinKernel::Clear(), and SystemRuntimeMacOSX::Clear().
void Process::ClearPreResumeAction | ( | PreResumeActionCallback | callback, |
void * | baton | ||
) |
Definition at line 5863 of file Process.cpp.
References m_pre_resume_actions.
void Process::ClearPreResumeActions | ( | ) |
Definition at line 5861 of file Process.cpp.
References m_pre_resume_actions.
|
protected |
Definition at line 3096 of file Process.cpp.
References lldb_private::ThreadList::Clear(), lldb_private::ArchSpec::CompatibleMatch, lldb_private::JITLoaderList::DidAttach(), lldb_private::SystemRuntime::DidAttach(), lldb_private::DynamicLoader::DidAttach(), DidAttach(), lldb_private::eLoadDependentsNo, lldb_private::ProcessInfo::GetArchitecture(), lldb_private::Target::GetArchitecture(), lldb_private::Debugger::GetAsyncErrorStream(), lldb_private::Target::GetDebugger(), GetDynamicLoader(), lldb_private::Target::GetExecutableModule(), GetID(), GetJITLoaders(), lldb_private::GetLog(), lldb_private::PlatformList::GetOrCreate(), lldb_private::Debugger::GetPlatformList(), lldb_private::PluginInterface::GetPluginName(), GetProcessInfo(), GetSystemArchitecture(), GetSystemRuntime(), GetTarget(), lldb_private::ArchSpec::GetTriple(), lldb_private::ArchSpec::IsCompatibleMatch(), lldb_private::ArchSpec::IsExactMatch(), lldb_private::ArchSpec::IsValid(), LLDB_LOG, LLDB_LOGF, LoadOperatingSystemPlugin(), m_os_up, m_thread_list, m_unix_signals_sp, lldb_private::Modules, lldb_private::Process, lldb_private::Target::SetArchitecture(), lldb_private::Target::SetExecutableModule(), lldb_private::Target::SetPlatform(), lldb_private::Target, lldb_private::Target::UpdateSignalsFromDummy(), and UpdateThreadListIfNeeded().
Referenced by ConnectRemote(), DidExec(), and lldb_private::Process::AttachCompletionHandler::PerformAction().
|
virtual |
Configure asynchronous structured data feature.
Each Process type that supports using an asynchronous StructuredData feature should implement this to enable/disable/configure the feature. The default implementation here will always return an error indiciating the feature is unsupported.
StructuredDataPlugin implementations will call this to configure a feature that has been reported as being supported.
[in] | type_name | The StructuredData type name as previously discovered by the Process-derived instance. |
[in] | config_sp | Configuration data for the feature being enabled. This config data, which may be null, will be passed along to the feature to process. The feature will dictate whether this is a dictionary, an array or some other object. If the feature needs to be set up properly before it can be enabled, then the config should also take an enable/disable flag. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 6247 of file Process.cpp.
|
virtual |
Attach to a remote system via a URL.
[in] | remote_url | The URL format that we are connecting to. |
Definition at line 3223 of file Process.cpp.
References CompleteAttach(), DoConnectRemote(), error(), lldb::eStateCrashed, lldb::eStateStopped, GetID(), HandlePrivateEvent(), LLDB_INVALID_PROCESS_ID, m_abi_sp, m_process_input_reader, m_process_input_reader_mutex, PrivateStateThreadIsValid(), ResumePrivateStateThread(), StartPrivateStateThread(), and WaitForProcessStopPrivate().
|
private |
Definition at line 3828 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), eBroadcastInternalStateControlPause, eBroadcastInternalStateControlResume, eBroadcastInternalStateControlStop, lldb_private::GetLog(), lldb_private::ProcessProperties::GetUtilityExpressionTimeout(), lldb_private::HostThread::IsJoinable(), lldb_private::HostThread::Join(), LLDB_LOGF, m_private_state_control_broadcaster, m_private_state_thread, PrivateStateThreadIsValid(), lldb_private::Process, and lldb_private::HostThread::Reset().
Referenced by PausePrivateStateThread(), ResumePrivateStateThread(), and StopPrivateStateThread().
lldb::break_id_t Process::CreateBreakpointSite | ( | const lldb::BreakpointLocationSP & | owner, |
bool | use_hardware | ||
) |
Definition at line 1663 of file Process.cpp.
References lldb_private::StopPointSiteList< StopPointSite >::Add(), lldb_private::Address::CalculateSymbolContextSymbol(), EnableBreakpointSite(), error(), lldb::eStateAttaching, lldb::eStateConnected, lldb::eStateCrashed, lldb::eStateDetached, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateLaunching, lldb::eStateRunning, lldb::eStateStepping, lldb::eStateStopped, lldb::eStateSuspended, lldb::eStateUnloaded, lldb_private::StopPointSiteList< StopPointSite >::FindByAddress(), lldb_private::Symbol::GetAddress(), lldb_private::Target::GetDebugger(), lldb_private::Debugger::GetErrorStream(), lldb_private::Symbol::GetLoadAddress(), lldb_private::Address::GetOpcodeLoadAddress(), GetState(), GetTarget(), IsAlive(), lldb_private::Symbol::IsIndirect(), LLDB_INVALID_ADDRESS, LLDB_INVALID_BREAK_ID, m_breakpoint_site_list, lldb_private::Stream::Printf(), and ResolveIndirectFunction().
Referenced by lldb_private::BreakpointLocation::ResolveBreakpointSite().
|
private |
Definition at line 4492 of file Process.cpp.
References GetState().
Referenced by AppendSTDERR(), AppendSTDOUT(), and BroadcastAsyncProfileData().
ThreadSP Process::CreateOSPluginThread | ( | lldb::tid_t | tid, |
lldb::addr_t | context | ||
) |
Definition at line 1305 of file Process.cpp.
References lldb_private::OperatingSystem::CreateThread(), and GetOperatingSystem().
bool Process::CurrentThreadIsPrivateStateThread | ( | ) |
Definition at line 5880 of file Process.cpp.
References lldb_private::HostThread::EqualsThread(), lldb_private::Host::GetCurrentThread(), and m_private_state_thread.
Referenced by GetState().
Status Process::DeallocateMemory | ( | lldb::addr_t | ptr | ) |
The public interface to deallocating memory in the process.
This function will deallocate memory in the process's address space that was allocated with AllocateMemory.
[in] | ptr | A return value from AllocateMemory, pointing to the memory you want to deallocate. |
Definition at line 2508 of file Process.cpp.
References lldb_private::AllocatedMemoryCache::DeallocateMemory(), DoDeallocateMemory(), error(), lldb_private::GetLog(), lldb_private::ProcessModID::GetMemoryID(), lldb_private::ProcessModID::GetStopID(), LLDB_LOGF, m_allocated_memory_cache, m_mod_id, and lldb_private::Process.
Referenced by CanJIT(), lldb_private::FunctionCaller::DeallocateFunctionResults(), lldb_private::AppleGetItemInfoHandler::Detach(), lldb_private::AppleGetPendingItemsHandler::Detach(), lldb_private::AppleGetQueuesHandler::Detach(), lldb_private::AppleGetThreadItemInfoHandler::Detach(), PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap(), and lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap().
Status Process::Destroy | ( | bool | force_kill | ) |
Kills the process and shuts down all threads that were spawned to track and monitor the process.
This function is not meant to be overridden by Process subclasses.
[in] | force_kill | Whether lldb should force a kill (instead of a detach) from the inferior process. Normally if lldb launched a binary and Destroy is called, lldb kills it. If lldb attached to a running process and Destroy is called, lldb detaches. If this behavior needs to be over-ridden, this is the bool that can be used. |
Definition at line 3495 of file Process.cpp.
References DestroyImpl(), and m_finalizing.
Referenced by CommandObjectProcessKill::DoExecute(), Halt(), and CommandObjectProcessLaunchOrAttach::StopProcessIfNecessary().
|
private |
Definition at line 3503 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), DestroyRequiresHalt(), Detach(), DidDestroy(), DisableAllBreakpointSites(), lldb_private::ThreadList::DiscardThreadPlans(), lldb_private::ThreadedCommunication::Disconnect(), DoDestroy(), error(), lldb::eStateStopped, GetShouldDetach(), lldb_private::ThreadSafeValue< T >::GetValue(), m_destroy_in_process, m_process_input_reader, m_process_input_reader_mutex, m_public_run_lock, m_public_state, m_should_detach, m_stdin_forward, m_stdio_communication, m_thread_list, lldb_private::ProcessRunLock::SetStopped(), StopForDestroyOrDetach(), StopPrivateStateThread(), lldb_private::ThreadedCommunication::StopReadThread(), and WillDestroy().
Referenced by Destroy(), and Finalize().
|
inlinevirtual |
Reimplemented in lldb_private::ProcessWindows.
Definition at line 1244 of file Process.h.
Referenced by DestroyImpl().
Status Process::Detach | ( | bool | keep_stopped | ) |
Detaches from a running or stopped process.
This function is not meant to be overridden by Process subclasses.
[in] | keep_stopped | If true, don't resume the process on detach. |
Definition at line 3443 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), DetachRequiresHalt(), DidDetach(), DisableAllBreakpointSites(), lldb_private::ThreadList::DiscardThreadPlans(), DoDetach(), error(), m_destroy_in_process, m_public_run_lock, m_thread_list, lldb_private::ProcessRunLock::SetStopped(), StopForDestroyOrDetach(), StopPrivateStateThread(), and WillDetach().
Referenced by DestroyImpl(), CommandObjectProcessDetach::DoExecute(), and CommandObjectProcessLaunchOrAttach::StopProcessIfNecessary().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 1213 of file Process.h.
Referenced by Detach().
|
inlinevirtual |
Called after attaching a process.
[in] | process_arch | If you can figure out the process architecture after attach, fill it in here. |
Allow Process plug-ins to execute some code after attaching to a process.
Reimplemented in lldb_private::ProcessTrace, lldb_private::process_gdb_remote::ProcessGDBRemote, lldb_private::ScriptedProcess, lldb_private::ProcessWindows, and ProcessKDP.
Definition at line 1050 of file Process.h.
References lldb_private::ArchSpec::Clear().
Referenced by CompleteAttach(), lldb_private::ProcessTrace::DidAttach(), and ProcessKDP::DidAttach().
|
inlinevirtual |
Definition at line 1242 of file Process.h.
Referenced by DestroyImpl().
|
inlinevirtual |
|
virtual |
Called after a process re-execs itself.
Allow Process plug-ins to execute some code after a process has exec'ed itself. Subclasses typically should override DoDidExec() as the lldb_private::Process class needs to remove its dynamic loader, runtime, ABI and other plug-ins, as well as unload all shared libraries.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 5970 of file Process.cpp.
References lldb_private::Target::CleanupProcess(), lldb_private::MemoryCache::Clear(), lldb_private::AllocatedMemoryCache::Clear(), lldb_private::Target::ClearModules(), CompleteAttach(), lldb_private::Target::DidExec(), lldb_private::ThreadList::DiscardThreadPlans(), DoDidExec(), Flush(), lldb_private::GetLog(), GetTarget(), LLDB_LOGF, m_abi_sp, m_allocated_memory_cache, m_dyld_up, m_dynamic_checkers_up, m_image_tokens, m_instrumentation_runtimes, m_jit_loaders_up, m_language_runtimes, m_language_runtimes_mutex, m_memory_cache, m_os_up, m_system_runtime_up, m_thread_list, and lldb_private::Process.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DidExec().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 1438 of file Process.h.
Referenced by SetExitStatus().
|
inlinevirtual |
Called after a reported fork.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
|
inlinevirtual |
Called after halting a process.
Allow Process plug-ins to execute some code after halting a process.
Definition at line 1183 of file Process.h.
Referenced by HaltPrivate().
|
inlinevirtual |
Called after launching a process.
Allow Process plug-ins to execute some code after launching a process.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
|
inlinevirtual |
Called after resuming a process.
Allow Process plug-ins to execute some code after resuming a process.
Reimplemented in lldb_private::ScriptedProcess.
Definition at line 1148 of file Process.h.
Referenced by PrivateResume().
|
inlinevirtual |
|
inlinevirtual |
Called after a reported vfork.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
|
inlinevirtual |
Called after reported vfork completion.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
void Process::DisableAllBreakpointSites | ( | ) |
Definition at line 1619 of file Process.cpp.
References DisableBreakpointSite(), lldb_private::StopPointSiteList< StopPointSite >::ForEach(), and m_breakpoint_site_list.
Referenced by DestroyImpl(), and Detach().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, lldb_private::ProcessWindows, and ProcessKDP.
Definition at line 2165 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by DisableAllBreakpointSites(), DisableBreakpointSiteByID(), lldb_private::ThreadPlanStepOverBreakpoint::DoWillResume(), and RemoveConstituentFromBreakpointSite().
Status Process::DisableBreakpointSiteByID | ( | lldb::user_id_t | break_id | ) |
Definition at line 1635 of file Process.cpp.
References DisableBreakpointSite(), error(), lldb_private::StopPointSiteList< StopPointSite >::FindByID(), and m_breakpoint_site_list.
Referenced by ClearBreakpointSiteByID().
|
virtual |
Definition at line 1879 of file Process.cpp.
References lldb_private::Breakpoints, DoReadMemory(), DoWriteMemory(), error(), lldb_private::StoppointSite::GetByteSize(), lldb_private::StoppointSite::GetID(), lldb_private::StoppointSite::GetLoadAddress(), lldb_private::GetLog(), lldb_private::BreakpointSite::GetSavedOpcodeBytes(), lldb_private::BreakpointSite::GetTrapOpcodeBytes(), lldb_private::BreakpointSite::IsEnabled(), lldb_private::BreakpointSite::IsHardware(), LLDB_LOGF, and lldb_private::BreakpointSite::SetEnabled().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DisableBreakpointSite(), lldb_private::ProcessWindows::DisableBreakpointSite(), and ProcessKDP::DisableBreakpointSite().
|
virtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ProcessWindows.
Definition at line 2595 of file Process.cpp.
References error().
|
inlinevirtual |
Actually allocate memory in the process.
This function will allocate memory in the process's address space. This can't rely on the generic function calling mechanism, since that requires this function.
[in] | size | The size of the allocation requested. |
Reimplemented in ProcessKDP, lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ProcessWindows.
Definition at line 1770 of file Process.h.
References error(), lldb_private::PluginInterface::GetPluginName(), and LLDB_INVALID_ADDRESS.
Referenced by AllocateMemory(), and lldb_private::AllocatedMemoryCache::AllocatePage().
|
inlinevirtual |
Attach to an existing process using a process ID.
[in] | pid | The process ID that we should attempt to attach to. |
[in] | attach_info | Information on how to do the attach. For example, GetUserID() will return the uid to attach as. |
Reimplemented in ProcessKDP, lldb_private::ProcessWindows, lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ScriptedProcess.
Definition at line 1012 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by Attach().
|
inlinevirtual |
Attach to an existing process using a partial process name.
[in] | process_name | The name of the process to attach to. |
[in] | attach_info | Information on how to do the attach. For example, GetUserID() will return the uid to attach as. |
Reimplemented in ProcessKDP, lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ScriptedProcess.
Definition at line 1035 of file Process.h.
References error().
Referenced by Attach().
|
inlinevirtual |
Attach to a remote system via a URL.
[in] | remote_url | The URL format that we are connecting to. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and ProcessKDP.
Definition at line 992 of file Process.h.
References error().
Referenced by ConnectRemote().
|
inlinevirtual |
Actually deallocate memory in the process.
This function will deallocate memory in the process's address space that was allocated with AllocateMemory.
[in] | ptr | A return value from AllocateMemory, pointing to the memory you want to deallocate. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessKDP, and lldb_private::ProcessWindows.
Definition at line 2038 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by lldb_private::AllocatedMemoryCache::Clear(), and DeallocateMemory().
|
pure virtual |
|
inlinevirtual |
Detaches from a running or stopped process.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessKDP, and lldb_private::ProcessWindows.
Definition at line 1199 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by Detach().
|
inlinevirtual |
|
protectedvirtual |
Definition at line 2017 of file Process.cpp.
References FindInMemory(), and LLDB_INVALID_ADDRESS.
Referenced by FindInMemory(), and FindRangesInMemory().
|
inlineprotectedvirtual |
DoGetMemoryRegionInfo is called by GetMemoryRegionInfo after it has removed non address bits from load_addr.
Override this method in subclasses of Process.
See GetMemoryRegionInfo for details of the logic.
[in] | load_addr | The load address to query the range_info for. (non address bits removed) |
[out] | range_info | An range_info value containing the details of the range. |
Reimplemented in ProcessElfCore, ProcessMachCore, lldb_private::minidump::ProcessMinidump, lldb_private::ScriptedProcess, lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ProcessWindows.
Definition at line 2859 of file Process.h.
Referenced by GetMemoryRegionInfo().
|
inlineprotectedvirtual |
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.
If a Process subclass needs to override this architecture-based result, it may do so by overriding this method.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 2878 of file Process.h.
Referenced by GetWatchpointReportedAfter().
|
inlinevirtual |
Halts a running process.
DoHalt must produce one and only one stop StateChanged event if it actually stops the process. If the stop happens through some natural event (for instance a SIGSTOP), then forwarding that event will do. Otherwise, you must generate the event manually. This function is called from the context of the private state thread.
[out] | caused_stop | If true, then this Halt caused the stop, otherwise, the process was already stopped. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessKDP, and lldb_private::ProcessWindows.
Definition at line 1173 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by HaltPrivate().
|
inlinevirtual |
Launch a new process.
Launch a new process by spawning a new process using exe_module's file as the file to launch. Launch details are provided in launch_info.
[in] | exe_module | The module from which to extract the file specification and launch. |
[in] | launch_info | Details (e.g. arguments, stdio redirection, etc.) for the requested launch. |
Reimplemented in ProcessKDP, lldb_private::process_gdb_remote::ProcessGDBRemote, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
Definition at line 1103 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by LaunchPrivate().
|
inlinevirtual |
Reimplemented in ProcessElfCore, ProcessFreeBSDKernel, ProcessMachCore, lldb_private::minidump::ProcessMinidump, and lldb_private::ScriptedProcess.
Definition at line 618 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by LoadCore().
|
protectedpure virtual |
Actually do the reading of memory from a process.
Subclasses must override this function and can return fewer bytes than requested when memory requests are too large. This class will break up the memory requests and keep advancing the arguments along as needed.
[in] | vm_addr | A virtual load address that indicates where to start reading memory from. |
[in] | size | The number of bytes to read. |
[out] | buf | A byte buffer that is at least size bytes long that will receive the memory bytes. |
[out] | error | An 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. |
Implemented in ProcessElfCore, ProcessMachCore, ProcessKDP, lldb_private::ProcessTrace, lldb_private::process_gdb_remote::ProcessGDBRemote, lldb_private::minidump::ProcessMinidump, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
Referenced by DisableSoftwareBreakpoint(), EnableSoftwareBreakpoint(), and ReadMemoryFromInferior().
|
inlineprotectedvirtual |
Does the final operation to read memory tags.
E.g. sending a GDB packet. It assumes that ReadMemoryTags has checked that memory tagging is enabled and has expanded the memory range as needed.
[in] | addr | Start of address range to read memory tags for. |
[in] | len | Length of the memory range to read tags for (in bytes). |
[in] | type | Type of tags to read (get this from a MemoryTagManager) |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 3033 of file Process.h.
References lldb_private::PluginInterface::GetPluginName().
Referenced by ReadMemoryTags().
|
inlinevirtual |
Resumes all of a process's threads as configured using the Thread run control functions.
Threads for a process should be updated with one of the run control actions (resume, step, or suspend) that they should take when the process is resumed. If no run control action is given to a thread it will be resumed by default.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessKDP, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
Definition at line 1138 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by PrivateResume().
|
inlinevirtual |
Sends a process a UNIX signal signal.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and ProcessKDP.
Definition at line 1230 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by Signal().
|
protectedpure virtual |
Update the thread list following process plug-in's specific logic.
This method should only be invoked by UpdateThreadList.
Implemented in ProcessElfCore, ProcessFreeBSDKernel, ProcessMachCore, ProcessKDP, lldb_private::ProcessTrace, lldb_private::process_gdb_remote::ProcessGDBRemote, lldb_private::minidump::ProcessMinidump, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
Referenced by UpdateThreadList().
|
inlinevirtual |
Called before attaching to a process.
Allow Process plug-ins to execute some code before attaching a process.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and ProcessKDP.
Definition at line 963 of file Process.h.
Referenced by WillAttachToProcessWithID().
|
inlinevirtual |
Called before attaching to a process.
Allow Process plug-ins to execute some code before attaching a process.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and ProcessKDP.
Definition at line 980 of file Process.h.
Referenced by WillAttachToProcessWithName().
Called before launching to a process.
Allow Process plug-ins to execute some code before launching a process.
Reimplemented in ProcessKDP, and lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 1084 of file Process.h.
Referenced by WillLaunch().
|
inlinevirtual |
Actually do the writing of memory to a process.
[in] | vm_addr | A virtual load address that indicates where to start writing memory to. |
[in] | buf | A byte buffer that is at least size bytes long that contains the data to write. |
[in] | size | The number of bytes to write. |
[out] | error | An error value in case the memory write fails. |
Reimplemented in ProcessKDP, lldb_private::process_gdb_remote::ProcessGDBRemote, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
Definition at line 1687 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by DisableSoftwareBreakpoint(), EnableSoftwareBreakpoint(), and WriteMemoryPrivate().
|
inlineprotectedvirtual |
Does the final operation to write memory tags.
E.g. sending a GDB packet. It assumes that WriteMemoryTags has checked that memory tagging is enabled and has packed the tag data.
[in] | addr | Start of address range to write memory tags for. |
[in] | len | Length of the memory range to write tags for (in bytes). |
[in] | type | Type of tags to read (get this from a MemoryTagManager) |
[in] | tags | Packed tags to be written. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 3058 of file Process.h.
References lldb_private::PluginInterface::GetPluginName(), and lldb_private::Status::SetErrorStringWithFormatv().
Referenced by WriteMemoryTags().
|
inlinevirtual |
The underlying plugin might store the low-level communication history for this session.
Dump it into the provided stream.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 593 of file Process.h.
Referenced by lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReadAllRegisterValues(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteAllRegisterValues(), and lldb_private::process_gdb_remote::GDBRemoteRegisterContext::WriteRegisterBytes().
void Process::DumpThreadPlans | ( | Stream & | strm, |
lldb::DescriptionLevel | desc_level, | ||
bool | internal, | ||
bool | condense_trivial, | ||
bool | skip_unreported_plans | ||
) |
Dump all the thread plans for this process.
[in,out] | strm | The stream to which to dump the output |
[in] | desc_level | How much detail to dump |
[in] | internal | If true dump all plans, if false only user initiated plans |
[in] | condense_trivial | If true, only dump a header if the plan stack is just the base plan. |
[in] | skip_unreported_plans | If true, skip printing all thread plan stacks that don't currently have a backing lldb_private::Thread *. |
Definition at line 1285 of file Process.cpp.
References lldb_private::ThreadPlanStackMap::DumpPlans(), and m_thread_plans.
Referenced by CommandObjectThreadPlanList::DoExecute().
bool Process::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.
[in,out] | strm | The stream to which to dump the output |
[in] | tid | The tid whose Plan Stack we are dumping |
[in] | desc_level | How much detail to dump |
[in] | internal | If true dump all plans, if false only user initiated plans |
[in] | condense_trivial | If true, only dump a header if the plan stack is just the base plan. |
[in] | skip_unreported_plans | If true, only dump a plan if it is currently backed by an lldb_private::Thread *. |
Definition at line 1278 of file Process.cpp.
References lldb_private::ThreadPlanStackMap::DumpPlansForTID(), and m_thread_plans.
Referenced by CommandObjectThreadPlanList::DoExecute(), and CommandObjectThreadPlanList::HandleOneThread().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, lldb_private::ScriptedProcess, lldb_private::ProcessWindows, and ProcessKDP.
Definition at line 2158 of file Process.h.
References error(), and lldb_private::PluginInterface::GetPluginName().
Referenced by CreateBreakpointSite(), EnableBreakpointSiteByID(), and lldb_private::ThreadPlanStepOverBreakpoint::ReenableBreakpointSite().
Status Process::EnableBreakpointSiteByID | ( | lldb::user_id_t | break_id | ) |
Definition at line 1649 of file Process.cpp.
References EnableBreakpointSite(), error(), lldb_private::StopPointSiteList< StopPointSite >::FindByID(), and m_breakpoint_site_list.
|
virtual |
Definition at line 1803 of file Process.cpp.
References lldb_private::Breakpoints, DoReadMemory(), DoWriteMemory(), error(), lldb_private::BreakpointSite::eSoftware, lldb_private::StoppointSite::GetID(), lldb_private::StoppointSite::GetLoadAddress(), lldb_private::GetLog(), lldb_private::BreakpointSite::GetSavedOpcodeBytes(), GetSoftwareBreakpointTrapOpcode(), lldb_private::BreakpointSite::GetTrapOpcodeBytes(), lldb_private::BreakpointSite::IsEnabled(), LLDB_INVALID_ADDRESS, LLDB_LOGF, lldb_private::BreakpointSite::SetEnabled(), and lldb_private::BreakpointSite::SetType().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::EnableBreakpointSite(), lldb_private::ProcessWindows::EnableBreakpointSite(), and ProcessKDP::EnableBreakpointSite().
|
virtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ProcessWindows.
Definition at line 2589 of file Process.cpp.
References error().
|
static |
Definition at line 5732 of file Process.cpp.
References lldb::eExpressionCompleted, lldb::eExpressionDiscarded, lldb::eExpressionHitBreakpoint, lldb::eExpressionInterrupted, lldb::eExpressionParseError, lldb::eExpressionResultUnavailable, lldb::eExpressionSetupError, lldb::eExpressionStoppedForDebug, lldb::eExpressionThreadVanished, and lldb::eExpressionTimedOut.
Referenced by lldb_private::LLVMUserExpression::DoExecute(), and lldb_private::FunctionCaller::ExecuteFunction().
|
virtual |
This object is about to be destroyed, do any necessary cleanup.
Subclasses that override this method should always call this superclass method. If you are running Finalize in your Process subclass Destructor, pass true. If we are in the destructor, shared_from_this will no longer work, so we have to avoid doing anything that might trigger that.
Definition at line 555 of file Process.cpp.
References lldb_private::StopPointSiteList< StopPointSite >::Clear(), lldb_private::QueueList::Clear(), lldb_private::ThreadPlanStackMap::Clear(), lldb_private::Broadcaster::Clear(), lldb_private::MemoryCache::Clear(), lldb_private::AllocatedMemoryCache::Clear(), lldb_private::ThreadList::Destroy(), DestroyImpl(), m_abi_sp, m_allocated_memory_cache, m_destructing, m_dyld_up, m_dynamic_checkers_up, m_extended_thread_list, m_finalizing, m_image_tokens, m_instrumentation_runtimes, m_jit_loaders_up, m_language_runtimes, m_language_runtimes_mutex, m_memory_cache, m_mod_id, m_next_event_action_up, m_notifications, m_os_up, m_private_run_lock, m_private_state_listener_sp, m_public_run_lock, m_queue_list, m_queue_list_stop_id, m_structured_data_plugin_map, m_system_runtime_up, m_thread_list, m_thread_list_real, m_thread_plans, m_watchpoint_resource_list, lldb_private::ProcessModID::SetStopEventForLastNaturalStopID(), lldb_private::ProcessRunLock::SetStopped(), and lldb_private::ProcessRunLock::TrySetRunning().
Referenced by ProcessElfCore::~ProcessElfCore(), lldb_private::process_gdb_remote::ProcessGDBRemote::~ProcessGDBRemote(), ProcessKDP::~ProcessKDP(), ProcessMachCore::~ProcessMachCore(), lldb_private::minidump::ProcessMinidump::~ProcessMinidump(), lldb_private::ProcessTrace::~ProcessTrace(), and lldb_private::ScriptedProcess::~ScriptedProcess().
lldb::addr_t Process::FindInMemory | ( | const uint8_t * | buf, |
uint64_t | size, | ||
const AddressRange & | range, | ||
size_t | alignment, | ||
Status & | error | ||
) |
Definition at line 2102 of file Process.cpp.
References DoFindInMemory(), error(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), lldb_private::Address::GetLoadAddress(), GetTarget(), lldb_private::AddressRange::IsValid(), and LLDB_INVALID_ADDRESS.
lldb::addr_t Process::FindInMemory | ( | lldb::addr_t | low, |
lldb::addr_t | high, | ||
const uint8_t * | buf, | ||
size_t | size | ||
) |
Find a pattern within a memory region.
This function searches for a pattern represented by the provided buffer within the memory range specified by the low and high addresses. It uses a bad character heuristic to optimize the search process.
[in] | low | The starting address of the memory region to be searched. (inclusive) |
[in] | high | The ending address of the memory region to be searched. (exclusive) |
[in] | buf | A pointer to the buffer containing the pattern to be searched. |
[in] | buffer_size | The size of the buffer in bytes. |
Definition at line 3363 of file Process.cpp.
References LLDB_INVALID_ADDRESS.
Referenced by CommandObjectMemoryFind::DoExecute(), and DoFindInMemory().
|
static |
Find a Process plug-in that can debug module using the currently selected architecture.
Scans all loaded plug-in interfaces that implement versions of the Process plug-in interface and returns the first instance that can debug the file.
Definition at line 399 of file Process.cpp.
References lldb_private::PluginManager::GetProcessCreateCallbackAtIndex(), and lldb_private::PluginManager::GetProcessCreateCallbackForPluginName().
Referenced by lldb_private::Target::CreateProcess().
AddressRanges Process::FindRangesInMemory | ( | const uint8_t * | buf, |
uint64_t | size, | ||
const AddressRanges & | ranges, | ||
size_t | alignment, | ||
size_t | max_matches, | ||
Status & | error | ||
) |
Definition at line 2048 of file Process.cpp.
References DoFindInMemory(), error(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), lldb_private::Address::GetLoadAddress(), GetTarget(), lldb_private::AddressRange::IsValid(), and LLDB_INVALID_ADDRESS.
ThreadPlanStack * Process::FindThreadPlans | ( | lldb::tid_t | tid | ) |
Find the thread plan stack associated with thread with tid.
[in] | tid | The tid whose Plan Stack we are seeking. |
Definition at line 1266 of file Process.cpp.
References lldb_private::ThreadPlanStackMap::Find(), and m_thread_plans.
addr_t Process::FixAnyAddress | ( | lldb::addr_t | pc | ) |
Use this method when you do not know, or do not care what kind of address you are fixing.
On platforms where there would be a difference between the two types, it will pick the safest option.
Its purpose is to signal that no specific choice was made and provide an alternative to randomly picking FixCode/FixData address. Which could break platforms where there is a difference (only Arm Thumb at this time).
Definition at line 5964 of file Process.cpp.
References GetABI().
Referenced by ProcessMachCore::ReadMemory().
addr_t Process::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.
Or use the high bits to authenticate a pointer value.
Definition at line 5952 of file Process.cpp.
References GetABI().
Referenced by DynamicLoaderMacOS::GetNotificationFuncAddrFromImageInfos(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), and DynamicLoaderMacOS::NotifyBreakpointHit().
addr_t Process::FixDataAddress | ( | lldb::addr_t | pc | ) |
Definition at line 5958 of file Process.cpp.
References GetABI().
Referenced by lldb_private::ItaniumABILanguageRuntime::GetVTableInfo().
void Process::Flush | ( | ) |
Flush all data in the process.
Flush the memory caches, all threads, and any other cached data in the process.
This function can be called after a world changing event like adding a new symbol file, or after the process makes a large context switch (from boot ROM to booted into an OS).
Definition at line 5886 of file Process.cpp.
References lldb_private::QueueList::Clear(), lldb_private::ThreadList::Flush(), m_extended_thread_list, m_extended_thread_stop_id, m_queue_list, m_queue_list_stop_id, and m_thread_list.
Referenced by DidExec(), CommandObjectTargetModulesLoad::DoExecute(), CommandObjectTargetSymbolsAdd::DoExecute(), ObjectFileMachO::LoadCoreFileImages(), LoadOperatingSystemPlugin(), and lldb_private::ProcessProperties::SetDisableLangRuntimeUnwindPlans().
|
inlineprotected |
Definition at line 2964 of file Process.h.
References m_force_next_event_delivery.
Referenced by RunThreadPlan().
|
inlinevirtual |
Reimplemented in lldb_private::ScriptedProcess.
const lldb::ABISP & Process::GetABI | ( | ) |
Definition at line 1531 of file Process.cpp.
References lldb_private::ABI::FindPlugin(), GetTarget(), and m_abi_sp.
Referenced by lldb_private::ThreadPlanStepOut::CalculateReturnValue(), lldb_private::StopInfoMachException::DeterminePtrauthFailure(), CommandObjectMemoryTagRead::DoExecute(), CommandObjectMemoryTagWrite::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), lldb_private::DWARFExpression::Evaluate(), FixAnyAddress(), FixCodeAddress(), FixDataAddress(), lldb_private::AppleObjCRuntimeV2::TaggedPointerVendorRuntimeAssisted::GetClassDescriptor(), lldb_private::AppleObjCRuntimeV2::GetClassDescriptor(), lldb_private::ObjCLanguageRuntime::GetClassDescriptorFromISA(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), GetMemoryRegionInfo(), GetMemoryRegions(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::ThreadPlanAssemblyTracer::Log(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::ClassDescriptorV2::objc_class_t::Read(), lldb_private::ClassDescriptorV2::class_rw_t::Read(), lldb_private::ClassDescriptorV2::method_list_t::Read(), ProcessElfCore::ReadMemory(), lldb_private::ProcessTrace::ReadMemory(), ReadMemory(), ReadMemoryFromInferior(), lldb_private::AbortWithPayloadFrameRecognizer::RecognizeFrame(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(), ResolveIndirectFunction(), lldb_private::RegisterContextUnwind::SavedLocationForRegister(), SaveOffRegionsWithStackPointers(), lldb_private::ThreadPlanCallFunction::SetReturnValue(), lldb_private::ThreadPlanCallFunctionUsingABI::SetReturnValue(), and WriteMemory().
uint32_t Process::GetAddressByteSize | ( | ) | const |
Definition at line 3600 of file Process.cpp.
References lldb_private::ArchSpec::GetAddressByteSize(), lldb_private::Target::GetArchitecture(), and GetTarget().
Referenced by lldb_private::formatters::Foundation1437::__NSArrayMSize(), lldb_private::formatters::Foundation1437::__NSArrayMSize_Impl(), lldb_private::formatters::Foundation1437::__NSDictionaryMSize(), lldb_private::formatters::Foundation1437::__NSDictionaryMSize_Impl(), lldb_private::formatters::Foundation1437::__NSSetMSize(), lldb_private::formatters::Foundation1437::__NSSetMSize_Impl(), CallVoidArgVoidPtrReturn(), SystemRuntimeMacOSX::CompleteQueueItem(), lldb_private::AppleObjCRuntimeV2::SharedCacheImageHeaders::CreateSharedCacheImageHeaders(), CommandObjectMemoryFind::DoExecute(), CommandObjectProcessMinidumpDump::DoExecute(), PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), lldb_private::ScriptedProcess::DoWriteMemory(), CommandObjectRegisterRead::DumpRegister(), lldb_private::AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(), ExtractRuntimeGlobalSymbol(), ProcessElfCore::FindBuidIdInCoreMemory(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), ABIMacOSX_arm64::GetArgumentValues(), ABISysV_arm64::GetArgumentValues(), ABIMacOSX_arm::GetArgumentValues(), ABISysV_arm::GetArgumentValues(), ProcessElfCore::GetAuxvData(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetAuxvData(), lldb_private::AppleObjCRuntime::GetBacktraceThreadFromException(), GetClassDataMask(), lldb_private::AppleObjCRuntimeV2::TaggedPointerVendorRuntimeAssisted::GetClassDescriptor(), lldb_private::AppleObjCRuntimeV2::TaggedPointerVendorExtended::GetClassDescriptor(), lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), SystemRuntimeMacOSX::GetExtendedBacktraceFromItemRef(), SystemRuntimeMacOSX::GetExtendedBacktraceThread(), lldb_private::formatters::InferiorSizedWord::GetMaximum(), SystemRuntimeMacOSX::GetPendingItemRefsForQueue(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), DynamicLoaderMacOSXDYLD::GetSharedCacheInformation(), lldb_private::ClassDescriptorV2::ivar_t::GetSize(), lldb_private::ClassDescriptorV2::method_t::GetSize(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::InferiorCallMmap(), LoadValueFromConsecutiveGPRRegisters(), lldb_private::ThreadPlanAssemblyTracer::Log(), RemoteNXMapTable::ParseHeader(), SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR(), lldb_private::ProcessStructReader::ProcessStructReader(), lldb_private::ClassDescriptorV2::objc_class_t::Read(), lldb_private::ClassDescriptorV2::class_ro_t::Read(), lldb_private::ClassDescriptorV2::class_rw_t::Read(), lldb_private::ClassDescriptorV2::method_list_t::Read(), lldb_private::ClassDescriptorV2::ivar_list_t::Read(), lldb_private::ClassDescriptorV2::ivar_t::Read(), lldb_private::ClassDescriptorV2::relative_list_entry_t::Read(), lldb_private::ClassDescriptorV2::relative_list_list_t::Read(), lldb_private::ClassDescriptorV2::method_t::Read(), lldb_private::RegisterContextUnwind::ReadFrameAddress(), SystemRuntimeMacOSX::ReadLibdispatchOffsets(), SystemRuntimeMacOSX::ReadLibpthreadOffsets(), HexagonDYLDRendezvous::ReadPointer(), DYLDRendezvous::ReadPointer(), ReadPointerFromMemory(), ReadScalarIntegerFromMemory(), ReadVBaseOffsetFromVTable(), HexagonDYLDRendezvous::Resolve(), DYLDRendezvous::Resolve(), DYLDRendezvous::ResolveRendezvousAddress(), lldb_private::RegisterContextUnwind::SavedLocationForRegister(), DynamicLoaderDarwinKernel::SearchForKernelWithDebugHints(), NSIndexPathSyntheticFrontEnd::Impl::InlinedIndexes::SetIndexes(), lldb_private::AppleObjCRuntimeV2::SharedCacheImageHeaders::UpdateIfNeeded(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap(), lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap(), lldb_private::AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded(), lldb_private::ValueObjectRegister::UpdateValue(), lldb_private::FunctionCaller::WriteFunctionArguments(), and WritePointerToMemory().
|
virtual |
Get any available profile data.
[out] | buf | A buffer that will receive any profile data bytes that are currently available. |
[out] | buf_size | The size in bytes for the buffer buf. |
Definition at line 4535 of file Process.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_profile_data, m_profile_data_comm_mutex, and lldb_private::Process.
|
virtual |
Reimplemented in ProcessElfCore, and lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 2856 of file Process.cpp.
Referenced by DynamicLoaderPOSIXDYLD::DidAttach(), and DynamicLoaderPOSIXDYLD::DidLaunch().
StopPointSiteList< BreakpointSite > & Process::GetBreakpointSiteList | ( | ) |
Definition at line 1610 of file Process.cpp.
References m_breakpoint_site_list.
Referenced by lldb_private::ThreadPlanStepUntil::AnalyzeStop(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidForkSwitchHardwareTraps(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidForkSwitchSoftwareBreakpoints(), CommandObjectProcessContinue::DoExecute(), lldb_private::ThreadPlanCallFunction::DoPlanExplainsStop(), lldb_private::ThreadPlanStepOut::DoPlanExplainsStop(), lldb_private::ThreadPlanStepOverBreakpoint::DoWillResume(), lldb_private::ItaniumABILanguageRuntime::ExceptionBreakpointsExplainStop(), lldb_private::AppleObjCRuntime::ExceptionBreakpointsExplainStop(), lldb::SBThread::GetStopReasonDataAtIndex(), lldb::SBThread::GetStopReasonDataCount(), lldb_private::ThreadPlanStepThrough::HitOurBackstopBreakpoint(), lldb_private::ThreadPlanStepRange::IsNextBranchBreakpointStop(), lldb_private::ThreadPlanStepRange::NextRangeBreakpointExplainsStop(), lldb_private::ThreadPlanStepOverBreakpoint::ReenableBreakpointSite(), and lldb_private::ProcessWindows::RefreshStateAfterStop().
const StopPointSiteList< BreakpointSite > & Process::GetBreakpointSiteList | ( | ) | const |
Definition at line 1615 of file Process.cpp.
References m_breakpoint_site_list.
|
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 393 of file Process.h.
References GetStaticBroadcasterClass().
lldb::ByteOrder Process::GetByteOrder | ( | ) | const |
Definition at line 3596 of file Process.cpp.
References lldb_private::Target::GetArchitecture(), lldb_private::ArchSpec::GetByteOrder(), and GetTarget().
Referenced by SystemRuntimeMacOSX::CompleteQueueItem(), lldb_private::AppleObjCRuntimeV2::SharedCacheImageHeaders::CreateSharedCacheImageHeaders(), lldb_private::IRExecutionUnit::DisassembleFunction(), CommandObjectMemoryFind::DoExecute(), lldb_private::ScriptedProcess::DoReadMemory(), lldb_private::ScriptedProcess::DoWriteMemory(), lldb_private::DWARFExpression::Evaluate(), lldb_private::AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(), ProcessElfCore::FindBuidIdInCoreMemory(), ProcessElfCore::GetAuxvData(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetAuxvData(), lldb_private::RegisterContext::GetByteOrder(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), SystemRuntimeMacOSX::GetExtendedBacktraceFromItemRef(), SystemRuntimeMacOSX::GetExtendedBacktraceThread(), SystemRuntimeMacOSX::GetPendingItemRefsForQueue(), ABIMacOSX_arm64::GetReturnValueObjectImpl(), ABISysV_arm64::GetReturnValueObjectImpl(), lldb_private::ClangExpressionDeclMap::GetTargetInfo(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), LoadValueFromConsecutiveGPRRegisters(), lldb_private::ThreadPlanAssemblyTracer::Log(), SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR(), lldb_private::ProcessStructReader::ProcessStructReader(), lldb_private::ClassDescriptorV2::objc_class_t::Read(), lldb_private::ClassDescriptorV2::class_ro_t::Read(), lldb_private::ClassDescriptorV2::class_rw_t::Read(), lldb_private::ClassDescriptorV2::method_list_t::Read(), lldb_private::ClassDescriptorV2::ivar_list_t::Read(), lldb_private::ClassDescriptorV2::ivar_t::Read(), lldb_private::ClassDescriptorV2::relative_list_entry_t::Read(), lldb_private::ClassDescriptorV2::relative_list_list_t::Read(), lldb_private::ClassDescriptorV2::method_t::Read(), lldb_private::RegisterContextUnwind::ReadFrameAddress(), ReadJITEntry(), SystemRuntimeMacOSX::ReadLibdispatchOffsets(), SystemRuntimeMacOSX::ReadLibpthreadOffsets(), ReadScalarIntegerFromMemory(), lldb_private::RegisterContextUnwind::SavedLocationForRegister(), DynamicLoaderDarwinKernel::SearchForKernelWithDebugHints(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadPc(), lldb_private::AppleObjCRuntimeV2::SharedCacheImageHeaders::UpdateIfNeeded(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap(), lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap(), lldb_private::AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded(), and WriteScalarToMemory().
lldb::addr_t Process::GetCodeAddressMask | ( | ) |
Get the current address mask in the Process.
This mask can used to set/clear non-address bits in an addr_t.
Definition at line 5894 of file Process.cpp.
References lldb_private::AddressableBits::AddressableBitToMask(), lldb_private::ProcessProperties::GetVirtualAddressableBits(), and m_code_address_mask.
Referenced by CommandObjectProcessStatus::DoExecute(), GetHighmemCodeAddressMask(), and DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded().
|
inlinevirtual |
Provide a way to retrieve the core dump file that is loaded for debugging.
Only available if IsLiveDebugSession() returns true.
Reimplemented in lldb_private::PostMortemProcess.
lldb::addr_t Process::GetDataAddressMask | ( | ) |
Definition at line 5901 of file Process.cpp.
References lldb_private::AddressableBits::AddressableBitToMask(), lldb_private::ProcessProperties::GetVirtualAddressableBits(), and m_data_address_mask.
Referenced by CommandObjectProcessStatus::DoExecute(), GetHighmemDataAddressMask(), and DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded().
|
inline |
Definition at line 2382 of file Process.h.
References m_dynamic_checkers_up.
Referenced by lldb_private::ClangExpressionParser::DoPrepareForExecution(), and lldb_private::ThreadPlanCallUserExpression::GetRealStopInfo().
|
virtual |
Get the dynamic loader plug-in for this process.
The default action is to let the DynamicLoader plug-ins check the main executable and the DynamicLoader will select itself automatically. Subclasses can override this if inspecting the executable is not desired, or if Process subclasses can only use a specific DynamicLoader plug-in.
Reimplemented in lldb_private::ProcessTrace, ProcessElfCore, ProcessFreeBSDKernel, lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessMachCore, ProcessKDP, lldb_private::minidump::ProcessMinidump, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
Definition at line 2846 of file Process.cpp.
References lldb_private::DynamicLoader::FindPlugin(), and m_dyld_up.
Referenced by CompleteAttach(), PlatformPOSIX::EvaluateLibdlExpression(), lldb_private::PlatformWindows::EvaluateLoaderExpression(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), ObjectFileMachO::GetProcessSharedCacheUUID(), and LoadCore().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 1401 of file Process.h.
Referenced by DynamicLoaderMacOS::IsFullyInitialized().
|
protected |
Definition at line 1058 of file Process.cpp.
References lldb_private::GetLog(), LLDB_LOG, m_private_state_control_broadcaster, m_private_state_listener_sp, and lldb_private::Process.
Referenced by RunPrivateStateThread().
const char * Process::GetExitDescription | ( | ) |
Get a textual description of what the process exited.
Definition at line 1083 of file Process.cpp.
References lldb::eStateExited, lldb_private::ThreadSafeValue< T >::GetValue(), m_exit_status_mutex, m_exit_string, and m_public_state.
Referenced by GetStatus().
int Process::GetExitStatus | ( | ) |
Get the exit status for a process.
Definition at line 1075 of file Process.cpp.
References lldb::eStateExited, lldb_private::ThreadSafeValue< T >::GetValue(), m_exit_status, m_exit_status_mutex, and m_public_state.
Referenced by GetStatus().
|
inline |
Fetch extended crash information held by the process.
This will never be an empty shared pointer, it will always have a dict, though it may be empty.
Definition at line 2588 of file Process.h.
References m_crash_info_dict_sp.
Referenced by lldb_private::PlatformDarwin::FetchExtendedCrashInformation(), and lldb_private::AbortWithPayloadFrameRecognizer::RecognizeFrame().
|
inline |
Definition at line 2238 of file Process.h.
References m_extended_thread_list.
Referenced by lldb_private::AppleObjCRuntime::GetBacktraceThreadFromException(), and lldb::SBThread::GetExtendedBacktraceThread().
|
inlinevirtual |
Try to find the load address of a file.
The load address is defined as the address of the first memory region what contains data mapped from the specified file.
[in] | file | The name of the file whose load address we are looking for |
[out] | is_loaded | True if the file is loaded into the memory and false otherwise. |
[out] | load_addr | The load address of the file if it is loaded into the processes address space, LLDB_INVALID_ADDRESS otherwise. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 2573 of file Process.h.
Referenced by lldb_private::DynamicLoaderWindowsDYLD::GetLoadAddress(), and DYLDRendezvous::UpdateBaseAddrIfNecessary().
|
static |
Definition at line 547 of file Process.cpp.
References ProcessProperties.
Referenced by lldb_private::ProcessProperties::ProcessProperties(), and lldb_private::TargetProperties::TargetProperties().
lldb::addr_t Process::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.
Definition at line 5908 of file Process.cpp.
References lldb_private::AddressableBits::AddressableBitToMask(), GetCodeAddressMask(), lldb_private::ProcessProperties::GetHighmemVirtualAddressableBits(), LLDB_INVALID_ADDRESS_MASK, and m_highmem_code_address_mask.
lldb::addr_t Process::GetHighmemDataAddressMask | ( | ) |
Definition at line 5917 of file Process.cpp.
References lldb_private::AddressableBits::AddressableBitToMask(), GetDataAddressMask(), lldb_private::ProcessProperties::GetHighmemVirtualAddressableBits(), LLDB_INVALID_ADDRESS_MASK, and m_highmem_data_address_mask.
ThreadCollectionSP Process::GetHistoryThreads | ( | lldb::addr_t | addr | ) |
Definition at line 6106 of file Process.cpp.
References lldb_private::MemoryHistory::FindPlugin().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
|
inlinevirtual |
Sometimes the connection to a process can detect the host OS version that the process is running on.
The current platform should be checked first in case the platform is connected, but clients can fall back onto this function if the platform fails to identify the host OS version. The platform should be checked first in case you are running a simulator platform that might itself be running natively, but have different heuristics for figuring out which OS is emulating.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 1275 of file Process.h.
Referenced by lldb_private::Platform::GetOSVersion(), and lldb_private::DynamicLoaderDarwin::UseDYLDSPI().
|
inline |
Returns the pid of the process or LLDB_INVALID_PROCESS_ID if there is no known pid.
Definition at line 540 of file Process.h.
References m_pid.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread(), ProcessKDP::AsyncThread(), Attach(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), BuildKernelSection(), BuildProcessSection(), CanJIT(), CompleteAttach(), ConnectRemote(), DynamicLoaderPOSIXDYLD::DidAttach(), ProcessKDP::DidAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoDestroy(), lldb_private::ProcessWindows::DoDetach(), CommandObjectProcessContinue::DoExecute(), CommandObjectProcessConnect::DoExecute(), CommandObjectThreadContinue::DoExecute(), CommandObjectThreadUntil::DoExecute(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoResume(), ProcessKDP::DoUpdateThreadList(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoUpdateThreadList(), DynamicLoaderPOSIXDYLD::EntryBreakpointHit(), lldb_private::FormatEntity::Format(), lldb_private::PlatformDarwin::GetOSVersion(), ProcessElfCore::GetProcessInfo(), GetProcessInfo(), lldb_private::ProcessTrace::GetProcessInfo(), lldb_private::minidump::ProcessMinidump::GetProcessInfo(), lldb_private::ScriptedProcess::GetProcessInfo(), GetStatus(), HandlePrivateEvent(), lldb_private::process_gdb_remote::ProcessGDBRemote::HandleStopReply(), lldb_private::ProcessWindows::OnExitProcess(), lldb_private::Process::AttachCompletionHandler::PerformAction(), PrintWarningOptimization(), PrintWarningUnsupportedLanguage(), DynamicLoaderPOSIXDYLD::ProbeEntry(), DynamicLoaderPOSIXDYLD::RendezvousBreakpointHit(), DynamicLoaderPOSIXDYLD::ResolveExecutableModule(), RunPrivateStateThread(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), StartPrivateStateThread(), and lldb_private::process_gdb_remote::ThreadGDBRemote::ThreadGDBRemote().
|
virtual |
Get the image information address for the current process.
Some runtimes have system functions that can help dynamic loaders locate the dynamic loader information needed to observe shared libraries being loaded or unloaded. This function is in the Process interface (as opposed to the DynamicLoader interface) to ensure that remote debugging can take advantage of this functionality.
Reimplemented in ProcessElfCore, lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessMachCore, ProcessKDP, and lldb_private::ProcessWindows.
Definition at line 1529 of file Process.cpp.
References LLDB_INVALID_ADDRESS.
Referenced by lldb_private::DynamicLoaderWindowsDYLD::DidAttach(), DynamicLoaderMacOS::DoInitialImageFetch(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), DynamicLoaderFreeBSDKernel::FindFreeBSDKernel(), DynamicLoaderMacOS::GetNotificationFuncAddrFromImageInfos(), DynamicLoaderMacOSXDYLD::GetSharedCacheInformation(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOS::ProcessDidExec(), DynamicLoaderMacOSXDYLD::ProcessDidExec(), DYLDRendezvous::ResolveRendezvousAddress(), ResolveRendezvousAddress(), and DynamicLoaderDarwinKernel::SearchForDarwinKernel().
lldb::addr_t Process::GetImagePtrFromToken | ( | size_t | token | ) | const |
Definition at line 6143 of file Process.cpp.
References LLDB_INVALID_IMAGE_TOKEN, and m_image_tokens.
Referenced by PlatformPOSIX::UnloadImage(), and lldb_private::PlatformWindows::UnloadImage().
|
inline |
Get the image vector for the current process.
Definition at line 797 of file Process.h.
References m_image_tokens.
Referenced by CommandObjectProcessUnload::HandleArgumentCompletion().
|
inlinevirtual |
Reimplemented in lldb_private::ScriptedProcess.
InstrumentationRuntimeSP Process::GetInstrumentationRuntime | ( | lldb::InstrumentationRuntimeType | type | ) |
Definition at line 6123 of file Process.cpp.
References m_instrumentation_runtimes.
|
inline |
Definition at line 2289 of file Process.h.
References lldb_private::Predicate< T >::GetValue(), and m_iohandler_sync.
Referenced by CommandObjectProcessContinue::DoExecute(), and CommandObjectThreadStepWithTypeAndScope::DoExecute().
|
protectedvirtual |
Reimplemented in lldb_private::minidump::ProcessMinidump.
Definition at line 2862 of file Process.cpp.
References lldb_private::JITLoader::LoadPlugins(), and m_jit_loaders_up.
Referenced by CompleteAttach(), LoadCore(), and ModulesDidLoad().
LanguageRuntime * Process::GetLanguageRuntime | ( | lldb::LanguageType | language | ) |
Definition at line 1557 of file Process.cpp.
References lldb_private::LanguageRuntime::FindPlugin(), lldb_private::LanguageRuntime::GetLanguageType(), lldb_private::Language::GetPrimaryLanguage(), m_finalizing, m_language_runtimes, and m_language_runtimes_mutex.
Referenced by lldb_private::CPPLanguageRuntime::Get(), lldb_private::ObjCLanguageRuntime::Get(), lldb_private::AppleObjCRuntime::GetExceptionObjectForThread(), GetLanguageRuntimes(), lldb_private::ValueObject::GetObjectDescription(), IsPossibleDynamicValue(), lldb_private::ValueObject::IsRuntimeSupportValue(), ModulesDidLoad(), lldb_private::ThreadPlanCallFunction::SetBreakpoints(), and lldb_private::ValueObjectDynamicValue::UpdateValue().
std::vector< LanguageRuntime * > Process::GetLanguageRuntimes | ( | ) |
Definition at line 1537 of file Process.cpp.
References GetLanguageRuntime(), lldb_private::Language::GetSupportedLanguages(), m_finalizing, and m_language_runtimes_mutex.
Referenced by IsPossibleDynamicValue(), and lldb_private::ThreadPlanStepThrough::LookForPlanToStepThroughFromCurrentPC().
|
inline |
Definition at line 1498 of file Process.h.
References lldb_private::ProcessModID::GetLastNaturalStopID(), and m_mod_id.
Referenced by UpdateQueueListIfNeeded(), and UpdateThreadListIfNeeded().
|
inline |
Definition at line 1494 of file Process.h.
References lldb_private::ProcessModID::GetLastUserExpressionResumeID(), and m_mod_id.
|
virtual |
Attempt to get the attributes for a region of memory in the process.
It may be possible for the remote debug server to inspect attributes for a region of memory in the process, such as whether there is a valid page of memory at a given address or whether that page is readable/writable/executable by the process.
[in] | load_addr | The address of interest in the process. |
[out] | permissions | If this call returns successfully, this bitmask will have its Permissions bits set to indicate whether the region is readable/writable/executable. If this call fails, the bitmask values are undefined. |
Definition at line 2573 of file Process.cpp.
References lldb_private::MemoryRegionInfo::eDontKnow, error(), lldb_private::MemoryRegionInfo::GetExecutable(), lldb_private::MemoryRegionInfo::GetLLDBPermissions(), GetMemoryRegionInfo(), lldb_private::MemoryRegionInfo::GetReadable(), and lldb_private::MemoryRegionInfo::GetWritable().
Referenced by lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::ReadFrameAddress(), and lldb_private::ThreadPlanStepOut::ThreadPlanStepOut().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ScriptedProcess.
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
|
inlinevirtual |
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.
The following two methods are for newer versions of those OSes.
For certain platforms, the time it takes for the DynamicLoader plugin to read all of the shared libraries out of memory over a slow communication channel may be too long. In that instance, the gdb-remote stub may be able to retrieve the necessary information about the solibs out of memory and return a concise summary sufficient for the DynamicLoader plugin.
[in] | image_list_address | The address where the table of shared libraries is stored in memory, if that is appropriate for this platform. Else this may be passed as LLDB_INVALID_ADDRESS. |
[in] | image_count | The number of shared libraries that are present in this process, if that is appropriate for this platofrm Else this may be passed as LLDB_INVALID_ADDRESS. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 1367 of file Process.h.
Referenced by DynamicLoaderMacOS::AddBinaries(), DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfosAddress(), and DynamicLoaderMacOS::DoInitialImageFetch().
|
inlinevirtual |
Query remote GDBServer for a detailed loaded library list.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 700 of file Process.h.
Referenced by DYLDRendezvous::UpdateSOEntriesFromRemote().
UtilityFunction * Process::GetLoadImageUtilityFunction | ( | Platform * | platform, |
llvm::function_ref< std::unique_ptr< UtilityFunction >()> | factory | ||
) |
Get the cached UtilityFunction that assists in loading binary images into the process.
[in] | platform | The platform fetching the UtilityFunction. |
[in] | factory | A function that will be called only once per-process in a thread-safe way to create the UtilityFunction if it has not been initialized yet. |
Definition at line 6360 of file Process.cpp.
References GetTarget(), m_dlopen_utility_func_flag_once, and m_dlopen_utility_func_up.
Referenced by PlatformPOSIX::DoLoadImage(), and lldb_private::PlatformWindows::DoLoadImage().
Status Process::GetMemoryRegionInfo | ( | lldb::addr_t | load_addr, |
MemoryRegionInfo & | range_info | ||
) |
Locate the memory region that contains load_addr.
If load_addr is within the address space the process has mapped range_info will be filled in with the start and end of that range as well as the permissions for that range and range_info. GetMapped will return true.
If load_addr is outside any mapped region then range_info will have its start address set to load_addr and the end of the range will indicate the start of the next mapped range or be set to LLDB_INVALID_ADDRESS if there are no valid mapped ranges between load_addr and the end of the process address space.
GetMemoryRegionInfo calls DoGetMemoryRegionInfo. Override that function in process subclasses.
[in] | load_addr | The load address to query the range_info for. May include non address bits, these will be removed by the ABI plugin if there is one. |
[out] | range_info | An range_info value containing the details of the range. |
Definition at line 6203 of file Process.cpp.
References DoGetMemoryRegionInfo(), and GetABI().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DoWriteMemory(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashErase(), GetLoadAddressPermissions(), GetMemoryRegions(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), DynamicLoaderPOSIXDYLD::LoadModuleAtAddress(), DynamicLoaderPOSIXDYLD::LoadVDSO(), SaveOffRegionsWithStackPointers(), and DYLDRendezvous::UpdateFileSpecIfNecessary().
|
virtual |
Obtain all the mapped memory regions within this process.
[out] | region_list | A vector to contain MemoryRegionInfo objects for all mapped ranges. |
Reimplemented in lldb_private::minidump::ProcessMinidump, and lldb_private::ScriptedProcess.
Definition at line 6210 of file Process.cpp.
References error(), lldb_private::MemoryRegionInfo::eYes, GetABI(), lldb_private::MemoryRegionInfo::GetMapped(), GetMemoryRegionInfo(), lldb_private::MemoryRegionInfo::GetRange(), lldb_private::Range< B, S >::GetRangeEnd(), and LLDB_INVALID_ADDRESS.
Referenced by CalculateCoreFileSaveRanges(), CommandObjectMemoryTagRead::DoExecute(), and CommandObjectMemoryTagWrite::DoExecute().
llvm::Expected< const MemoryTagManager * > Process::GetMemoryTagManager | ( | ) |
If this architecture and process supports memory tagging, return a tag manager that can be used to maniupulate those memory tags.
Definition at line 6435 of file Process.cpp.
References lldb_private::Target::GetArchitecturePlugin(), lldb_private::Architecture::GetMemoryTagManager(), GetTarget(), and SupportsMemoryTagging().
Referenced by CommandObjectMemoryTagRead::DoExecute(), CommandObjectMemoryTagWrite::DoExecute(), ReadMemoryTags(), ProcessElfCore::ReadMemoryTags(), and WriteMemoryTags().
|
inlinevirtual |
Fetch process defined metadata.
Reimplemented in lldb_private::ScriptedProcess.
Definition at line 2583 of file Process.h.
Referenced by lldb_private::PlatformDarwin::ExtractAppSpecificInfo().
|
inline |
Get the Modification ID of the process.
Definition at line 1486 of file Process.h.
References m_mod_id.
Referenced by PrivateResume(), and lldb_private::ValueObject::EvaluationPoint::SyncWithProcessState().
|
inline |
Definition at line 1488 of file Process.h.
References m_mod_id.
Referenced by lldb_private::StopInfoBreakpoint::PerformAction().
|
virtual |
Try to fetch the module specification for a module with the given file name and architecture.
Process sub-classes have to override this method if they support platforms where the Platform object can't get the module spec for all module.
[in] | module_file_spec | The file name of the module to get specification for. |
[in] | arch | The architecture of the module to get specification for. |
[out] | module_spec | The fetched module specification if the return value is true, unchanged otherwise. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 6132 of file Process.cpp.
References lldb_private::ModuleSpec::Clear().
Referenced by lldb_private::Platform::GetRemoteSharedModule().
StateType Process::GetNextEvent | ( | lldb::EventSP & | event_sp | ) |
Definition at line 652 of file Process.cpp.
References lldb::eStateInvalid, lldb_private::Broadcaster::GetPrimaryListener(), and lldb_private::Process::ProcessEventData::GetStateFromEvent().
uint32_t Process::GetNextThreadIndexID | ( | uint64_t | thread_id | ) |
Definition at line 1312 of file Process.cpp.
References AssignIndexIDToThread().
|
inline |
Definition at line 2372 of file Process.h.
References m_os_up.
Referenced by CreateOSPluginThread(), and UpdateThreadListIfNeeded().
|
inlinevirtual |
Return a multi-word command object that can be used to expose plug-in specific commands.
This object will be used to resolve plug-in commands and can be triggered by a call to:
(lldb) process command <args>
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessKDP, and lldb_private::minidump::ProcessMinidump.
Definition at line 589 of file Process.h.
Referenced by CommandObjectProcessPlugin::GetProxyCommandObject().
|
protected |
Definition at line 1452 of file Process.cpp.
References lldb_private::ThreadSafeValue< T >::GetValue(), and m_private_state.
Referenced by AllocateMemory(), lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread(), lldb_private::ProcessWindows::DidAttach(), lldb_private::ProcessWindows::DoDestroy(), lldb_private::ProcessWindows::DoDetach(), lldb_private::ProcessWindows::DoHalt(), lldb_private::ProcessWindows::DoResume(), lldb_private::ProcessWindows::IsAlive(), UpdateQueueListIfNeeded(), UpdateThreadListIfNeeded(), and WaitForProcessToStop().
|
virtual |
Reimplemented in ProcessElfCore, lldb_private::ProcessTrace, lldb_private::minidump::ProcessMinidump, and lldb_private::ScriptedProcess.
Definition at line 6096 of file Process.cpp.
References lldb_private::ProcessInstanceInfo::Clear(), GetID(), lldb_private::Target::GetPlatform(), and GetTarget().
Referenced by CompleteAttach(), and DynamicLoaderPOSIXDYLD::ResolveExecutableModule().
|
inline |
Definition at line 2258 of file Process.h.
References m_queue_list, and UpdateQueueListIfNeeded().
|
inline |
Definition at line 1492 of file Process.h.
References lldb_private::ProcessModID::GetResumeID(), and m_mod_id.
ProcessRunLock & Process::GetRunLock | ( | ) |
Definition at line 5873 of file Process.cpp.
References lldb_private::HostThread::EqualsThread(), lldb_private::Host::GetCurrentThread(), m_private_run_lock, m_private_state_thread, and m_public_run_lock.
Referenced by lldb::SBFrame::Disassemble(), lldb::SBFrame::EvaluateExpression(), lldb::SBTarget::EvaluateExpression(), lldb::SBFrame::FindRegister(), lldb::SBFrame::FindValue(), lldb::SBFrame::FindVariable(), lldb::SBFrame::GetBlock(), lldb::SBFrame::GetCompileUnit(), lldb::SBFrame::GetDescription(), lldb::SBFrame::GetDescriptionWithFormat(), lldb::SBFrame::GetDisplayFunctionName(), lldb::SBThread::GetExtendedBacktraceThread(), lldb::SBFrame::GetFP(), lldb::SBThread::GetFrameAtIndex(), lldb::SBFrame::GetFrameBlock(), lldb::SBFrame::GetFunction(), lldb::SBFrame::GetFunctionName(), lldb::SBThread::GetInfoItemByPathAsString(), lldb::SBFrame::GetLineEntry(), lldb::SBFrame::GetModule(), lldb::SBThread::GetName(), lldb::SBThread::GetNumFrames(), lldb::SBFrame::GetPC(), lldb::SBFrame::GetPCAddress(), lldb::SBThread::GetQueue(), lldb::SBThread::GetQueueID(), lldb::SBThread::GetQueueName(), lldb::SBFrame::GetRegisters(), lldb::SBThread::GetSelectedFrame(), lldb::SBFrame::GetSP(), lldb::SBThread::GetStopDescription(), lldb::SBThread::GetStopReason(), lldb::SBThread::GetStopReasonDataAtIndex(), lldb::SBThread::GetStopReasonDataCount(), lldb::SBThread::GetStopReturnValue(), lldb::SBFrame::GetSymbol(), lldb::SBFrame::GetSymbolContext(), lldb::SBFrame::GetValueForVariablePath(), lldb::SBFrame::GetVariables(), lldb::SBFrame::GuessLanguage(), lldb::SBFrame::IsInlined(), lldb::SBFrame::operator bool(), lldb::SBThread::operator bool(), lldb::SBThread::Resume(), lldb::SBFrame::SetPC(), lldb::SBThread::SetSelectedFrame(), and lldb::SBThread::Suspend().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 1392 of file Process.h.
Referenced by lldb_private::AppleObjCRuntimeV2::GetSharedCacheBaseAddress(), and DynamicLoaderMacOS::GetSharedCacheInformation().
|
inline |
Definition at line 789 of file Process.h.
References m_should_detach.
Referenced by DestroyImpl(), and CommandObjectProcessLaunchOrAttach::StopProcessIfNecessary().
size_t Process::GetSoftwareBreakpointTrapOpcode | ( | BreakpointSite * | bp_site | ) |
Definition at line 1796 of file Process.cpp.
References GetTarget().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DisableBreakpointSite(), lldb_private::process_gdb_remote::ProcessGDBRemote::EnableBreakpointSite(), and EnableSoftwareBreakpoint().
|
inline |
Definition at line 2689 of file Process.h.
References m_source_file_cache.
StateType Process::GetState | ( | ) |
Get accessor for the current process state.
Definition at line 1335 of file Process.cpp.
References CurrentThreadIsPrivateStateThread(), lldb_private::ThreadSafeValue< T >::GetValue(), m_private_state, and m_public_state.
Referenced by CommandObjectTargetSymbolsAdd::AddSymbolsForFrame(), CommandObjectTargetSymbolsAdd::AddSymbolsForStack(), lldb_private::CommandObject::CheckRequirements(), CreateBreakpointSite(), CreateEventFromProcessState(), CommandObjectProcessContinue::DoExecute(), CommandObjectThreadContinue::DoExecute(), CommandObjectProcessKDPPacketSend::DoExecute(), lldb_private::Process::ProcessEventData::Dump(), lldb_private::UserExpression::Evaluate(), GetStatus(), lldb_private::Value::GetValueAsData(), Halt(), HandlePrivateEvent(), lldb_private::FunctionCaller::InsertFunction(), lldb_private::ClangUtilityFunction::Install(), lldb_private::CommandInterpreter::IOHandlerInterrupt(), DynamicLoaderDarwinKernel::PrivateInitialize(), lldb_private::DynamicLoaderDarwin::PrivateInitialize(), DynamicLoaderMacOSXDYLD::SetNotificationBreakpoint(), DynamicLoaderDarwinKernel::SetNotificationBreakpointIfNeeded(), lldb_private::Thread::StepIn(), lldb_private::Thread::StepOut(), lldb_private::Thread::StepOver(), StopForDestroyOrDetach(), CommandObjectProcessLaunchOrAttach::StopProcessIfNecessary(), WaitForProcessToStop(), and lldb_private::FunctionCaller::WriteFunctionWrapper().
StateType Process::GetStateChangedEvents | ( | lldb::EventSP & | event_sp, |
const Timeout< std::micro > & | timeout, | ||
lldb::ListenerSP | hijack_listener | ||
) |
Definition at line 996 of file Process.cpp.
References eBroadcastBitInterrupt, eBroadcastBitStateChanged, lldb::eStateInvalid, lldb_private::GetLog(), lldb_private::Broadcaster::GetPrimaryListener(), lldb_private::Process::ProcessEventData::GetStateFromEvent(), LLDB_LOG, and lldb_private::Process.
Referenced by WaitForProcessToStop().
|
protected |
Definition at line 1040 of file Process.cpp.
References eBroadcastBitInterrupt, eBroadcastBitStateChanged, lldb::eStateInvalid, lldb_private::GetLog(), lldb_private::Process::ProcessEventData::GetStateFromEvent(), LLDB_LOG, m_private_state_broadcaster, m_private_state_listener_sp, lldb_private::Process, and lldb_private::StateAsCString().
Referenced by WaitForProcessStopPrivate().
|
static |
Definition at line 440 of file Process.cpp.
Referenced by lldb_private::Debugger::DefaultEventHandler(), lldb::SBProcess::GetBroadcasterClass(), GetBroadcasterClass(), and lldb::SBProcess::GetBroadcasterClassName().
void Process::GetStatus | ( | Stream & | ostrm | ) |
Definition at line 5769 of file Process.cpp.
References lldb::eStateConnected, lldb::eStateExited, GetExitDescription(), GetExitStatus(), GetID(), GetState(), lldb_private::Stream::Printf(), lldb_private::StateAsCString(), and lldb_private::StateIsStoppedState().
Referenced by CommandObjectProcessStatus::DoExecute(), and CommandObjectThreadList::DoExecute().
|
virtual |
Get any available STDERR.
Calling this method is a valid operation only if all of the following conditions are true: 1) The process was launched, and not attached to. 2) The process was not launched with eLaunchFlagDisableSTDIO. 3) The process was launched without supplying a valid file path for STDERR.
Note that the implementation will probably need to start a read thread in the background to make sure that the pipe is drained and the STDERR buffered appropriately, to prevent the process from deadlocking trying to write to a full buffer.
Events will be queued indicating that there is STDERR available that can be retrieved using this function.
[in] | buf | A buffer that will receive any STDERR bytes that are currently available. |
[out] | buf_size | The size in bytes for the buffer buf. |
Reimplemented in lldb_private::ProcessWindows.
Definition at line 4579 of file Process.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_stderr_data, m_stdio_communication_mutex, and lldb_private::Process.
Referenced by lldb_private::Debugger::FlushProcessOutput().
|
virtual |
Get any available STDOUT.
Calling this method is a valid operation only if all of the following conditions are true: 1) The process was launched, and not attached to. 2) The process was not launched with eLaunchFlagDisableSTDIO. 3) The process was launched without supplying a valid file path for STDOUT.
Note that the implementation will probably need to start a read thread in the background to make sure that the pipe is drained and the STDOUT buffered appropriately, to prevent the process from deadlocking trying to write to a full buffer.
Events will be queued indicating that there is STDOUT available that can be retrieved using this function.
[out] | buf | A buffer that will receive any STDOUT bytes that are currently available. |
[in] | buf_size | The size in bytes for the buffer buf. |
Reimplemented in lldb_private::ProcessWindows.
Definition at line 4560 of file Process.cpp.
References lldb_private::GetLog(), LLDB_LOGF, m_stdio_communication_mutex, m_stdout_data, and lldb_private::Process.
Referenced by lldb_private::Debugger::FlushProcessOutput().
|
inline |
Definition at line 1502 of file Process.h.
References lldb_private::ProcessModID::GetStopEventForStopID(), and m_mod_id.
|
inline |
Definition at line 1490 of file Process.h.
References lldb_private::ProcessModID::GetStopID(), and m_mod_id.
Referenced by DynamicLoaderMacOS::AddBinaries(), lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfosAddress(), DynamicLoaderMacOS::DoInitialImageFetch(), lldb_private::process_gdb_remote::ProcessGDBRemote::HandleStopReply(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageAtFileAddress(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingFileAddress(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderDarwinKernel::ParseKextSummaries(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), lldb_private::Trace::RefreshLiveProcessState(), DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), lldb_private::DynamicLoaderDarwin::UnloadAllImages(), lldb_private::DynamicLoaderDarwin::UnloadImages(), lldb_private::DynamicLoaderDarwin::UpdateImageLoadAddress(), lldb_private::ObjCLanguageRuntime::UpdateISAToDescriptorMap(), lldb_private::AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded(), lldb_private::AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded(), UpdateThreadListIfNeeded(), and lldb_private::ThreadList::WillResume().
StructuredDataPluginSP Process::GetStructuredDataPlugin | ( | llvm::StringRef | type_name | ) | const |
Returns the StructuredDataPlugin associated with a given type name, if there is one.
There will only be a plugin for a given StructuredDataType if the debugged process monitor claims that the feature is supported. This is one way to tell whether a feature is available.
Definition at line 4527 of file Process.cpp.
References m_structured_data_plugin_map.
|
inlinevirtual |
Get the system architecture for this process.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ProcessWindows.
Definition at line 755 of file Process.h.
Referenced by CompleteAttach(), lldb_private::Platform::GetRemoteSharedModule(), and CommandObjectProcessLoad::CommandOptions::SetOptionValue().
|
virtual |
Get the system runtime plug-in for this process.
Reimplemented in lldb_private::ProcessTrace, and lldb_private::minidump::ProcessMinidump.
Definition at line 2870 of file Process.cpp.
References lldb_private::SystemRuntime::FindPlugin(), and m_system_runtime_up.
Referenced by CompleteAttach(), lldb::SBThread::GetExtendedBacktraceThread(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetExtendedInfoForThread(), LoadCore(), ModulesDidLoad(), and lldb_private::Thread::SafeToCallFunctions().
|
inline |
Get the target object pointer for this module.
Definition at line 1285 of file Process.h.
References m_target_wp.
Referenced by lldb_private::StructuredDataDarwinLog::AddInitCompletionHook(), lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), AdvanceAddressToNextBranchInstruction(), lldb_private::AppleObjCDeclVendor::AppleObjCDeclVendor(), lldb_private::AppleObjCRuntime::AppleObjCRuntime(), lldb_private::AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(), Attach(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AvoidGPackets(), SystemRuntimeMacOSX::BacktraceRecordingHeadersInitialized(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), BuildModulesSection(), BuildProcessSection(), BuildThreadsSection(), CalculateExecutionContext(), lldb_private::AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing(), CallVoidArgVoidPtrReturn(), DynamicLoaderMacOS::CanLoadImage(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(), lldb_private::ThreadPlanStepThrough::ClearBackstopBreakpoint(), DynamicLoaderMacOS::ClearDYLDHandoverBreakpoint(), DynamicLoaderMacOS::ClearNotificationBreakpoint(), DynamicLoaderMacOSXDYLD::ClearNotificationBreakpoint(), CompleteAttach(), DynamicLoaderPOSIXDYLD::ComputeLoadOffset(), lldb_private::process_gdb_remote::ProcessGDBRemote::ConnectToDebugserver(), lldb_private::CPPLanguageRuntime::CPPLanguageRuntime(), CreateBreakpointSite(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionBreakpoint(), lldb_private::LanguageRuntime::CreateExceptionSearchFilter(), lldb_private::ItaniumABILanguageRuntime::CreateExceptionSearchFilter(), lldb_private::AppleObjCRuntime::CreateExceptionSearchFilter(), 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(), lldb_private::trace_intel_pt::TraceIntelPT::CreateInstanceForLiveProcess(), ThreadFreeBSDKernel::CreateRegisterContextForFrame(), lldb_private::AppleObjCRuntimeV2::SharedCacheImageHeaders::CreateSharedCacheImageHeaders(), DynamicLoaderHexagonDYLD::DidAttach(), DynamicLoaderPOSIXDYLD::DidAttach(), lldb_private::DynamicLoaderWindowsDYLD::DidAttach(), JITLoaderGDB::DidAttach(), DidExec(), DynamicLoaderPOSIXDYLD::DidLaunch(), lldb_private::DynamicLoaderWindowsDYLD::DidLaunch(), JITLoaderGDB::DidLaunch(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), DynamicLoaderMacOS::DoClear(), DynamicLoaderMacOSXDYLD::DoClear(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoDestroy(), DoesProcessHaveSharedCache(), CommandObjectMemoryFind::DoExecute(), CommandObjectMemoryWrite::DoExecute(), CommandObjectProcessLoad::DoExecute(), CommandObjectProcessUnload::DoExecute(), CommandObjectProcessStatus::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), ProcessElfCore::DoLoadCore(), ProcessMachCore::DoLoadCore(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), lldb_private::ScriptedProcess::DoLoadCore(), PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), lldb_private::ProcessTrace::DoReadMemory(), ProcessFreeBSDKernel::DoUpdateThreadList(), lldb_private::ThreadPlanStepOverRange::DoWillResume(), DynamicLoaderDarwinKernel::DynamicLoaderDarwinKernel(), lldb_private::process_gdb_remote::ProcessGDBRemote::EnableWatchpoint(), DynamicLoaderPOSIXDYLD::EntryBreakpointHit(), lldb_private::process_gdb_remote::ProcessGDBRemote::EstablishConnectionIfNeeded(), lldb_private::ExecutionContext::ExecutionContext(), lldb_private::PlatformDarwin::ExtractCrashInfoAnnotations(), ExtractRuntimeGlobalSymbol(), FindInMemory(), DynamicLoaderFreeBSDKernel::FindKernelAtLoadAddress(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), HexagonDYLDRendezvous::FindMetadata(), DYLDRendezvous::FindMetadata(), lldb_private::DynamicLoader::FindModuleViaTarget(), FindRangesInMemory(), ProcessFreeBSDKernel::FindSymbol(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::FormatEntity::Format(), GetABI(), GetAddressByteSize(), lldb_private::ProcessTrace::GetArchitecture(), ProcessElfCore::GetArchitecture(), lldb_private::ScriptedProcess::GetArchitecture(), lldb_private::AppleObjCRuntimeV2::GetByteOffsetForIvar(), GetByteOrder(), lldb_private::AppleObjCRuntimeV2::GetCFBooleanValuesIfNeeded(), lldb_private::ThreadPlanAssemblyTracer::GetDisassembler(), DynamicLoaderMacOS::GetDyldLockVariableAddressFromModule(), lldb_private::ScriptedThread::GetDynamicRegisterInfo(), lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), DynamicLoaderHexagonDYLD::GetEntryPoint(), DynamicLoaderPOSIXDYLD::GetEntryPoint(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), lldb_private::AppleObjCRuntime::GetFoundationVersion(), lldb_private::RegisterContextUnwind::GetFullUnwindPlanForFrame(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(), ProcessElfCore::GetImageInfoAddress(), lldb_private::ProcessWindows::GetImageInfoAddress(), lldb_private::AppleObjCRuntimeV1::GetISAHashTablePointer(), lldb_private::AppleObjCRuntimeV2::GetISAHashTablePointer(), lldb_private::platform_android::PlatformAndroid::GetLibdlFunctionDeclarations(), lldb_private::ScriptedProcess::GetLoadedDynamicLibrariesInfos(), GetLoadImageUtilityFunction(), GetMemoryTagManager(), DynamicLoaderMacOS::GetNotificationFuncAddrFromImageInfos(), lldb_private::AppleObjCRuntime::GetObjCModule(), lldb_private::AppleObjCRuntime::GetObjCVersion(), lldb_private::minidump::ProcessMinidump::GetOrCreateModule(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetPluginCommandObject(), ProcessKDP::GetPluginCommandObject(), lldb_private::minidump::ProcessMinidump::GetPluginCommandObject(), lldb_private::AppleObjCRuntime::GetPrintForDebuggerAddr(), ProcessElfCore::GetProcessInfo(), GetProcessInfo(), lldb_private::ProcessTrace::GetProcessInfo(), lldb_private::minidump::ProcessMinidump::GetProcessInfo(), lldb_private::ScriptedProcess::GetProcessInfo(), lldb_private::DynamicLoaderDarwin::GetPThreadLibraryModule(), lldb_private::ScriptedThreadPlan::GetScriptInterpreter(), lldb_private::AppleObjCRuntimeV2::GetSharedCacheReadOnlyAddress(), GetSoftwareBreakpointTrapOpcode(), lldb_private::DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan(), JITLoaderGDB::GetSymbolAddress(), lldb_private::AppleObjCRuntimeV2::GetTaggedPointerObfuscator(), lldb_private::ThreadPlan::GetTarget(), lldb_private::DynamicLoader::GetTargetExecutable(), DynamicLoaderHexagonDYLD::GetTargetExecutable(), lldb_private::Runtime::GetTargetRef(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::ItaniumABILanguageRuntime::GetTypeInfo(), lldb_private::Value::GetValueAsData(), lldb::SBFrame::GetVariables(), lldb_private::ItaniumABILanguageRuntime::GetVTableInfo(), GetWatchpointReportedAfter(), lldb_private::GNUstepObjCRuntime::GNUstepObjCRuntime(), lldb_private::StructuredDataDarwinLog::HandleArrivalOfStructuredData(), HandlePrivateEvent(), HexagonDYLDRendezvous::HexagonDYLDRendezvous(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), DynamicLoaderMacOSXDYLD::InitializeFromAllImageInfos(), lldb_private::RegisterContextUnwind::InitializeNonZerothFrame(), lldb_private::RegisterContextUnwind::InitializeZerothFrame(), lldb_private::RegisterContextUnwind::IsTrapHandlerSymbol(), lldb_private::process_gdb_remote::ProcessGDBRemote::LaunchAndConnectToDebugserver(), LaunchPrivate(), DynamicLoaderHexagonDYLD::LoadAllCurrentModules(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), lldb_private::DynamicLoader::LoadBinaryWithUUIDAndAddress(), ObjectFileMachO::LoadCoreFileImages(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageAtFileAddress(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingFileAddress(), DynamicLoaderFreeBSDKernel::KModImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), DynamicLoaderFreeBSDKernel::LoadKernelModules(), DynamicLoaderPOSIXDYLD::LoadModuleAtAddress(), lldb_private::wasm::DynamicLoaderWasmDYLD::LoadModuleAtAddress(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules(), lldb_private::process_gdb_remote::ProcessGDBRemote::LoadStubBinaries(), DynamicLoaderPOSIXDYLD::LoadVDSO(), lldb_private::ThreadPlanAssemblyTracer::Log(), lldb_private::ObjCLanguageRuntime::LookupInCompleteClassCache(), PlatformPOSIX::MakeLoadImageUtilityFunction(), lldb_private::process_gdb_remote::ProcessGDBRemote::MaybeLoadExecutableModule(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderMacOSXDYLD::NotifyBreakpointHit(), lldb_private::ProcessWindows::OnDebuggerConnected(), lldb_private::DynamicLoaderWindowsDYLD::OnLoadModule(), lldb_private::DynamicLoaderWindowsDYLD::OnUnloadModule(), DynamicLoaderDarwinKernel::ParseKextSummaries(), DynamicLoaderFreeBSDKernel::ParseKmods(), lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition(), lldb_private::StopInfoBreakpoint::PerformAction(), PopProcessIOHandler(), SystemRuntimeMacOSX::PopulatePendingItemsForQueue(), PrintWarningOptimization(), PrintWarningUnsupportedLanguage(), lldb_private::DynamicLoaderDarwin::PrivateInitialize(), DynamicLoaderPOSIXDYLD::ProbeEntry(), ProcessIOHandlerIsActive(), lldb_private::RegisterContextUnwind::PropagateTrapHandlerFlagFromUnwindPlan(), PushProcessIOHandler(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), DynamicLoaderFreeBSDKernel::ReadAllKmods(), DynamicLoaderMacOSXDYLD::ReadDYLDInfoFromMemoryAndSetNotificationCallback(), JITLoaderGDB::ReadJITDescriptor(), JITLoaderGDB::ReadJITDescriptorImpl(), ReadJITEntry(), DynamicLoaderDarwinKernel::ReadKextSummaries(), DynamicLoaderDarwinKernel::ReadKextSummaryHeader(), DynamicLoaderFreeBSDKernel::ReadKmodsListHeader(), SystemRuntimeMacOSX::ReadLibdispatchOffsetsAddress(), SystemRuntimeMacOSX::ReadLibdispatchTSDIndexes(), SystemRuntimeMacOSX::ReadLibdispatchTSDIndexesAddress(), SystemRuntimeMacOSX::ReadLibpthreadOffsetsAddress(), DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::ReadMemoryModule(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), DYLDRendezvous::ReadSOEntryFromMemory(), lldb_private::AbortWithPayloadFrameRecognizer::RecognizeFrame(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::ReconfigureRegisterInfo(), DynamicLoaderHexagonDYLD::RefreshModules(), DynamicLoaderPOSIXDYLD::RefreshModules(), lldb_private::ProcessWindows::RefreshStateAfterStop(), lldb_private::AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines(), lldb_private::RegisterAbortWithPayloadFrameRecognizer(), lldb_private::RegisterAssertFrameRecognizer(), RegisterObjCExceptionRecognizer(), lldb_private::RegisterVerboseTrapFrameRecognizer(), lldb_private::process_gdb_remote::GDBRemoteRegisterContext::RegisterWriteCausesReconfigure(), DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress(), DynamicLoaderPOSIXDYLD::ResolveExecutableModule(), ResolveIndirectFunction(), DYLDRendezvous::ResolveRendezvousAddress(), lldb::SBThread::ResumeNewPlan(), lldb_private::process_gdb_remote::ProcessGDBRemote::SaveCore(), DynamicLoaderDarwinKernel::SearchForKernelAtSameLoadAddr(), DynamicLoaderDarwinKernel::SearchForKernelNearPC(), DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups(), DynamicLoaderMacOS::SetDYLDHandoverBreakpoint(), lldb_private::AppleObjCRuntime::SetExceptionBreakpoints(), JITLoaderGDB::SetJITBreakpoint(), lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint(), DynamicLoaderMacOS::SetNotificationBreakpoint(), DynamicLoaderMacOSXDYLD::SetNotificationBreakpoint(), DynamicLoaderDarwinKernel::SetNotificationBreakpointIfNeeded(), SetPrivateState(), SetPublicState(), DynamicLoaderHexagonDYLD::SetRendezvousBreakpoint(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo(), DYLDRendezvous::SOEntryIsMainExecutable(), lldb_private::process_gdb_remote::ProcessGDBRemote::StartNoticingNewThreads(), lldb_private::ThreadPlanStepOut::ThreadPlanStepOut(), lldb_private::ThreadPlanStepThrough::ThreadPlanStepThrough(), lldb_private::DynamicLoaderDarwin::UnloadAllImages(), lldb_private::DynamicLoaderDarwin::UnloadImages(), lldb_private::DynamicLoaderDarwin::UnloadModuleSections(), DynamicLoaderHexagonDYLD::UnloadSections(), lldb_private::DynamicLoader::UnloadSectionsCommon(), DYLDRendezvous::UpdateBaseAddrIfNecessary(), lldb_private::DynamicLoaderDarwin::UpdateDYLDImageInfoFromNewImageInfo(), DYLDRendezvous::UpdateExecutablePath(), DynamicLoaderMacOSXDYLD::UpdateImageInfosHeaderAndLoadCommands(), lldb_private::DynamicLoaderDarwin::UpdateImageLoadAddress(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap(), lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap(), DynamicLoaderHexagonDYLD::UpdateLoadedSections(), lldb_private::DynamicLoader::UpdateLoadedSectionsCommon(), lldb_private::DynamicLoaderDarwin::UpdateSpecialBinariesFromNewImageInfos(), UpdateThreadListIfNeeded(), lldb_private::DynamicLoaderDarwin::UseDYLDSPI(), lldb_private::AppleObjCRuntimeV2::WarnIfNoExpandedSharedCache(), lldb_private::FunctionCaller::WriteFunctionWrapper(), DynamicLoaderHexagonDYLD::~DynamicLoaderHexagonDYLD(), DynamicLoaderMacOS::~DynamicLoaderMacOS(), DynamicLoaderMacOSXDYLD::~DynamicLoaderMacOSXDYLD(), DynamicLoaderPOSIXDYLD::~DynamicLoaderPOSIXDYLD(), and JITLoaderGDB::~JITLoaderGDB().
|
inline |
Get the const target object pointer for this module.
Definition at line 1292 of file Process.h.
References m_target_wp.
|
inline |
Definition at line 2227 of file Process.h.
References m_thread_list.
Referenced by lldb_private::CommandObjectIterateOverThreads::BucketThread(), CallVoidArgVoidPtrReturn(), SystemRuntimeMacOSX::CompleteQueueItem(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), CommandObjectThreadPlanPrune::DoExecute(), CommandObjectProcessContinue::DoExecute(), CommandObjectTargetModulesShowUnwind::DoExecute(), CommandObjectThreadStepWithTypeAndScope::DoExecute(), CommandObjectThreadContinue::DoExecute(), CommandObjectThreadUntil::DoExecute(), CommandObjectThreadSelect::DoExecute(), lldb_private::CommandObjectIterateOverThreads::DoExecute(), lldb_private::CommandObjectMultipleThreads::DoExecute(), lldb_private::ctf::CommandObjectThreadTraceExportCTF::DoExecute(), PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), lldb_private::trace_intel_pt::TraceIntelPT::DoRefreshLiveProcessState(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoResume(), lldb_private::ThreadPlanStackMap::DumpPlans(), lldb_private::ThreadPlanStackMap::DumpPlansForTID(), PlatformPOSIX::EvaluateLibdlExpression(), lldb_private::PlatformWindows::EvaluateLoaderExpression(), lldb_private::CommandObject::GetDefaultThread(), SystemRuntimeMacOSX::GetExtendedBacktraceFromItemRef(), SystemRuntimeMacOSX::GetExtendedBacktraceThread(), lldb_private::AppleObjCRuntime::GetObjectDescription(), SystemRuntimeMacOSX::GetPendingItemRefsForQueue(), GetSingleThreadFromArgs(), lldb_private::Thread::GetStatus(), lldb_private::ThreadPlan::GetThread(), lldb_private::ThreadPlanTracer::GetThread(), GetThreadStatus(), CommandObjectThreadBacktrace::HandleOneThread(), CommandObjectThreadInfo::HandleOneThread(), CommandObjectThreadException::HandleOneThread(), CommandObjectThreadSiginfo::HandleOneThread(), CommandObjectTraceDumpInfo::HandleOneThread(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), lldb_private::trace_intel_pt::TraceIntelPTBundleLoader::ParseThread(), lldb_private::Process::AttachCompletionHandler::PerformAction(), SystemRuntimeMacOSX::PopulateQueueList(), DynamicLoaderMacOS::ProcessDidExec(), DynamicLoaderMacOSXDYLD::ProcessDidExec(), lldb_private::ThreadPlanStackMap::PrunePlansForTID(), PruneThreadPlans(), lldb::SBThread::ResumeNewPlan(), RunThreadPlan(), SaveOffRegionsWithStackPointers(), DynamicLoaderDarwinKernel::SearchForKernelNearPC(), lldb_private::Thread::StepIn(), lldb_private::Thread::StepOut(), lldb_private::Thread::StepOver(), lldb_private::CommandCompletions::ThreadIDs(), lldb_private::CommandCompletions::ThreadIndexes(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap(), and lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap().
size_t Process::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 | ||
) |
Definition at line 5789 of file Process.cpp.
References lldb_private::GetLog(), lldb_private::ThreadList::GetSize(), lldb_private::ThreadList::GetThreadAtIndex(), GetThreadList(), LLDB_LOGF, and lldb_private::Process.
Referenced by CommandObjectProcessStatus::DoExecute(), and CommandObjectThreadList::DoExecute().
|
inline |
Definition at line 547 of file Process.h.
References m_process_unique_id.
Referenced by lldb_private::StructuredDataDarwinLog::AddInitCompletionHook(), and lldb_private::StructuredDataDarwinLog::ModulesDidLoad().
const lldb::UnixSignalsSP & Process::GetUnixSignals | ( | ) |
Definition at line 3591 of file Process.cpp.
References m_unix_signals_sp.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread(), CommandObjectProcessSignal::DoExecute(), ProcessElfCore::DoLoadCore(), CommandObjectProcessSignal::HandleArgumentCompletion(), and lldb_private::process_gdb_remote::ThreadGDBRemote::WillResume().
bool Process::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.
The default behavior is "exceptions received after instruction has executed", except for certain CPU architectures. Process subclasses may override this if they have additional information.
Definition at line 2528 of file Process.cpp.
References DoGetWatchpointReportedAfter(), lldb_private::Target::GetArchitecture(), GetTarget(), lldb_private::ArchSpec::GetTriple(), and lldb_private::ArchSpec::IsValid().
|
inline |
Definition at line 2230 of file Process.h.
References m_watchpoint_resource_list.
|
inlinevirtual |
Get the number of watchpoints supported by this target.
We may be able to determine the number of watchpoints available on this target; retrieve this value if possible.
This number may be less than the number of watchpoints a user can specify. This is because a single user watchpoint may require multiple watchpoint slots to implement. Due to the size and/or alignment of objects.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ProcessWindows.
Status Process::Halt | ( | bool | clear_thread_plans = false , |
bool | use_run_lock = true |
||
) |
Halts a running process.
This function is not meant to be overridden by Process subclasses. If the process is successfully halted, a eStateStopped process event with GetInterrupted will be broadcast. If false, we will halt the process with no events generated by the halt.
[in] | clear_thread_plans | If true, when the process stops, clear all thread plans. |
[in] | use_run_lock | Whether to release the run lock after the stop. |
Definition at line 3318 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), Destroy(), DoNoSelectMostRelevantFrame, lldb::eStateAttaching, lldb::eStateInvalid, lldb_private::ProcessProperties::GetInterruptTimeout(), GetState(), lldb_private::ThreadSafeValue< T >::GetValue(), HijackProcessEvents(), m_clear_thread_plans_on_stop, m_public_state, lldb_private::Listener::MakeListener(), RestoreProcessEvents(), SelectMostRelevantFrame, SendAsyncInterrupt(), SetExitStatus(), SIGKILL, lldb_private::StateAsCString(), lldb_private::StateIsRunningState(), and WaitForProcessToStop().
Referenced by CommandObjectProcessInterrupt::DoExecute(), lldb_private::CommandInterpreter::IOHandlerInterrupt(), and RunThreadPlan().
|
protected |
Definition at line 4001 of file Process.cpp.
References DidHalt(), DoHalt(), error(), and WillHalt().
Referenced by RunPrivateStateThread().
|
protected |
Definition at line 3890 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), lldb_private::eBroadcastAlways, eBroadcastBitStateChanged, lldb_private::Process::NextEventAction::eEventActionExit, lldb_private::Process::NextEventAction::eEventActionRetry, lldb_private::Process::NextEventAction::eEventActionSuccess, lldb::eStateAttaching, lldb::eStateExited, lldb::eStateLaunching, GetID(), lldb_private::GetLog(), lldb_private::Process::ProcessEventData::GetRestartedFromEvent(), GetState(), lldb_private::Process::ProcessEventData::GetStateFromEvent(), GetTarget(), lldb_private::Predicate< T >::GetValue(), lldb_private::Broadcaster::IsHijackedForEvent(), LLDB_LOGF, m_iohandler_sync, m_next_event_action_up, m_resume_requested, PopProcessIOHandler(), lldb_private::Process, PushProcessIOHandler(), SetExitStatus(), SetNextEventAction(), lldb_private::Process::ProcessEventData::SetUpdateStateOnRemoval(), lldb_private::Predicate< T >::SetValue(), ShouldBroadcastEvent(), lldb_private::StateAsCString(), lldb_private::StateIsRunningState(), and lldb_private::StateIsStoppedState().
Referenced by ConnectRemote(), Launch(), RunPrivateStateThread(), and WaitForProcessStopPrivate().
|
static |
Centralize the code that handles and prints descriptions for process state changes.
[in] | event_sp | The process state changed event |
[in] | stream | The output stream to get the state change description |
[in,out] | pop_process_io_handler | If this value comes in set to true, then pop the Process IOHandler if needed. Else this variable will be set to true or false to indicate if the process needs to have its process IOHandler popped. |
Definition at line 752 of file Process.cpp.
References lldb::eDescriptionLevelBrief, lldb_private::ValueObject::eGetExpressionPathFormatHonorPointers, lldb::eStateAttaching, lldb::eStateConnected, lldb::eStateCrashed, lldb::eStateDetached, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateLaunching, lldb::eStateRunning, lldb::eStateStepping, lldb::eStateStopped, lldb::eStateSuspended, lldb::eStateUnloaded, lldb::eStopReasonBreakpoint, lldb::eStopReasonException, lldb::eStopReasonExec, lldb::eStopReasonFork, lldb::eStopReasonInstrumentation, lldb::eStopReasonInterrupt, lldb::eStopReasonInvalid, lldb::eStopReasonNone, lldb::eStopReasonPlanComplete, lldb::eStopReasonProcessorTrace, lldb::eStopReasonSignal, lldb::eStopReasonThreadExiting, lldb::eStopReasonTrace, lldb::eStopReasonVFork, lldb::eStopReasonVForkDone, lldb::eStopReasonWatchpoint, lldb_private::StopInfo::GetCrashingDereference(), lldb_private::TargetList::GetIndexOfTarget(), lldb_private::ThreadList::GetMutex(), lldb_private::Process::ProcessEventData::GetNumRestartedReasons(), lldb_private::Process::ProcessEventData::GetProcessFromEvent(), lldb_private::Process::ProcessEventData::GetRestartedFromEvent(), lldb_private::Process::ProcessEventData::GetRestartedReasonAtIndex(), lldb_private::TargetList::GetSelectedTarget(), lldb_private::ThreadList::GetSelectedThread(), lldb_private::ThreadList::GetSize(), lldb_private::Process::ProcessEventData::GetStateFromEvent(), lldb_private::Debugger::GetTargetList(), lldb_private::ThreadList::GetThreadAtIndex(), lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), lldb_private::ThreadList::SetSelectedThreadByID(), lldb_private::StateAsCString(), and UINT32_MAX.
Referenced by lldb_private::Platform::DoConnectProcess(), lldb_private::Debugger::HandleProcessEvent(), and WaitForProcessToStop().
|
inlineprotectedvirtual |
Handle thread specific async interrupt and return the original thread that requested the async interrupt.
It can be null if original thread has exited.
[in] | description | Returns the stop reason description of the async interrupt. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
bool Process::HasAssignedIndexIDToThread | ( | uint64_t | sb_thread_id | ) |
Definition at line 1316 of file Process.cpp.
References m_thread_id_to_index_id_map.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::HarmonizeThreadIdsForProfileData().
bool Process::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.
Then you will have to wait on that listener explicitly for events (rather than using the GetNextEvent & WaitFor* calls above. Be sure to call RestoreProcessEvents when you are done.
[in] | listener_sp | This is the new listener to whom all process events will be delivered. |
Definition at line 986 of file Process.cpp.
References eBroadcastBitInterrupt, eBroadcastBitStateChanged, and lldb_private::Broadcaster::HijackBroadcaster().
Referenced by lldb_private::ProcessTrace::DidAttach(), Halt(), LaunchPrivate(), LoadCore(), lldb_private::Process::ProcessEventHijacker::ProcessEventHijacker(), ResumeSynchronous(), and StopForDestroyOrDetach().
|
virtual |
Check if a process is still alive.
Reimplemented in ProcessElfCore, lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessMachCore, ProcessKDP, lldb_private::minidump::ProcessMinidump, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
Definition at line 1127 of file Process.cpp.
References lldb::eStateAttaching, lldb::eStateConnected, lldb::eStateCrashed, lldb::eStateLaunching, lldb::eStateRunning, lldb::eStateStepping, lldb::eStateStopped, lldb::eStateSuspended, lldb_private::ThreadSafeValue< T >::GetValue(), and m_private_state.
Referenced by DynamicLoaderDarwinKernel::Clear(), SystemRuntimeMacOSX::Clear(), lldb_private::AllocatedMemoryCache::Clear(), CreateBreakpointSite(), lldb_private::AppleGetItemInfoHandler::Detach(), lldb_private::AppleGetPendingItemsHandler::Detach(), lldb_private::AppleGetQueuesHandler::Detach(), lldb_private::AppleGetThreadItemInfoHandler::Detach(), CommandObjectProcessConnect::DoExecute(), lldb_private::ValueObjectVariable::DoUpdateChildrenAddressType(), lldb_private::Value::GetValueAsData(), lldb_private::process_gdb_remote::ProcessGDBRemote::IsAlive(), ProcessKDP::IsAlive(), JITLoaderGDB::ModulesDidLoad(), lldb_private::DynamicLoaderDarwin::PrivateProcessStateChanged(), RemoveConstituentFromBreakpointSite(), lldb_private::TargetList::SignalIfRunning(), CommandObjectProcessLaunchOrAttach::StopProcessIfNecessary(), and lldb_private::ValueObjectVariable::UpdateValue().
|
inlinevirtual |
Reimplemented in lldb_private::PostMortemProcess.
Definition at line 1533 of file Process.h.
Referenced by lldb_private::Trace::FindPluginForLiveProcess(), DYLDRendezvous::IsCoreFile(), DynamicLoaderPOSIXDYLD::IsCoreFile(), ReadModuleFromMemory(), and TraceSupported().
bool Process::IsPossibleDynamicValue | ( | ValueObject & | in_value | ) |
Definition at line 1585 of file Process.cpp.
References lldb_private::LanguageRuntime::CouldHaveDynamicValue(), lldb::eLanguageTypeC, lldb::eLanguageTypeUnknown, GetLanguageRuntime(), GetLanguageRuntimes(), lldb_private::ValueObject::GetObjectRuntimeLanguage(), lldb_private::ValueObject::IsDynamic(), and m_finalizing.
Referenced by lldb_private::ValueObject::CalculateDynamicValue(), lldb_private::ValueObjectConstResult::GetDynamicValue(), and lldb_private::ValueObject::IsPossibleDynamicType().
bool Process::IsRunning | ( | ) | const |
Definition at line 1071 of file Process.cpp.
References lldb_private::ThreadSafeValue< T >::GetValue(), m_public_state, and lldb_private::StateIsRunningState().
|
inline |
Return whether this object is valid (i.e.
has not been finalized.)
Definition at line 575 of file Process.h.
References m_finalizing.
Referenced by lldb_private::ScriptedThread::Create(), and lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote().
|
virtual |
Launch a new process.
Launch a new process by spawning a new process using the target object's executable module's file as the file to launch.
This function is not meant to be overridden by Process subclasses. It will first call Process::WillLaunch (Module *) and if that returns true, Process::DoLaunch (Module*, char const *[],char const *[],const char *,const char *, const char *) will be called to actually do the launching. If DoLaunch returns true, then Process::DidLaunch() will be called.
[in] | launch_info | Details regarding the environment, STDIN/STDOUT/STDERR redirection, working path, etc. related to the requested launch. |
Definition at line 2632 of file Process.cpp.
References lldb::eStateCrashed, lldb::eStateInvalid, lldb::eStateStopped, lldb_private::Status::Fail(), lldb_private::ProcessLaunchInfo::GetFlags(), HandlePrivateEvent(), LaunchPrivate(), PrivateStateThreadIsValid(), ResumePrivateStateThread(), SetPublicState(), StartPrivateStateThread(), and lldb_private::Flags::Test().
|
private |
Definition at line 2664 of file Process.cpp.
References DoLaunch(), error(), lldb::eStateLaunching, lldb_private::ProcessInfo::GetExecutableFile(), lldb_private::Target::GetExecutableModulePointer(), lldb_private::Module::GetFileSpec(), lldb_private::FileSpec::GetPath(), GetTarget(), HijackProcessEvents(), lldb_private::Target::Install(), lldb_private::FileSystem::Instance(), lldb_private::ProcessInfo::IsScriptedProcess(), m_abi_sp, m_dyld_up, m_jit_loaders_up, m_os_up, m_process_input_reader, m_process_input_reader_mutex, m_public_run_lock, m_should_detach, m_system_runtime_up, lldb_private::Listener::MakeListener(), PausePrivateStateThread(), PrivateStateThreadIsValid(), RestoreProcessEvents(), SetPublicState(), lldb_private::ProcessRunLock::TrySetRunning(), and WillLaunch().
Referenced by Launch().
|
virtual |
Definition at line 2799 of file Process.cpp.
References lldb_private::JITLoaderList::DidAttach(), lldb_private::SystemRuntime::DidAttach(), lldb_private::DynamicLoader::DidAttach(), DoLoadCore(), error(), lldb::eStateStopped, GetDynamicLoader(), GetJITLoaders(), lldb_private::GetLog(), GetSystemRuntime(), HijackProcessEvents(), LLDB_LOGF, LoadOperatingSystemPlugin(), m_os_up, lldb_private::Listener::MakeListener(), PrivateStateThreadIsValid(), lldb_private::Process, RestoreProcessEvents(), ResumePrivateStateThread(), SelectMostRelevantFrame, SetPrivateState(), StartPrivateStateThread(), lldb_private::StateAsCString(), lldb_private::StateIsStoppedState(), and WaitForProcessToStop().
|
inlinevirtual |
Sometimes processes know how to retrieve and load shared libraries.
This is normally done by DynamicLoader plug-ins, but sometimes the connection to the process allows retrieving this information. The dynamic loader plug-ins can use this function if they can't determine the current shared library load state.
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 692 of file Process.h.
Referenced by lldb_private::wasm::DynamicLoaderWasmDYLD::DidAttach(), lldb_private::DynamicLoaderWindowsDYLD::DidAttach(), and lldb_private::DynamicLoaderWindowsDYLD::DidLaunch().
|
protected |
Definition at line 2623 of file Process.cpp.
References lldb_private::ThreadList::Clear(), lldb_private::OperatingSystem::FindPlugin(), Flush(), m_os_up, m_thread_list, and m_thread_mutex.
Referenced by CompleteAttach(), LoadCore(), lldb_private::DynamicLoader::LoadOperatingSystemPlugin(), ModulesDidLoad(), and lldb_private::ProcessProperties::ProcessProperties().
|
protected |
Loads any plugins associated with asynchronous structured data and maps the relevant supported type name to the plugin.
Processes can receive asynchronous structured data from the process monitor. This method will load and map any structured data plugins that support the given set of supported type names. Later, if any of these features are enabled, the process monitor is free to generate asynchronous structured data. The data must come in as a single StructuredData::Dictionary. That dictionary must have a string field named 'type', with a value that equals the relevant type name string (one of the values in supported_type_names).
[in] | supported_type_names | An array of zero or more type names. Each must be unique. For each entry in the list, a StructuredDataPlugin will be searched for that supports the structured data type name. |
Definition at line 6255 of file Process.cpp.
References lldb_private::StructuredData::Array::ForEach(), lldb_private::GetLog(), lldb_private::StructuredData::Array::GetSize(), lldb_private::PluginManager::GetStructuredDataPluginCreateCallbackAtIndex(), LLDB_LOG, m_structured_data_plugin_map, and lldb_private::Process.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach().
|
virtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 6036 of file Process.cpp.
References GetJITLoaders(), GetLanguageRuntime(), lldb_private::Language::GetSupportedLanguages(), GetSystemRuntime(), LoadOperatingSystemPlugin(), m_instrumentation_runtimes, m_os_up, m_structured_data_plugin_map, lldb_private::SystemRuntime::ModulesDidLoad(), lldb_private::InstrumentationRuntime::ModulesDidLoad(), and lldb_private::JITLoaderList::ModulesDidLoad().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::ModulesDidLoad().
|
protected |
Definition at line 3809 of file Process.cpp.
References ControlPrivateStateThread(), and eBroadcastInternalStateControlPause.
Referenced by LaunchPrivate().
Event * Process::PeekAtStateChangedEvents | ( | ) |
Definition at line 1020 of file Process.cpp.
References eBroadcastBitStateChanged, lldb_private::GetLog(), lldb_private::Broadcaster::GetPrimaryListener(), lldb_private::Process::ProcessEventData::GetStateFromEvent(), LLDB_LOGF, lldb_private::Process, and lldb_private::StateAsCString().
|
protected |
Definition at line 4795 of file Process.cpp.
References lldb_private::Target::GetDebugger(), GetTarget(), m_process_input_reader, m_process_input_reader_mutex, and lldb_private::Debugger::RemoveIOHandler().
Referenced by HandlePrivateEvent().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 2556 of file Process.h.
Referenced by DynamicLoaderPOSIXDYLD::LoadAllCurrentModules().
void Process::PrintWarningOptimization | ( | const SymbolContext & | sc | ) |
Print a user-visible warning about a module being built with optimization.
Prints a async warning message to the user one time per Module where a function is found that was compiled with optimization, per Process.
[in] | sc | A SymbolContext with eSymbolContextFunction and eSymbolContextModule pre-computed. |
Definition at line 6070 of file Process.cpp.
References lldb_private::SymbolContext::function, GetID(), lldb_private::Function::GetIsOptimized(), GetTarget(), lldb_private::ProcessProperties::GetWarningsOptimization(), and lldb_private::SymbolContext::module_sp.
void Process::PrintWarningUnsupportedLanguage | ( | const SymbolContext & | sc | ) |
Print a user-visible warning about a function written in a language that this version of LLDB doesn't support.
Definition at line 6078 of file Process.cpp.
References lldb::eLanguageTypeAssembly, lldb::eLanguageTypeMipsAssembler, lldb::eLanguageTypeUnknown, lldb_private::PluginManager::GetAllTypeSystemSupportedLanguagesForTypes(), GetID(), lldb_private::SymbolContext::GetLanguage(), GetTarget(), lldb_private::ProcessProperties::GetWarningsUnsupportedLanguage(), and lldb_private::SymbolContext::module_sp.
|
protected |
The "private" side of resuming a process.
This doesn't alter the state of m_run_lock, but just causes the process to resume.
Definition at line 3258 of file Process.cpp.
References lldb_private::ProcessModID::BumpResumeID(), DidResume(), lldb_private::ThreadList::DidResume(), DoResume(), error(), lldb::eStateRunning, lldb::eStateStopped, lldb_private::GetLog(), GetModID(), lldb_private::ProcessModID::GetStopID(), lldb_private::ThreadSafeValue< T >::GetValue(), LLDB_LOGF, m_mod_id, m_private_state, m_public_state, m_thread_list, lldb_private::Process, ResetExtendedCrashInfoDict(), RunPreResumeActions(), SetPrivateState(), lldb_private::StateAsCString(), lldb_private::Step, UpdateAutomaticSignalFiltering(), WillResume(), and lldb_private::ThreadList::WillResume().
Referenced by Resume(), ResumeSynchronous(), RunThreadPlan(), and ShouldBroadcastEvent().
|
inlineprotected |
Definition at line 2958 of file Process.h.
References lldb::eStateDetached, lldb::eStateExited, lldb::eStateInvalid, lldb_private::ThreadSafeValue< T >::GetValue(), lldb_private::HostThread::IsJoinable(), m_private_state, and m_private_state_thread.
Referenced by ConnectRemote(), ControlPrivateStateThread(), Launch(), LaunchPrivate(), LoadCore(), SendAsyncInterrupt(), and StartPrivateStateThread().
|
inlineprotected |
Definition at line 3295 of file Process.h.
References m_process_input_reader, and m_process_input_reader_mutex.
Referenced by SyncIOHandler().
|
protected |
Definition at line 4767 of file Process.cpp.
References lldb_private::Target::GetDebugger(), GetTarget(), lldb_private::Debugger::IsTopIOHandler(), m_process_input_reader, and m_process_input_reader_mutex.
void Process::PruneThreadPlans | ( | ) |
Prune ThreadPlanStacks for all unreported threads.
Definition at line 1274 of file Process.cpp.
References GetThreadList(), m_thread_plans, and lldb_private::ThreadPlanStackMap::Update().
Referenced by CommandObjectThreadPlanPrune::DoExecute().
bool Process::PruneThreadPlansForTID | ( | lldb::tid_t | tid | ) |
Prune ThreadPlanStacks for unreported threads.
[in] | tid | The tid whose Plan Stack we are seeking to prune. |
Definition at line 1270 of file Process.cpp.
References m_thread_plans, and lldb_private::ThreadPlanStackMap::PrunePlansForTID().
Referenced by CommandObjectThreadPlanPrune::DoExecute().
|
protected |
Definition at line 4775 of file Process.cpp.
References lldb_private::Target::GetDebugger(), lldb_private::GetLog(), GetTarget(), lldb_private::ProcessModID::IsRunningUtilityFunction(), LLDB_LOGF, m_mod_id, m_process_input_reader, m_process_input_reader_mutex, lldb_private::Process, and lldb_private::Debugger::RunIOHandlerAsync().
Referenced by HandlePrivateEvent().
|
inlinevirtual |
Puts data into this process's STDIN.
Calling this method is a valid operation only if all of the following conditions are true: 1) The process was launched, and not attached to. 2) The process was not launched with eLaunchFlagDisableSTDIO. 3) The process was launched without supplying a valid file path for STDIN.
[in] | buf | A buffer that contains the data to write to the process's STDIN. |
[in] | buf_size | The size in bytes for the buffer buf. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote, and lldb_private::ProcessWindows.
Definition at line 2135 of file Process.h.
References error().
|
inline |
Definition at line 2263 of file Process.h.
References m_queue_list, lldb_private::QueueList::Queues(), and UpdateQueueListIfNeeded().
size_t Process::ReadCStringFromMemory | ( | lldb::addr_t | vm_addr, |
char * | cstr, | ||
size_t | cstr_max_len, | ||
Status & | error | ||
) |
Read a NULL terminated C string from memory.
This function will read a cache page at a time until the NULL C string terminator is found. It will stop reading if the NULL termination byte isn't found before reading cstr_max_len bytes, and the results are always guaranteed to be NULL terminated (at most cstr_max_len - 1 bytes will be read).
Definition at line 2162 of file Process.cpp.
References lldb_private::Status::Clear(), error(), lldb_private::MemoryCache::GetMemoryCacheLineSize(), m_memory_cache, ReadMemory(), and lldb_private::Status::SetErrorString().
Referenced by PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), ProcessFreeBSDKernel::DoUpdateThreadList(), lldb_private::PlatformDarwin::ExtractCrashInfoAnnotations(), lldb_private::AppleObjCRuntime::GetObjectDescription(), SystemRuntimeMacOSX::GetQueueNameFromThreadQAddress(), lldb_private::ClassDescriptorV2::class_ro_t::Read(), lldb_private::ClassDescriptorV2::ivar_t::Read(), lldb_private::ClassDescriptorV2::method_t::Read(), DynamicLoaderFreeBSDKernel::ReadAllKmods(), ReadCStringFromMemory(), DynamicLoaderMacOSXDYLD::ReadImageInfos(), DYLDRendezvous::ReadStringFromMemory(), and lldb_private::AbortWithPayloadFrameRecognizer::RecognizeFrame().
size_t Process::ReadCStringFromMemory | ( | lldb::addr_t | vm_addr, |
std::string & | out_str, | ||
Status & | error | ||
) |
Definition at line 2140 of file Process.cpp.
References error(), and ReadCStringFromMemory().
|
virtual |
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 *).
[in] | vm_addr | A virtual load address that indicates where to start reading memory from. |
[out] | buf | A byte buffer that is at least size bytes long that will receive the memory bytes. |
[in] | size | The number of bytes to read. |
[out] | error | An 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. |
Reimplemented in ProcessElfCore, ProcessMachCore, lldb_private::ProcessTrace, and lldb_private::minidump::ProcessMinidump.
Definition at line 1973 of file Process.cpp.
References error(), GetABI(), lldb_private::ProcessProperties::GetDisableMemoryCache(), m_memory_cache, lldb_private::MemoryCache::Read(), ReadMemoryFromInferior(), and lldb_private::Status::Success().
Referenced by lldb_private::formatters::Foundation1437::__NSArrayMSize_Impl(), lldb_private::formatters::Foundation1437::__NSDictionaryMSize_Impl(), lldb_private::formatters::Foundation1437::__NSSetMSize_Impl(), SystemRuntimeMacOSX::CompleteQueueItem(), lldb_private::AppleObjCRuntimeV2::SharedCacheImageHeaders::CreateSharedCacheImageHeaders(), lldb_private::IRExecutionUnit::DisassembleFunction(), CommandObjectMemoryFind::DoExecute(), DynamicLoaderMacOSXDYLD::DoInitialImageFetch(), lldb_private::DWARFExpression::Evaluate(), lldb_private::AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(), SystemRuntimeMacOSX::GetExtendedBacktraceFromItemRef(), SystemRuntimeMacOSX::GetExtendedBacktraceThread(), SystemRuntimeMacOSX::GetPendingItemRefsForQueue(), lldb_private::ValueObject::GetPointeeData(), SystemRuntimeMacOSX::GetQueueNameFromThreadQAddress(), DynamicLoaderMacOSXDYLD::GetSharedCacheInformation(), lldb_private::Value::GetValueAsData(), LoadValueFromConsecutiveGPRRegisters(), lldb_private::ThreadPlanAssemblyTracer::Log(), ProcessMemoryIterator::operator[](), SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR(), lldb_private::ClassDescriptorV2::objc_class_t::Read(), lldb_private::ClassDescriptorV2::class_ro_t::Read(), lldb_private::ClassDescriptorV2::class_rw_t::Read(), lldb_private::ClassDescriptorV2::method_list_t::Read(), lldb_private::ClassDescriptorV2::ivar_list_t::Read(), lldb_private::ClassDescriptorV2::ivar_t::Read(), lldb_private::ClassDescriptorV2::relative_list_entry_t::Read(), lldb_private::ClassDescriptorV2::relative_list_list_t::Read(), lldb_private::ClassDescriptorV2::method_t::Read(), DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure(), ReadCStringFromMemory(), DynamicLoaderFreeBSDKernel::ReadELFHeader(), lldb_private::Type::ReadFromMemory(), DynamicLoaderMacOSXDYLD::ReadImageInfos(), JITLoaderGDB::ReadJITDescriptorImpl(), ReadJITEntry(), SystemRuntimeMacOSX::ReadLibdispatchOffsets(), SystemRuntimeMacOSX::ReadLibpthreadOffsets(), DynamicLoaderDarwinKernel::ReadMachHeader(), DynamicLoaderMacOSXDYLD::ReadMachHeader(), DynamicLoaderFreeBSDKernel::KModImageInfo::ReadMemoryModule(), ReadProcessMemory(), ReadScalarIntegerFromMemory(), HexagonDYLDRendezvous::ReadStringFromMemory(), lldb_private::AppleObjCRuntimeV2::SharedCacheImageHeaders::UpdateIfNeeded(), lldb_private::AppleObjCRuntimeV2::SharedCacheClassInfoExtractor::UpdateISAToDescriptorMap(), lldb_private::AppleObjCRuntimeV2::DynamicClassInfoExtractor::UpdateISAToDescriptorMap(), and lldb_private::AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded().
size_t Process::ReadMemoryFromInferior | ( | lldb::addr_t | vm_addr, |
void * | buf, | ||
size_t | size, | ||
Status & | error | ||
) |
Read of memory from a process.
This function has the same semantics of ReadMemory except that it bypasses caching.
[in] | vm_addr | A virtual load address that indicates where to start reading memory from. |
[out] | buf | A byte buffer that is at least size bytes long that will receive the memory bytes. |
[in] | size | The number of bytes to read. |
[out] | error | An 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. |
Definition at line 2208 of file Process.cpp.
References DoReadMemory(), error(), GetABI(), LLDB_SCOPED_TIMER, and RemoveBreakpointOpcodesFromBuffer().
Referenced by lldb_private::PlatformDarwin::ExtractCrashInfoAnnotations(), lldb_private::MemoryCache::GetL2CacheLine(), lldb_private::ProcessStructReader::ProcessStructReader(), lldb_private::MemoryCache::Read(), ReadMemory(), and DynamicLoaderDarwinKernel::SearchForKernelWithDebugHints().
|
virtual |
Read memory tags for the range addr to addr+len.
It is assumed that this range has already been granule aligned. (see MemoryTagManager::MakeTaggedRange)
This calls DoReadMemoryTags to do the target specific operations.
[in] | addr | Start of memory range to read tags for. |
[in] | len | Length of memory range to read tags for (in bytes). |
Reimplemented in ProcessElfCore.
Definition at line 6454 of file Process.cpp.
References DoReadMemoryTags(), lldb_private::MemoryTagManager::GetAllocationTagType(), lldb_private::MemoryTagManager::GetGranuleSize(), GetMemoryTagManager(), and lldb_private::MemoryTagManager::UnpackTagsData().
Referenced by CommandObjectMemoryTagRead::DoExecute().
ModuleSP Process::ReadModuleFromMemory | ( | const FileSpec & | file_spec, |
lldb::addr_t | header_addr, | ||
size_t | size_to_read = 512 |
||
) |
Definition at line 2545 of file Process.cpp.
References error(), lldb_private::FileSpec::GetFilename(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::ConstString::GetString(), lldb_private::Host, IsLiveDebugSession(), and LLDB_LOGF.
Referenced by lldb_private::DynamicLoaderDarwin::AddModulesUsingImageInfos(), DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(), DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(), lldb_private::DynamicLoaderDarwin::FindTargetModuleForImageInfo(), lldb_private::wasm::DynamicLoaderWasmDYLD::LoadModuleAtAddress(), DynamicLoaderPOSIXDYLD::LoadVDSO(), JITLoaderGDB::ReadJITDescriptorImpl(), DynamicLoaderDarwinKernel::KextImageInfo::ReadMemoryModule(), DynamicLoaderFreeBSDKernel::KModImageInfo::ReadMemoryModule(), and ReadUnnamedMemoryModule().
addr_t Process::ReadPointerFromMemory | ( | lldb::addr_t | vm_addr, |
Status & | error | ||
) |
Definition at line 2259 of file Process.cpp.
References error(), GetAddressByteSize(), LLDB_INVALID_ADDRESS, ReadScalarIntegerFromMemory(), and lldb_private::Scalar::ULongLong().
Referenced by lldb_private::AppleObjCRuntimeV2::SharedCacheImageHeaders::CreateSharedCacheImageHeaders(), PlatformPOSIX::DoLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), ProcessFreeBSDKernel::DoUpdateThreadList(), lldb_private::Address::Dump(), lldb_private::DWARFExpression::Evaluate(), lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(), lldb_private::AppleObjCRuntime::GetBacktraceThreadFromException(), lldb_private::AppleObjCRuntimeV2::GetCFBooleanValuesIfNeeded(), lldb_private::AppleObjCRuntimeV2::TaggedPointerVendorRuntimeAssisted::GetClassDescriptor(), lldb_private::AppleObjCRuntimeV2::TaggedPointerVendorExtended::GetClassDescriptor(), lldb_private::ObjCLanguageRuntime::GetClassDescriptor(), lldb_private::AppleObjCRuntimeV2::GetClassDescriptor(), lldb_private::ItaniumABILanguageRuntime::GetExceptionObjectForThread(), lldb_private::AppleObjCRuntimeV1::GetISAHashTablePointer(), lldb_private::AppleObjCRuntimeV2::GetISAHashTablePointer(), SystemRuntimeMacOSX::GetLibdispatchQueueAddressFromThreadQAddress(), DynamicLoaderMacOS::GetNotificationFuncAddrFromImageInfos(), SystemRuntimeMacOSX::GetQueueIDFromThreadQAddress(), SystemRuntimeMacOSX::GetQueueNameFromThreadQAddress(), lldb_private::AppleObjCRuntimeV2::GetTaggedPointerObfuscator(), GetVTableAddress(), lldb_private::ItaniumABILanguageRuntime::GetVTableInfo(), DynamicLoaderMacOS::NotifyBreakpointHit(), DynamicLoaderFreeBSDKernel::ReadAllKmods(), lldb_private::RegisterContextUnwind::ReadFrameAddress(), DynamicLoaderFreeBSDKernel::ReadKmodsListHeader(), lldb_private::DynamicLoader::ReadPointer(), HexagonDYLDRendezvous::ReadPointer(), DYLDRendezvous::ReadPointer(), DYLDRendezvous::ResolveRendezvousAddress(), ResolveRendezvousAddress(), and lldb_private::AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded().
size_t Process::ReadScalarIntegerFromMemory | ( | lldb::addr_t | addr, |
uint32_t | byte_size, | ||
bool | is_signed, | ||
Scalar & | scalar, | ||
Status & | error | ||
) |
Definition at line 2395 of file Process.cpp.
References error(), GetAddressByteSize(), GetByteOrder(), lldb_private::DataExtractor::GetMaxU32(), lldb_private::DataExtractor::GetMaxU64(), ReadMemory(), and lldb_private::Scalar::SignExtend().
Referenced by lldb_private::ClassDescriptorV2::iVarsStorage::fill(), ABIMacOSX_arm64::GetArgumentValues(), ABISysV_arm64::GetArgumentValues(), ABIMacOSX_arm::GetArgumentValues(), ABISysV_arm::GetArgumentValues(), ReadIntegerArgument(), ReadPointerFromMemory(), ReadSignedIntegerFromMemory(), and ReadUnsignedIntegerFromMemory().
int64_t Process::ReadSignedIntegerFromMemory | ( | lldb::addr_t | load_addr, |
size_t | byte_size, | ||
int64_t | fail_value, | ||
Status & | error | ||
) |
Definition at line 2248 of file Process.cpp.
References error(), ReadScalarIntegerFromMemory(), and lldb_private::Scalar::SLongLong().
Referenced by ProcessFreeBSDKernel::DoUpdateThreadList(), lldb_private::ItaniumABILanguageRuntime::GetDynamicTypeAndAddress(), DynamicLoaderFreeBSDKernel::ReadAllKmods(), and ReadVBaseOffsetFromVTable().
uint64_t Process::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.
[in] | load_addr | A load address of the integer to read. |
[in] | byte_size | The size in byte of the integer to read. |
[in] | fail_value | The value to return if we fail to read an integer. |
[out] | error | An 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. |
Definition at line 2237 of file Process.cpp.
References error(), ReadScalarIntegerFromMemory(), and lldb_private::Scalar::ULongLong().
Referenced by SystemRuntimeMacOSX::BacktraceRecordingHeadersInitialized(), DynamicLoaderMacOS::CanLoadImage(), lldb_private::PlatformWindows::DoLoadImage(), ExtractRuntimeGlobalSymbol(), lldb_private::FunctionCaller::FetchFunctionResults(), HexagonDYLDRendezvous::FindMetadata(), lldb_private::AppleObjCRuntimeV2::GetByteOffsetForIvar(), lldb_private::AppleGetQueuesHandler::GetCurrentQueues(), lldb_private::AppleGetItemInfoHandler::GetItemInfo(), lldb_private::AppleGetPendingItemsHandler::GetPendingItems(), SystemRuntimeMacOSX::GetQueueIDFromThreadQAddress(), SystemRuntimeMacOSX::GetQueueKind(), DynamicLoaderMacOSXDYLD::GetSharedCacheInformation(), lldb_private::AppleGetThreadItemInfoHandler::GetThreadItemInfo(), lldb_private::ClassDescriptorV2::method_t::Read(), lldb_private::ClassDescriptorV2::Read_class_row(), ReadInt(), lldb_private::DynamicLoader::ReadUnsignedIntWithSizeInBytes(), HexagonDYLDRendezvous::ReadWord(), and DYLDRendezvous::ReadWord().
|
pure virtual |
Currently called as part of ShouldStop.
FIXME: Should really happen when the target stops before the event is taken from the queue...
This callback is called as the event is about to be queued up to allow Process plug-ins to execute some code prior to clients being notified that a process was stopped. Common operations include updating the thread list, invalidating any thread state (registers, stack, etc) prior to letting the notification go out.
Implemented in lldb_private::ProcessTrace, ProcessElfCore, ProcessFreeBSDKernel, lldb_private::process_gdb_remote::ProcessGDBRemote, ProcessMachCore, ProcessKDP, lldb_private::minidump::ProcessMinidump, lldb_private::ScriptedProcess, and lldb_private::ProcessWindows.
Referenced by ShouldBroadcastEvent().
void Process::RegisterNotificationCallbacks | ( | const Process::Notifications & | callbacks | ) |
Register for process and thread notifications.
Clients can register notification callbacks by filling out a Process::Notifications structure and calling this function.
[in] | callbacks | A structure that contains the notification baton and callback functions. |
Definition at line 612 of file Process.cpp.
References lldb_private::Process::Notifications::baton, lldb_private::Process::Notifications::initialize, and m_notifications.
|
protected |
Definition at line 1766 of file Process.cpp.
References lldb_private::BreakpointSite::eSoftware, lldb_private::StopPointSiteList< StopPointSite >::FindInRange(), lldb_private::StopPointSiteList< StopPointSite >::ForEach(), lldb_private::BreakpointSite::GetType(), and m_breakpoint_site_list.
Referenced by ReadMemoryFromInferior().
void Process::RemoveConstituentFromBreakpointSite | ( | lldb::user_id_t | site_id, |
lldb::user_id_t | constituent_id, | ||
lldb::BreakpointSiteSP & | bp_site_sp | ||
) |
Definition at line 1753 of file Process.cpp.
References DisableBreakpointSite(), IsAlive(), m_breakpoint_site_list, and lldb_private::StopPointSiteList< StopPointSite >::RemoveByAddress().
bool Process::RemoveInvalidMemoryRange | ( | const LoadRange & | region | ) |
Definition at line 5839 of file Process.cpp.
References lldb_private::Range< B, S >::GetByteSize(), lldb_private::Range< B, S >::GetRangeBase(), m_memory_cache, and lldb_private::MemoryCache::RemoveInvalidRange().
|
inline |
Definition at line 2593 of file Process.h.
References m_crash_info_dict_sp.
Referenced by PrivateResume().
void Process::ResetImageToken | ( | size_t | token | ) |
Definition at line 6149 of file Process.cpp.
References LLDB_INVALID_IMAGE_TOKEN, and m_image_tokens.
Referenced by PlatformPOSIX::UnloadImage(), and lldb_private::PlatformWindows::UnloadImage().
Resolve dynamically loaded indirect functions.
[in] | address | The load address of the indirect function to resolve. |
[out] | error | An error value in case the resolve fails. |
Definition at line 6006 of file Process.cpp.
References lldb_private::ConstString::AsCString(), lldb_private::Address::CalculateSymbolContextSymbol(), CallVoidArgVoidPtrReturn(), error(), GetABI(), lldb_private::Address::GetLoadAddress(), lldb_private::Symbol::GetName(), GetTarget(), LLDB_INVALID_ADDRESS, and m_resolved_indirect_addresses.
Referenced by CreateBreakpointSite().
void Process::RestoreProcessEvents | ( | ) |
Restores the process event broadcasting to its normal state.
Definition at line 994 of file Process.cpp.
References lldb_private::Broadcaster::RestoreBroadcaster().
Referenced by lldb_private::ProcessTrace::DidAttach(), Halt(), LaunchPrivate(), LoadCore(), ResumeSynchronous(), StopForDestroyOrDetach(), and lldb_private::Process::ProcessEventHijacker::~ProcessEventHijacker().
Status Process::Resume | ( | ) |
Resumes all of a process's threads as configured using the Thread run control functions.
Threads for a process should be updated with one of the run control actions (resume, step, or suspend) that they should take when the process is resumed. If no run control action is given to a thread it will be resumed by default.
This function is not meant to be overridden by Process subclasses. This function will take care of disabling any breakpoints that threads may be stopped at, single stepping, and re-enabling breakpoints, and enabling the basic flow control that the plug-in instances need not worry about.
N.B. This function also sets the Write side of the Run Lock, which is unset when the corresponding stop event is pulled off the Public Event Queue. If you need to resume the process without setting the Run Lock, use PrivateResume (though you should only do that from inside the Process class.
Definition at line 1382 of file Process.cpp.
References error(), lldb_private::GetLog(), lldb_private::PluginInterface::GetPluginName(), LLDB_LOGF, m_public_run_lock, PrivateResume(), lldb_private::Process, lldb_private::ProcessRunLock::SetStopped(), lldb_private::State, and lldb_private::ProcessRunLock::TrySetRunning().
Referenced by CommandObjectProcessContinue::DoExecute(), CommandObjectThreadStepWithTypeAndScope::DoExecute(), CommandObjectThreadContinue::DoExecute(), CommandObjectThreadUntil::DoExecute(), lldb::SBThread::ResumeNewPlan(), lldb_private::Thread::StepIn(), lldb_private::Thread::StepOut(), and lldb_private::Thread::StepOver().
|
protected |
Definition at line 3813 of file Process.cpp.
References ControlPrivateStateThread(), and eBroadcastInternalStateControlResume.
Referenced by ConnectRemote(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoDetach(), ProcessKDP::DoDetach(), Launch(), LoadCore(), and StartPrivateStateThread().
Resume a process, and wait for it to stop.
Definition at line 1399 of file Process.cpp.
References error(), lldb_private::GetLog(), HijackProcessEvents(), LLDB_LOGF, m_public_run_lock, lldb_private::Listener::MakeListener(), PrivateResume(), lldb_private::Process, RestoreProcessEvents(), ResumeSynchronousHijackListenerName, SelectMostRelevantFrame, lldb_private::ProcessRunLock::SetStopped(), lldb_private::State, lldb_private::StateAsCString(), lldb_private::StateIsStoppedState(), lldb_private::ProcessRunLock::TrySetRunning(), and WaitForProcessToStop().
Referenced by CommandObjectProcessContinue::DoExecute(), CommandObjectThreadStepWithTypeAndScope::DoExecute(), CommandObjectThreadContinue::DoExecute(), CommandObjectThreadUntil::DoExecute(), and lldb::SBThread::ResumeNewPlan().
|
protected |
Route the incoming structured data dictionary to the right plugin.
The incoming structured data must be a dictionary, and it must have a key named 'type' that stores a string value. The string value must be the name of the structured data feature that knows how to handle it.
[in] | object_sp | When non-null and pointing to a dictionary, the 'type' key's string value is used to look up the plugin that was registered for that structured data type. It then calls the following method on the StructuredDataPlugin instance: |
virtual void HandleArrivalOfStructuredData(Process &process, llvm::StringRef type_name, const StructuredData::ObjectSP &object_sp)
Definition at line 6325 of file Process.cpp.
References lldb_private::StructuredData::Object::GetAsDictionary(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsString(), and m_structured_data_plugin_map.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAsyncStructuredDataPacket().
bool Process::RunPreResumeActions | ( | ) |
Definition at line 5849 of file Process.cpp.
References lldb_private::Process::PreResumeCallbackAndBaton::baton, lldb_private::Process::PreResumeCallbackAndBaton::callback, and m_pre_resume_actions.
Referenced by PrivateResume().
|
private |
Definition at line 4015 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), lldb_private::ThreadList::DiscardThreadPlans(), eBroadcastBitInterrupt, eBroadcastInternalStateControlPause, eBroadcastInternalStateControlResume, eBroadcastInternalStateControlStop, error(), lldb::eStateAttaching, lldb::eStateDetached, lldb::eStateExited, lldb::eStateInvalid, GetEventsPrivate(), GetID(), lldb_private::GetLog(), lldb_private::Process::ProcessEventData::GetStateFromEvent(), lldb_private::ThreadSafeValue< T >::GetValue(), HaltPrivate(), HandlePrivateEvent(), LLDB_INVALID_THREAD_ID, LLDB_LOGF, m_clear_thread_plans_on_stop, m_interrupt_tid, m_last_broadcast_state, m_private_state_control_broadcaster, m_public_run_lock, m_public_state, m_thread_list, lldb_private::Process, lldb_private::Process::ProcessEventData::SetInterruptedInEvent(), lldb_private::ProcessRunLock::SetStopped(), lldb_private::StateAsCString(), lldb_private::StateIsRunningState(), and lldb_private::StateIsStoppedState().
Referenced by StartPrivateStateThread().
ExpressionResults Process::RunThreadPlan | ( | ExecutionContext & | exe_ctx, |
lldb::ThreadPlanSP & | thread_plan_sp, | ||
const EvaluateExpressionOptions & | options, | ||
DiagnosticManager & | diagnostic_manager | ||
) |
Definition at line 4941 of file Process.cpp.
References lldb_private::Status::AsCString(), lldb_private::Broadcaster::BroadcastEvent(), lldb_private::Thread::DiscardThreadPlansUpToPlan(), lldb_private::EvaluateExpressionOptions::DoesIgnoreBreakpoints(), lldb_private::EvaluateExpressionOptions::DoesUnwindOnError(), DoNoSelectMostRelevantFrame, eBroadcastBitInterrupt, lldb::eDescriptionLevelVerbose, lldb::eExpressionCompleted, lldb::eExpressionDiscarded, lldb::eExpressionHitBreakpoint, lldb::eExpressionInterrupted, lldb::eExpressionSetupError, lldb::eExpressionStoppedForDebug, lldb::eExpressionThreadVanished, lldb_private::HostThread::EqualsThread(), error(), lldb::eSeverityError, lldb::eSeverityInfo, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateRunning, lldb::eStateStopped, lldb_private::ThreadList::FindThreadByIndexID(), lldb_private::Thread::Flush(), ForceNextEventDelivery(), lldb_private::Host::GetCurrentThread(), lldb_private::StreamString::GetData(), lldb_private::EvaluateExpressionOptions::GetDebug(), lldb_private::Process::ProcessEventData::GetEventDataFromEvent(), GetExpressionTimeout(), lldb_private::Thread::GetFrameWithStackID(), lldb_private::UserID::GetID(), lldb_private::Thread::GetIndexID(), lldb_private::Process::ProcessEventData::GetInterruptedFromEvent(), lldb_private::GetLog(), lldb_private::EvaluateExpressionOptions::GetOneThreadTimeout(), lldb_private::RegisterContext::GetPC(), lldb_private::Thread::GetPrivateStopInfo(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::ProcessEventData::GetProcessSP(), lldb_private::Thread::GetRegisterContext(), lldb_private::Process::ProcessEventData::GetRestartedFromEvent(), lldb_private::Thread::GetSelectedFrame(), lldb_private::ThreadList::GetSelectedThread(), lldb_private::ThreadList::GetSize(), lldb_private::Thread::GetStackFrameStatus(), lldb_private::Process::ProcessEventData::GetStateFromEvent(), lldb_private::EvaluateExpressionOptions::GetStopOthers(), lldb_private::StreamString::GetString(), lldb_private::ThreadList::GetThreadAtIndex(), GetThreadList(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::EvaluateExpressionOptions::GetTimeout(), lldb_private::EvaluateExpressionOptions::GetTryAllThreads(), lldb_private::ProcessProperties::GetUtilityExpressionTimeout(), lldb_private::ThreadSafeValue< T >::GetValue(), Halt(), HandleStoppedEvent(), lldb_private::EvaluateExpressionOptions::IsForUtilityExpr(), lldb_private::HostThread::IsJoinable(), lldb_private::Thread::IsThreadPlanDone(), lldb_private::StackID::IsValid(), LLDB_INVALID_THREAD_ID, LLDB_LOG, LLDB_LOGF, m_private_state, m_private_state_thread, m_public_state, m_run_thread_plan_lock, lldb_private::Listener::MakeListener(), lldb_private::Stream::Printf(), lldb_private::DiagnosticManager::Printf(), PrivateResume(), lldb_private::Process, lldb_private::Log::PutCString(), lldb_private::Stream::PutCString(), lldb_private::DiagnosticManager::PutString(), lldb_private::Log::PutString(), lldb_private::Thread::QueueThreadPlan(), lldb_private::ExecutionContext::SetFrameSP(), lldb_private::Thread::SetSelectedFrame(), lldb_private::ThreadSafeValue< T >::SetValueNoLock(), StartPrivateStateThread(), lldb_private::StateAsCString(), lldb_private::Step, StopPrivateStateThread(), lldb_private::Status::Success(), UINT32_MAX, and lldb_private::Thread::WasThreadPlanDiscarded().
Referenced by CallVoidArgVoidPtrReturn(), lldb_private::LLVMUserExpression::DoExecute(), lldb_private::FunctionCaller::ExecuteFunction(), lldb_private::DynamicLoaderDarwin::GetThreadLocalData(), lldb_private::InferiorCallMmap(), lldb_private::InferiorCallMunmap(), and IRInterpreter::Interpret().
|
virtual |
Save core dump into the specified file.
[in] | outfile | Path to store core dump in. |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
Definition at line 2858 of file Process.cpp.
void Process::SendAsyncInterrupt | ( | Thread * | thread = nullptr | ) |
Send an async interrupt request.
If thread is specified the async interrupt stop will be attributed to the specified thread.
[in] | thread | The thread the async interrupt will be attributed to. |
Definition at line 3878 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), eBroadcastBitInterrupt, lldb_private::Thread::GetProtocolID(), LLDB_INVALID_THREAD_ID, m_interrupt_tid, m_private_state_broadcaster, and PrivateStateThreadIsValid().
Referenced by Halt(), lldb_private::ThreadPlanSingleThreadTimeout::HandleTimeout(), lldb_private::TargetList::SendAsyncInterrupt(), and StopForDestroyOrDetach().
|
inlinevirtual |
Reimplemented in lldb_private::process_gdb_remote::ProcessGDBRemote.
|
protected |
Definition at line 6708 of file Process.cpp.
References lldb_private::AddressableBits::AddressableBitToMask(), lldb_private::AddressableBits::GetHighmemAddressableBits(), lldb_private::AddressableBits::GetLowmemAddressableBits(), SetCodeAddressMask(), SetDataAddressMask(), SetHighmemCodeAddressMask(), and SetHighmemDataAddressMask().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach(), ProcessMachCore::DoLoadCore(), and lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo().
|
inline |
Sets whether executing function calls using the interpreter is possible for this process.
[in] | can_interpret_function_calls | True if possible; false otherwise. |
Definition at line 2016 of file Process.h.
References m_can_interpret_function_calls.
Referenced by DynamicLoaderHexagonDYLD::DidAttach().
void Process::SetCanJIT | ( | bool | can_jit | ) |
Sets whether executing JIT-compiled code in this process is possible.
[in] | can_jit | True if execution of JIT code is possible; false otherwise. |
Definition at line 2499 of file Process.cpp.
References eCanJITNo, eCanJITYes, and m_can_jit.
Referenced by DynamicLoaderHexagonDYLD::DidAttach(), lldb_private::ProcessTrace::DidAttach(), ProcessKDP::DoConnectRemote(), ProcessElfCore::DoLoadCore(), ProcessMachCore::DoLoadCore(), DynamicLoaderStatic::LoadAllImagesAtFileAddresses(), and SetCanRunCode().
void Process::SetCanRunCode | ( | bool | can_run_code | ) |
Sets whether executing code in this process is possible.
This could be either through JIT or interpreting.
[in] | can_run_code | True if execution of code is possible; false otherwise. |
Definition at line 2503 of file Process.cpp.
References m_can_interpret_function_calls, and SetCanJIT().
Referenced by DynamicLoaderDarwinKernel::DynamicLoaderDarwinKernel(), and DynamicLoaderFreeBSDKernel::DynamicLoaderFreeBSDKernel().
void Process::SetCodeAddressMask | ( | lldb::addr_t | code_address_mask | ) |
Definition at line 5926 of file Process.cpp.
References lldb_private::GetLog(), LLDB_LOG, m_code_address_mask, and lldb_private::Process.
Referenced by DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), and SetAddressableBitMasks().
void Process::SetDataAddressMask | ( | lldb::addr_t | data_address_mask | ) |
Definition at line 5932 of file Process.cpp.
References lldb_private::GetLog(), LLDB_LOG, m_data_address_mask, and lldb_private::Process.
Referenced by DynamicLoaderDarwinKernel::LoadKernelModuleIfNeeded(), and SetAddressableBitMasks().
void Process::SetDynamicCheckers | ( | DynamicCheckerFunctions * | dynamic_checkers | ) |
Definition at line 1606 of file Process.cpp.
References m_dynamic_checkers_up.
Referenced by lldb_private::ClangExpressionParser::DoPrepareForExecution().
void Process::SetDynamicLoader | ( | lldb::DynamicLoaderUP | dyld | ) |
Definition at line 2852 of file Process.cpp.
References m_dyld_up.
|
virtual |
Set accessor for the process exit status (return code).
Sometimes a child exits and the exit can be detected by global functions (signal handler for SIGCHLD for example). This accessor allows the exit status to be set from an external source.
Setting this will cause a eStateExited event to be posted to the process event queue.
[in] | exit_status | The value for the process's return code. |
[in] | exit_string | A StringRef containing the reason for exiting. May be empty. |
Definition at line 1091 of file Process.cpp.
References DidExit(), lldb::eStateExited, lldb_private::GetLog(), lldb_private::PluginInterface::GetPluginName(), lldb_private::ThreadSafeValue< T >::GetValue(), LLDB_LOG, m_exit_status, m_exit_status_mutex, m_exit_string, m_mod_id, m_private_state, lldb_private::Process, SetPrivateState(), lldb_private::ProcessModID::SetStopEventForLastNaturalStopID(), and lldb_private::State.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread(), Attach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoAttachToProcessWithID(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoAttachToProcessWithName(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoDestroy(), Halt(), HandlePrivateEvent(), and lldb_private::PostMortemProcess::Process().
void Process::SetHighmemCodeAddressMask | ( | lldb::addr_t | code_address_mask | ) |
Definition at line 5938 of file Process.cpp.
References lldb_private::GetLog(), LLDB_LOG, m_highmem_code_address_mask, and lldb_private::Process.
Referenced by SetAddressableBitMasks().
void Process::SetHighmemDataAddressMask | ( | lldb::addr_t | data_address_mask | ) |
Definition at line 5945 of file Process.cpp.
References lldb_private::GetLog(), LLDB_LOG, m_highmem_data_address_mask, and lldb_private::Process.
Referenced by SetAddressableBitMasks().
|
inline |
Sets the stored pid.
This does not change the pid of underlying process.
Definition at line 545 of file Process.h.
References m_pid.
Referenced by Attach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidFork(), lldb_private::process_gdb_remote::ProcessGDBRemote::DidVFork(), lldb_private::ProcessWindows::DoAttachToProcessWithID(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoAttachToProcessWithID(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), lldb_private::ProcessWindows::DoLaunch(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), lldb_private::process_gdb_remote::ProcessGDBRemote::HandleStopReply(), ParseFreeBSDPrPsInfo(), ProcessElfCore::parseLinuxNotes(), ProcessElfCore::parseNetBSDNotes(), lldb_private::PostMortemProcess::Process(), and lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo().
|
inlineprotected |
Definition at line 2935 of file Process.h.
References m_next_event_action_up.
Referenced by Attach(), and HandlePrivateEvent().
|
protected |
Definition at line 1454 of file Process.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), lldb_private::ProcessModID::BumpStopID(), lldb_private::MemoryCache::Clear(), lldb_private::ThreadList::DidStop(), eBroadcastBitStateChanged, lldb_private::Broadcaster::Event, lldb_private::GetLog(), lldb_private::ThreadSafeValue< T >::GetMutex(), lldb_private::ThreadList::GetMutex(), lldb_private::PluginInterface::GetPluginName(), lldb_private::Target::GetStatistics(), lldb_private::ProcessModID::GetStopID(), GetTarget(), lldb_private::ThreadSafeValue< T >::GetValueNoLock(), lldb_private::ProcessModID::IsLastResumeForUserExpression(), LLDB_LOGF, m_destructing, m_memory_cache, m_mod_id, m_private_run_lock, m_private_state, m_private_state_broadcaster, m_thread_list, lldb_private::Process, lldb_private::TargetStats::SetFirstPrivateStopTime(), lldb_private::ProcessRunLock::SetRunning(), lldb_private::ProcessModID::SetStopEventForLastNaturalStopID(), lldb_private::ProcessRunLock::SetStopped(), lldb_private::ThreadSafeValue< T >::SetValueNoLock(), lldb_private::State, lldb_private::StateAsCString(), lldb_private::StateIsStoppedState(), and lldb_private::Unwind.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread(), ProcessKDP::AsyncThread(), lldb_private::ProcessTrace::DidAttach(), lldb_private::ScriptedProcess::DoAttach(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(), ProcessKDP::DoConnectRemote(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoDetach(), ProcessKDP::DoDetach(), lldb_private::ProcessWindows::DoDetach(), ProcessKDP::DoHalt(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), lldb_private::ScriptedProcess::DoLaunch(), ProcessKDP::DoResume(), lldb_private::ProcessWindows::DoResume(), lldb_private::ScriptedProcess::ForceScriptedState(), LoadCore(), lldb_private::ProcessWindows::OnDebugException(), lldb_private::ProcessWindows::OnExitProcess(), PrivateResume(), and SetExitStatus().
|
static |
Static function that can be used with the host function Host::StartMonitoringChildProcess ().
This function can be used by lldb_private::Process subclasses when they want to watch for a local process and have its exit status automatically set when the host child process exits. Subclasses should call Host::StartMonitoringChildProcess () with: callback = Process::SetHostProcessExitStatus pid = Process::GetID() monitor_signals = false
Definition at line 1147 of file Process.cpp.
References lldb_private::Debugger::FindTargetWithProcessID(), lldb_private::GetLog(), LLDB_LOGF, and lldb_private::Process.
Referenced by lldb_private::ProcessWindows::OnExitProcess().
|
protected |
Definition at line 1342 of file Process.cpp.
References lldb::eStateDetached, lldb_private::GetLog(), lldb_private::PluginInterface::GetPluginName(), lldb_private::Target::GetStatistics(), GetTarget(), lldb_private::ThreadSafeValue< T >::GetValue(), LLDB_LOGF, m_public_run_lock, m_public_state, lldb_private::Process, lldb_private::TargetStats::SetFirstPublicStopTime(), lldb_private::ProcessRunLock::SetStopped(), lldb_private::ThreadSafeValue< T >::SetValue(), lldb_private::State, lldb_private::StateAsCString(), StateChangedIsExternallyHijacked(), and lldb_private::StateIsStoppedState().
Referenced by Attach(), Launch(), and LaunchPrivate().
void Process::SetRunningUserExpression | ( | bool | on | ) |
Definition at line 1521 of file Process.cpp.
References m_mod_id, and lldb_private::ProcessModID::SetRunningUserExpression().
Referenced by lldb_private::LLVMUserExpression::DoExecute(), lldb_private::FunctionCaller::ExecuteFunction(), and IRInterpreter::Interpret().
void Process::SetRunningUtilityFunction | ( | bool | on | ) |
Definition at line 1525 of file Process.cpp.
References m_mod_id, and lldb_private::ProcessModID::SetRunningUtilityFunction().
Referenced by lldb_private::UtilityFunctionScope::UtilityFunctionScope(), and lldb_private::UtilityFunctionScope::~UtilityFunctionScope().
|
inline |
The "ShadowListener" for a process is just an ordinary Listener that listens for all the Process event bits.
It's convenient because you can specify it in the LaunchInfo or AttachInfo, so it will get events from the very start of the process.
Definition at line 629 of file Process.h.
References lldb_private::Broadcaster::AddListener(), and g_all_event_bits.
|
inline |
Definition at line 791 of file Process.h.
References m_should_detach.
void Process::SetSTDIOFileDescriptor | ( | int | file_descriptor | ) |
Definition at line 4748 of file Process.cpp.
References lldb_private::Communication::IsConnected(), m_process_input_reader, m_process_input_reader_mutex, m_stdio_communication, lldb_private::ThreadedCommunication::SetConnection(), lldb_private::ThreadedCommunication::SetReadThreadBytesReceivedCallback(), lldb_private::ThreadedCommunication::StartReadThread(), and STDIOReadThreadBytesReceived().
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch().
|
static |
Definition at line 4804 of file Process.cpp.
References lldb_private::Thread::SettingsInitialize().
Referenced by lldb_private::Target::SettingsInitialize().
|
static |
Definition at line 4806 of file Process.cpp.
References lldb_private::Thread::SettingsTerminate().
Referenced by lldb_private::Target::SettingsTerminate().
void Process::SetUnixSignals | ( | lldb::UnixSignalsSP && | signals_sp | ) |
Definition at line 3586 of file Process.cpp.
References m_unix_signals_sp.
Referenced by ProcessElfCore::Clear(), ProcessElfCore::DoLoadCore(), lldb_private::minidump::ProcessMinidump::DoLoadCore(), and lldb_private::process_gdb_remote::ProcessGDBRemote::SetUnixSignals().
|
private |
This is the part of the event handling that for a process event.
It decides what to do with the event and returns true if the event needs to be propagated to the user, and false otherwise. If the event is not propagated, this call will most likely set the target to executing again. There is only one place where this call should be called, HandlePrivateEvent. Don't call it from anywhere else...
[in] | event_ptr | This is the event we are handling. |
Definition at line 3604 of file Process.cpp.
References lldb_private::ThreadedCommunication::Disconnect(), lldb::eStateAttaching, lldb::eStateConnected, lldb::eStateCrashed, lldb::eStateDetached, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateLaunching, lldb::eStateRunning, lldb::eStateStepping, lldb::eStateStopped, lldb::eStateSuspended, lldb::eStateUnloaded, lldb_private::Events, lldb_private::eVoteNo, lldb_private::eVoteNoOpinion, lldb_private::eVoteYes, lldb_private::Process::ProcessEventData::GetInterruptedFromEvent(), lldb_private::GetLog(), lldb_private::Process::ProcessEventData::GetRestartedFromEvent(), lldb_private::Process::ProcessEventData::GetStateFromEvent(), LLDB_LOGF, m_force_next_event_delivery, m_last_broadcast_state, m_resume_requested, m_stdin_forward, m_stdio_communication, m_thread_list, PrivateResume(), lldb_private::Process, RefreshStateAfterStop(), lldb_private::Process::ProcessEventData::SetRestartedInEvent(), lldb_private::ThreadList::ShouldReportRun(), lldb_private::ThreadList::ShouldReportStop(), lldb_private::ThreadList::ShouldStop(), lldb_private::StateAsCString(), lldb_private::ThreadedCommunication::StopReadThread(), lldb_private::ThreadedCommunication::SynchronizeWithReadThread(), and SynchronouslyNotifyStateChanged().
Referenced by HandlePrivateEvent().
Status Process::Signal | ( | int | signal | ) |
Sends a process a UNIX signal signal.
This function is not meant to be overridden by Process subclasses.
Definition at line 3576 of file Process.cpp.
References DidSignal(), DoSignal(), error(), and WillSignal().
Referenced by CommandObjectProcessSignal::DoExecute(), and lldb_private::TargetList::SignalIfRunning().
|