| LLDB mainline
    | 
Abstract class that extends NativeProcessProtocol with ELF specific logic. More...
#include <NativeProcessELF.h>
| Classes | |
| struct | ELFLinkMap | 
| Public Member Functions | |
| std::optional< uint64_t > | GetAuxValue (enum AuxVector::EntryType type) | 
| Public Member Functions inherited from lldb_private::NativeProcessProtocol | |
| virtual | ~NativeProcessProtocol ()=default | 
| virtual Status | Resume (const ResumeActionList &resume_actions)=0 | 
| virtual Status | Halt ()=0 | 
| virtual Status | Detach ()=0 | 
| virtual Status | Signal (int signo)=0 | 
| Sends a process a UNIX signal signal. | |
| virtual Status | Interrupt () | 
| Tells a process to interrupt all operations as if by a Ctrl-C. | |
| virtual Status | Kill ()=0 | 
| virtual Status | IgnoreSignals (llvm::ArrayRef< int > signals) | 
| virtual Status | GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info) | 
| virtual Status | ReadMemory (lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read)=0 | 
| Status | ReadMemoryWithoutTrap (lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) | 
| virtual Status | ReadMemoryTags (int32_t type, lldb::addr_t addr, size_t len, std::vector< uint8_t > &tags) | 
| virtual Status | WriteMemoryTags (int32_t type, lldb::addr_t addr, size_t len, const std::vector< uint8_t > &tags) | 
| llvm::Expected< llvm::StringRef > | ReadCStringFromMemory (lldb::addr_t addr, char *buffer, size_t max_size, size_t &total_bytes_read) | 
| Reads a null terminated string from memory. | |
| virtual Status | WriteMemory (lldb::addr_t addr, const void *buf, size_t size, size_t &bytes_written)=0 | 
| virtual llvm::Expected< lldb::addr_t > | AllocateMemory (size_t size, uint32_t permissions) | 
| virtual llvm::Error | DeallocateMemory (lldb::addr_t addr) | 
| virtual bool | IsAlive () const | 
| virtual size_t | UpdateThreads ()=0 | 
| virtual const ArchSpec & | GetArchitecture () const =0 | 
| virtual Status | SetBreakpoint (lldb::addr_t addr, uint32_t size, bool hardware)=0 | 
| virtual Status | RemoveBreakpoint (lldb::addr_t addr, bool hardware=false) | 
| virtual const HardwareBreakpointMap & | GetHardwareBreakpointMap () const | 
| virtual Status | SetHardwareBreakpoint (lldb::addr_t addr, size_t size) | 
| virtual Status | RemoveHardwareBreakpoint (lldb::addr_t addr) | 
| virtual const NativeWatchpointList::WatchpointMap & | GetWatchpointMap () const | 
| virtual std::optional< std::pair< uint32_t, uint32_t > > | GetHardwareDebugSupportInfo () const | 
| virtual Status | SetWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware) | 
| virtual Status | RemoveWatchpoint (lldb::addr_t addr) | 
| lldb::pid_t | GetID () const | 
| lldb::StateType | GetState () const | 
| bool | IsRunning () const | 
| bool | IsStepping () const | 
| bool | CanResume () const | 
| lldb::ByteOrder | GetByteOrder () const | 
| uint32_t | GetAddressByteSize () const | 
| virtual llvm::ErrorOr< std::unique_ptr< llvm::MemoryBuffer > > | GetAuxvData () const =0 | 
| virtual std::optional< WaitStatus > | GetExitStatus () | 
| virtual bool | SetExitStatus (WaitStatus status, bool bNotifyStateChange) | 
| NativeThreadProtocol * | GetThreadAtIndex (uint32_t idx) | 
| NativeThreadProtocol * | GetThreadByID (lldb::tid_t tid) | 
| void | SetCurrentThreadID (lldb::tid_t tid) | 
| lldb::tid_t | GetCurrentThreadID () const | 
| NativeThreadProtocol * | GetCurrentThread () | 
| ThreadIterable | Threads () const | 
| virtual int | GetTerminalFileDescriptor () | 
| uint32_t | GetStopID () const | 
| virtual Status | GetLoadedModuleFileSpec (const char *module_path, FileSpec &file_spec)=0 | 
| virtual Status | GetFileLoadAddress (const llvm::StringRef &file_name, lldb::addr_t &load_addr)=0 | 
| virtual void | NotifyTracersProcessWillResume () | 
| Notify tracers that the target process will resume. | |
| virtual void | NotifyTracersProcessDidStop () | 
| Notify tracers that the target process just stopped. | |
| virtual llvm::Error | TraceStart (llvm::StringRef json_params, llvm::StringRef type) | 
| 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< llvm::json::Value > | 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. | |
| virtual llvm::Expected< TraceSupportedResponse > | TraceSupported () | 
| Get the processor tracing type supported for this process. | |
| virtual void | SetEnabledExtensions (Extension flags) | 
| Method called in order to propagate the bitmap of protocol extensions supported by the client. | |
| virtual llvm::Expected< std::string > | SaveCore (llvm::StringRef path_hint) | 
| Write a core dump (without crashing the program). | |
| virtual std::vector< std::string > | GetStructuredDataPlugins () | 
| Get the list of structured data plugins supported by this process. | |
| Protected Member Functions | |
| lldb::addr_t | GetSharedLibraryInfoAddress () override | 
| template<typename ELF_EHDR, typename ELF_PHDR, typename ELF_DYN> | |
| lldb::addr_t | GetELFImageInfoAddress () | 
| llvm::Expected< std::vector< SVR4LibraryInfo > > | GetLoadedSVR4Libraries () override | 
| template<typename T> | |
| llvm::Expected< SVR4LibraryInfo > | ReadSVR4LibraryInfo (lldb::addr_t link_map_addr) | 
| void | NotifyDidExec () override | 
| Notify the delegate that an exec occurred. | |
| Protected Member Functions inherited from lldb_private::NativeProcessProtocol | |
| NativeProcessProtocol (lldb::pid_t pid, int terminal_fd, NativeDelegate &delegate) | |
| void | SetID (lldb::pid_t pid) | 
| void | SetState (lldb::StateType state, bool notify_delegates=true) | 
| virtual void | DoStopIDBumped (uint32_t newBumpId) | 
| Status | SetSoftwareBreakpoint (lldb::addr_t addr, uint32_t size_hint) | 
| Status | RemoveSoftwareBreakpoint (lldb::addr_t addr) | 
| virtual llvm::Expected< llvm::ArrayRef< uint8_t > > | GetSoftwareBreakpointTrapOpcode (size_t size_hint) | 
| virtual size_t | GetSoftwareBreakpointPCOffset () | 
| Return the offset of the PC relative to the software breakpoint that was hit. | |
| void | FixupBreakpointPCAsNeeded (NativeThreadProtocol &thread) | 
| NativeThreadProtocol * | GetThreadByIDUnlocked (lldb::tid_t tid) | 
| Protected Attributes | |
| std::unique_ptr< AuxVector > | m_aux_vector | 
| std::optional< lldb::addr_t > | m_shared_library_info_addr | 
| Protected Attributes inherited from lldb_private::NativeProcessProtocol | |
| std::unordered_map< lldb::addr_t, SoftwareBreakpoint > | m_software_breakpoints | 
| lldb::pid_t | m_pid | 
| std::vector< std::unique_ptr< NativeThreadProtocol > > | m_threads | 
| lldb::tid_t | m_current_thread_id = LLDB_INVALID_THREAD_ID | 
| std::recursive_mutex | m_threads_mutex | 
| lldb::StateType | m_state = lldb::eStateInvalid | 
| std::recursive_mutex | m_state_mutex | 
| std::optional< WaitStatus > | m_exit_status | 
| NativeDelegate & | m_delegate | 
| NativeWatchpointList | m_watchpoint_list | 
| HardwareBreakpointMap | m_hw_breakpoints_map | 
| int | m_terminal_fd | 
| uint32_t | m_stop_id = 0 | 
| llvm::DenseSet< int > | m_signals_to_ignore | 
| Extension | m_enabled_extensions | 
| Private Member Functions | |
| NativeProcessProtocol (lldb::pid_t pid, int terminal_fd, NativeDelegate &delegate) | |
| Additional Inherited Members | |
| Public Types inherited from lldb_private::NativeProcessProtocol | |
| enum class | Extension { multiprocess = (1u << 0) , fork = (1u << 1) , vfork = (1u << 2) , pass_signals = (1u << 3) , auxv = (1u << 4) , libraries_svr4 = (1u << 5) , memory_tagging = (1u << 6) , savecore = (1u << 7) , siginfo_read = (1u << 8) } | 
| Extension flag constants, returned by Manager::GetSupportedExtensions() and passed to SetEnabledExtension()  More... | |
| typedef std::vector< std::unique_ptr< NativeThreadProtocol > > | thread_collection | 
| typedef LockingAdaptedIterable< std::recursive_mutex, thread_collection, llvm::pointee_iterator< thread_collection::const_iterator > > | ThreadIterable | 
Abstract class that extends NativeProcessProtocol with ELF specific logic.
Meant to be subclassed by ELF based NativeProcess* implementations.
Definition at line 22 of file NativeProcessELF.h.
| std::optional< uint64_t > lldb_private::NativeProcessELF::GetAuxValue | ( | enum AuxVector::EntryType | type | ) | 
Definition at line 17 of file NativeProcessELF.cpp.
References lldb_private::NativeProcessProtocol::GetAddressByteSize(), lldb_private::NativeProcessProtocol::GetAuxvData(), lldb_private::NativeProcessProtocol::GetByteOrder(), and m_aux_vector.
Referenced by GetELFImageInfoAddress().
| 
 | protected | 
