16#ifndef LIEF_ELF_CORE_PRSTATUS_H
17#define LIEF_ELF_CORE_PRSTATUS_H
52 uint16_t reserved = 0;
71 EBX = 0, ECX, EDX, ESI, EDI, EBP, EAX,
72 DS, ES, FS, GS, ORIG_EAX, EIP, CS, EFLAGS, ESP, SS,
78 R15 = 0, R14, R13, R12, RBP, RBX, R11, R10,
79 R9, R8, RAX, RCX, RDX, RSI, RDI, ORIG_RAX,
80 RIP, CS, EFLAGS, RSP, SS,
86 R0 = 0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15,
93 X0 = 0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15,
94 X16, X17, X18, X19, X20, X21, X22, X23, X24, X25, X26, X27, X28, X29, X30,
103 Note(std::move(name),
TYPE::CORE_PRSTATUS, type, std::move(description),
""),
104 arch_(arch), class_(cls)
107 std::unique_ptr<Note>
clone()
const override {
108 return std::unique_ptr<CorePrStatus>(
new CorePrStatus(*
this));
173 void dump(std::ostream& os)
const override;
177 return note->
type() == Note::TYPE::CORE_PRSTATUS;
189 ARCH arch_ = ARCH::NONE;
Class representing core PrPsInfo object.
Definition CorePrStatus.hpp:35
ok_error_t set(Registers::AARCH64 reg, uint64_t value)
result< uint64_t > get(Registers::X86 reg) const
Get the value for the given X86 register or return an error.
result< uint64_t > operator[](Registers::ARM reg) const
Definition CorePrStatus.hpp:165
ok_error_t set(Registers::X86 reg, uint64_t value)
void dump(std::ostream &os) const override
pr_status_t status() const
Return the pr_status_t structure.
void status(const pr_status_t &status)
~CorePrStatus() override=default
friend std::ostream & operator<<(std::ostream &os, const CorePrStatus ¬e)
Definition CorePrStatus.hpp:183
ok_error_t set(Registers::X86_64 reg, uint64_t value)
ok_error_t set(Registers::ARM reg, uint64_t value)
std::unique_ptr< Note > clone() const override
Clone the current note and keep its polymorphic type.
Definition CorePrStatus.hpp:107
void accept(Visitor &visitor) const override
result< uint64_t > get(Registers::X86_64 reg) const
Get the value for the given X86_64 register or return an error.
result< uint64_t > get(Registers::AARCH64 reg) const
Get the value for the given AARCH64 register or return an error.
static bool classof(const Note *note)
Definition CorePrStatus.hpp:176
CorePrStatus(ARCH arch, Header::CLASS cls, std::string name, uint32_t type, description_t description)
Definition CorePrStatus.hpp:101
result< uint64_t > operator[](Registers::X86 reg) const
Definition CorePrStatus.hpp:157
result< uint64_t > get(Registers::ARM reg) const
Get the value for the given ARM register or return an error.
std::vector< uint64_t > register_values() const
A list of the register values. This list is guarantee to be as long as the Registers::ARM::_COUNT or ...
result< uint64_t > return_value() const
The value of the register that holds the return value according to the calling convention.
result< uint64_t > operator[](Registers::AARCH64 reg) const
Definition CorePrStatus.hpp:169
result< uint64_t > operator[](Registers::X86_64 reg) const
Definition CorePrStatus.hpp:161
result< uint64_t > sp() const
The stack pointer or an error if not found.
result< uint64_t > pc() const
The program counter or an error if not found.
ARCH architecture() const
Definition CorePrStatus.hpp:115
Class which represents an ELF note. This class can be instantiated using the static Note::create func...
Definition Note.hpp:39
std::vector< uint8_t > description_t
Container used to handle the description data.
Definition Note.hpp:46
TYPE
LIEF representation of the ELF NT_ values.
Definition Note.hpp:49
TYPE type() const
Return the type of the note. This type does not match the NT_ type value. For accessing the original ...
Definition Note.hpp:195
Definition Visitor.hpp:224
const char * to_string(DynamicEntry::TAG e)
ARCH
Machine architectures See current registered ELF machine architectures at: http://www....
Definition ELF/enums.hpp:30
LIEF namespace.
Definition Abstract/Binary.hpp:32
result< ok_t > ok_error_t
Opaque structure that is used by LIEF to avoid writing result<void> f(...). Instead,...
Definition errors.hpp:108
tl::expected< T, lief_errors > result
Wrapper that contains an Object (T) or an error.
Definition errors.hpp:74
Definition CorePrStatus.hpp:68
ARM
Register for the ARM architecture (ARCH::ARM).
Definition CorePrStatus.hpp:85
X86_64
Register for the x86-64 architecture (ARCH::X86_64).
Definition CorePrStatus.hpp:77
AARCH64
Register for the AARCH64 architecture (ARCH::AARCH64).
Definition CorePrStatus.hpp:92
X86
Register for the x86 architecture (ARCH::I386).
Definition CorePrStatus.hpp:70
Definition CorePrStatus.hpp:48
siginfo_t info
Definition CorePrStatus.hpp:49
timeval_t cstime
Definition CorePrStatus.hpp:65
timeval_t stime
Definition CorePrStatus.hpp:63
timeval_t utime
Definition CorePrStatus.hpp:62
timeval_t cutime
Definition CorePrStatus.hpp:64
Definition CorePrStatus.hpp:37
Definition CorePrStatus.hpp:43
#define LIEF_API
Definition visibility.h:41