retdec
elf_core.h
Go to the documentation of this file.
1 
7 #ifndef FILEINFO_FILE_INFORMATION_FILE_INFORMATION_TYPES_ELF_CORE_H
8 #define FILEINFO_FILE_INFORMATION_FILE_INFORMATION_TYPES_ELF_CORE_H
9 
10 #include <string>
11 #include <vector>
12 
13 namespace retdec {
14 namespace fileinfo {
15 
16 using AuxVectorEntry = std::pair<std::string, std::uint64_t>;
17 
22 {
23  public:
24  std::uint64_t address;
25  std::uint64_t size;
26  std::uint64_t page;
27  std::string path;
28 };
29 
33 class ElfCore
34 {
35  private:
36  std::vector<AuxVectorEntry> auxVec;
37  std::vector<FileMapEntry> fileMap;
38 
39  public:
42  bool hasAuxVector() const;
43  bool hasFileMap() const;
45 
48  const std::vector<AuxVectorEntry>& getAuxVector() const;
49  const std::vector<FileMapEntry>& getFileMap() const;
51 
54  void addFileMapEntry(const FileMapEntry& entry);
55  void addAuxVectorEntry(
56  const std::string& name,
57  const std::uint64_t& value);
59 };
60 
61 } // namespace fileinfo
62 } // namespace retdec
63 
64 #endif
Definition: elf_core.h:34
const std::vector< FileMapEntry > & getFileMap() const
Definition: elf_core.cpp:27
bool hasAuxVector() const
Definition: elf_core.cpp:12
const std::vector< AuxVectorEntry > & getAuxVector() const
Definition: elf_core.cpp:22
std::vector< FileMapEntry > fileMap
Definition: elf_core.h:37
void addAuxVectorEntry(const std::string &name, const std::uint64_t &value)
Definition: elf_core.cpp:37
bool hasFileMap() const
Definition: elf_core.cpp:17
void addFileMapEntry(const FileMapEntry &entry)
Definition: elf_core.cpp:32
std::vector< AuxVectorEntry > auxVec
Definition: elf_core.h:36
Definition: elf_core.h:22
std::string path
Definition: elf_core.h:27
std::uint64_t page
Definition: elf_core.h:26
std::uint64_t address
Definition: elf_core.h:24
std::uint64_t size
Definition: elf_core.h:25
std::pair< std::string, std::uint64_t > AuxVectorEntry
Definition: elf_core.h:16
Definition: archive_wrapper.h:19