Definition at line 47 of file NativeProcessELF.cpp.
References AuxVector::AUXV_AT_PHDR, AuxVector::AUXV_AT_PHENT, AuxVector::AUXV_AT_PHNUM, error(), GetAuxValue(), LLDB_INVALID_ADDRESS, and lldb_private::NativeProcessProtocol::ReadMemory().
Referenced by GetSharedLibraryInfoAddress(), lldb_private::NativeProcessELF::GetELFImageInfoAddress< llvm::ELF::Elf32_Ehdr, llvm::ELF::Elf32_Phdr, llvm::ELF::Elf32_Dyn >(), and lldb_private::NativeProcessELF::GetELFImageInfoAddress< llvm::ELF::Elf64_Ehdr, llvm::ELF::Elf64_Phdr, llvm::ELF::Elf64_Dyn >().
| 
 | overrideprotectedvirtual | 
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 143 of file NativeProcessELF.cpp.
References lldb_private::NativeProcessProtocol::GetAddressByteSize(), GetSharedLibraryInfoAddress(), LLDB_INVALID_ADDRESS, lldb_private::NativeProcessProtocol::ReadMemory(), and ReadSVR4LibraryInfo().
| 
 | overrideprotectedvirtual | 
Implements lldb_private::NativeProcessProtocol.
Reimplemented in lldb_private::process_netbsd::NativeProcessNetBSD.
Definition at line 31 of file NativeProcessELF.cpp.
References lldb_private::NativeProcessProtocol::GetAddressByteSize(), GetELFImageInfoAddress(), and m_shared_library_info_addr.
Referenced by GetLoadedSVR4Libraries().
| 
 | private | 
