diff options
Diffstat (limited to 'lldb/source/Plugins/Process/Linux')
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 22 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.h | 10 |
2 files changed, 3 insertions, 29 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 81d257e95e1..7637237aa16 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -288,7 +288,7 @@ NativeProcessLinux::NativeProcessLinux(::pid_t pid, int terminal_fd, NativeDelegate &delegate, const ArchSpec &arch, MainLoop &mainloop, llvm::ArrayRef<::pid_t> tids) - : NativeProcessProtocol(pid, terminal_fd, delegate), m_arch(arch) { + : NativeProcessELF(pid, terminal_fd, delegate), m_arch(arch) { if (m_terminal_fd != -1) { Status status = EnsureFDFlags(m_terminal_fd, O_NONBLOCK); assert(status.Success()); @@ -1389,11 +1389,6 @@ Status NativeProcessLinux::DeallocateMemory(lldb::addr_t addr) { return Status("not implemented"); } -lldb::addr_t NativeProcessLinux::GetSharedLibraryInfoAddress() { - // punt on this for now - return LLDB_INVALID_ADDRESS; -} - size_t NativeProcessLinux::UpdateThreads() { // The NativeProcessLinux monitoring threads are always up to date with // respect to thread state and they keep the thread list populated properly. @@ -2082,18 +2077,3 @@ Status NativeProcessLinux::StopProcessorTracingOnThread(lldb::user_id_t traceid, return error; } - -llvm::Optional<uint64_t> -NativeProcessLinux::GetAuxValue(enum AuxVector::EntryType type) { - if (m_aux_vector == nullptr) { - auto buffer_or_error = GetAuxvData(); - if (!buffer_or_error) - return llvm::None; - DataExtractor auxv_data(buffer_or_error.get()->getBufferStart(), - buffer_or_error.get()->getBufferSize(), - GetByteOrder(), GetAddressByteSize()); - m_aux_vector = llvm::make_unique<AuxVector>(auxv_data); - } - - return m_aux_vector->GetAuxValue(type); -} diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h index 0a67af0a0a4..1366f0b1fe3 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h @@ -12,7 +12,6 @@ #include <csignal> #include <unordered_set> -#include "Plugins/Process/Utility/AuxVector.h" #include "lldb/Host/Debug.h" #include "lldb/Host/HostThread.h" #include "lldb/Host/linux/Support.h" @@ -22,8 +21,8 @@ #include "lldb/lldb-types.h" #include "NativeThreadLinux.h" +#include "Plugins/Process/POSIX/NativeProcessELF.h" #include "ProcessorTrace.h" -#include "lldb/Host/common/NativeProcessProtocol.h" namespace lldb_private { class Status; @@ -37,7 +36,7 @@ namespace process_linux { /// for debugging. /// /// Changes in the inferior process state are broadcasted. -class NativeProcessLinux : public NativeProcessProtocol { +class NativeProcessLinux : public NativeProcessELF { public: class Factory : public NativeProcessProtocol::Factory { public: @@ -77,8 +76,6 @@ public: Status DeallocateMemory(lldb::addr_t addr) override; - lldb::addr_t GetSharedLibraryInfoAddress() override; - size_t UpdateThreads() override; const ArchSpec &GetArchitecture() const override { return m_arch; } @@ -103,8 +100,6 @@ public: return getProcFile(GetID(), "auxv"); } - llvm::Optional<uint64_t> GetAuxValue(enum AuxVector::EntryType type); - lldb::user_id_t StartTrace(const TraceOptions &config, Status &error) override; @@ -135,7 +130,6 @@ protected: private: MainLoop::SignalHandleUP m_sigchld_handle; ArchSpec m_arch; - std::unique_ptr<AuxVector> m_aux_vector; LazyBool m_supports_mem_region = eLazyBoolCalculate; std::vector<std::pair<MemoryRegionInfo, FileSpec>> m_mem_region_cache; |

