26 return "Trace process plug-in.";
39 return std::make_shared<ProcessTrace>(target_sp, listener_sp, *crash_file);
43 return plugin_specified_by_name;
88 addr = abi->FixAnyAddress(addr);
98 static llvm::once_flag g_once_flag;
100 llvm::call_once(g_once_flag, []() {
116 const bool add_exe_file_as_first_arg =
false;
118 add_exe_file_as_first_arg);
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_PLUGIN_DEFINE(PluginName)
A section + offset based address class.
An architecture specification class.
static lldb::ListenerSP MakeListener(const char *name)
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
Base class for all processes that don't represent a live process, such as coredumps or processes trac...
void SetExecutableFile(const FileSpec &exe_file, bool add_exe_file_as_first_arg)
void SetArchitecture(const ArchSpec &arch)
void SetProcessID(lldb::pid_t pid)
Class that represents a defunct process loaded on memory via the "trace load" command.
static llvm::StringRef GetPluginNameStatic()
void RefreshStateAfterStop() override
Currently called as part of ShouldStop.
bool GetProcessInfo(ProcessInstanceInfo &info) override
size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size, Status &error) override
Actually do the reading of memory from a process.
bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override
Check if a plug-in instance can debug the file in module.
static llvm::StringRef GetPluginDescriptionStatic()
static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
bool DoUpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thread_list) override
Update the thread list following process plug-in's specific logic.
ArchSpec GetArchitecture()
Status DoDestroy() override
size_t ReadMemory(lldb::addr_t addr, void *buf, size_t size, Status &error) override
Read of memory from a process.
void DidAttach(ArchSpec &process_arch) override
Called after attaching a process.
ProcessTrace(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec &core_file)
lldb::pid_t GetID() const
Returns the pid of the process or LLDB_INVALID_PROCESS_ID if there is no known pid.
void SetCanJIT(bool can_jit)
Sets whether executing JIT-compiled code in this process is possible.
bool StartPrivateStateThread(bool is_secondary_thread=false)
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)
virtual void DidAttach(ArchSpec &process_arch)
Called after attaching a process.
void RestoreProcessEvents()
Restores the process event broadcasting to its normal state.
void SetPrivateState(lldb::StateType state)
virtual void Finalize(bool destructing)
This object is about to be destroyed, do any necessary cleanup.
ThreadList m_thread_list
The threads for this process as the user will see them.
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 listen...
const lldb::ABISP & GetABI()
Target & GetTarget()
Get the target object pointer for this module.
bool ResolveLoadAddress(lldb::addr_t load_addr, Address &so_addr, bool allow_section_end=false) const
SectionLoadList & GetSectionLoadList()
size_t ReadMemoryFromFileCache(const Address &addr, void *dst, size_t dst_len, Status &error)
lldb::ModuleSP GetExecutableModule()
Gets the module for the main executable.
const ArchSpec & GetArchitecture() const
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ABI > ABISP
@ eStateStopped
Process or thread is stopped and can be examined.
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Event > EventSP
std::shared_ptr< lldb_private::Listener > ListenerSP
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::Module > ModuleSP