Definition at line 456 of file NativeProcessProtocol.cpp.
References error().
Referenced by lldb_private::process_linux::NativeProcessLinux::Manager::Manager().
| 
 | overrideprotectedvirtual | 
Notify the delegate that an exec occurred.
Provide a mechanism for a delegate to clear out any exec- sensitive data.
Reimplemented from lldb_private::NativeProcessProtocol.
Definition at line 184 of file NativeProcessELF.cpp.
References m_shared_library_info_addr, and lldb_private::NativeProcessProtocol::NotifyDidExec().
Referenced by lldb_private::process_freebsd::NativeProcessFreeBSD::MonitorSIGTRAP(), lldb_private::process_linux::NativeProcessLinux::MonitorSIGTRAP(), and lldb_private::process_netbsd::NativeProcessNetBSD::MonitorSIGTRAP().
| 
 | protected | 
Definition at line 118 of file NativeProcessELF.cpp.
References lldb_private::SVR4LibraryInfo::base_addr, error(), lldb_private::NativeProcessELF::ELFLinkMap< T >::l_addr, lldb_private::NativeProcessELF::ELFLinkMap< T >::l_ld, lldb_private::NativeProcessELF::ELFLinkMap< T >::l_name, lldb_private::NativeProcessELF::ELFLinkMap< T >::l_next, lldb_private::SVR4LibraryInfo::ld_addr, lldb_private::SVR4LibraryInfo::link_map, lldb_private::SVR4LibraryInfo::name, lldb_private::SVR4LibraryInfo::next, PATH_MAX, lldb_private::NativeProcessProtocol::ReadCStringFromMemory(), and lldb_private::NativeProcessProtocol::ReadMemory().
Referenced by GetLoadedSVR4Libraries().
| 
 | protected | 
Definition at line 51 of file NativeProcessELF.h.
Referenced by GetAuxValue().
| 
 | protected | 
Definition at line 52 of file NativeProcessELF.h.
Referenced by GetSharedLibraryInfoAddress(), and NotifyDidExec().