16#ifndef LIEF_ELF_CORE_FILE_H
17#define LIEF_ELF_CORE_FILE_H
22#include "LIEF/visibility.h"
24#include "LIEF/ELF/Note.hpp"
37 uint64_t file_ofs = 0;
41 std::ostream& operator<<(std::ostream& os,
const entry_t& entry);
44 using files_t = std::vector<entry_t>;
45 using iterator = files_t::iterator;
46 using const_iterator = files_t::const_iterator;
52 std::unique_ptr<Note>
clone()
const override {
53 return std::unique_ptr<Note>(
new CoreFile(*
this));
67 return files_.begin();
74 const_iterator begin()
const {
75 return files_.begin();
78 const_iterator end()
const {
82 void files(
const files_t& file);
84 void dump(std::ostream& os)
const override;
85 void accept(Visitor& visitor)
const override;
87 static bool classof(
const Note* note) {
88 return note->type() == Note::TYPE::CORE_FILE;
91 ~CoreFile()
override =
default;
94 std::ostream& operator<<(std::ostream& os,
const CoreFile& note) {
101 LIEF_LOCAL
void read_files();
104 LIEF_LOCAL
void write_files();
107 uint64_t page_size_ = 0;
108 ARCH arch_ = ARCH::NONE;
109 Header::CLASS class_ = Header::CLASS::NONE;
Class representing a core NT_FILE which describes the mapped files of the process.
Definition CoreFile.hpp:31
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition CoreFile.hpp:52
const files_t & files() const
Coredump file entries.
Definition CoreFile.hpp:62
uint64_t count() const
Number of coredump file entries.
Definition CoreFile.hpp:57
Class which represents an ELF note. This class can be instantiated using the static Note::create func...
Definition Note.hpp:36
std::vector< uint8_t > description_t
Container used to handle the description data.
Definition Note.hpp:43
ARCH
Machine architectures See current registered ELF machine architectures at: http://www....
Definition ELF/enums.hpp:30
LIEF namespace.
Definition Abstract/Binary.hpp:32
Core file entry.
Definition CoreFile.hpp:34
std::string path
Path of mapped file.
Definition CoreFile.hpp:38