1 //===-- NativeProcessELF.h ------------------------------------ -*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_NativeProcessELF_H_
10 #define liblldb_NativeProcessELF_H_
12 #include "Plugins/Process/Utility/AuxVector.h"
13 #include "lldb/Host/common/NativeProcessProtocol.h"
14 #include "llvm/BinaryFormat/ELF.h"
16 namespace lldb_private {
18 /// \class NativeProcessELF
19 /// Abstract class that extends \a NativeProcessProtocol with ELF specific
20 /// logic. Meant to be subclassed by ELF based NativeProcess* implementations.
21 class NativeProcessELF : public NativeProcessProtocol {
22 using NativeProcessProtocol::NativeProcessProtocol;
25 template <typename T> struct ELFLinkMap {
33 llvm::Optional<uint64_t> GetAuxValue(enum AuxVector::EntryType type);
35 lldb::addr_t GetSharedLibraryInfoAddress() override;
37 template <typename ELF_EHDR, typename ELF_PHDR, typename ELF_DYN>
38 lldb::addr_t GetELFImageInfoAddress();
40 std::unique_ptr<AuxVector> m_aux_vector;
41 llvm::Optional<lldb::addr_t> m_shared_library_info_addr;
44 } // namespace lldb_private