LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
PE
exceptions_info
RuntimeFunctionAArch64.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
* Copyright 2017 - 2026 Quarkslab
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#ifndef LIEF_PE_RUNTIME_FUNCTION_AARCH64_H
17
#define LIEF_PE_RUNTIME_FUNCTION_AARCH64_H
18
19
#include <memory>
20
21
#include "
LIEF/visibility.h
"
22
#include "
LIEF/PE/ExceptionInfo.hpp
"
23
24
namespace
LIEF
{
25
class
BinaryStream
;
26
27
namespace
PE
{
28
class
Parser
;
29
38
class
LIEF_API
RuntimeFunctionAArch64
:
public
ExceptionInfo
{
39
public
:
40
enum class
PACKED_FLAGS
{
41
UNPACKED = 0,
42
PACKED = 1,
43
PACKED_FRAGMENT = 2,
44
RESERVED = 3,
45
};
46
47
static
std::unique_ptr<RuntimeFunctionAArch64>
48
parse
(
Parser
& ctx,
BinaryStream
& strm);
49
50
RuntimeFunctionAArch64
(uint64_t RVA, uint32_t
length
,
PACKED_FLAGS
flag
) :
51
ExceptionInfo
(
ARCH
::ARM64, RVA),
52
length_(
length
),
53
flag_(
flag
)
54
{}
55
56
RuntimeFunctionAArch64
(
const
RuntimeFunctionAArch64
&) =
default
;
57
RuntimeFunctionAArch64
&
operator=
(
const
RuntimeFunctionAArch64
&) =
default
;
58
59
RuntimeFunctionAArch64
(
RuntimeFunctionAArch64
&&) =
default
;
60
RuntimeFunctionAArch64
&
operator=
(
RuntimeFunctionAArch64
&&) =
default
;
61
62
std::unique_ptr<ExceptionInfo>
clone
()
const override
{
63
return
std::unique_ptr<RuntimeFunctionAArch64>(
new
RuntimeFunctionAArch64
(*
this
));
64
}
65
67
uint32_t
length
()
const
{
68
return
length_;
69
}
70
72
PACKED_FLAGS
flag
()
const
{
73
return
flag_;
74
}
75
77
uint32_t
rva_end
()
const
{
78
return
rva_start
() +
length
();
79
}
80
81
82
std::string
to_string
()
const override
;
83
84
static
bool
classof
(
const
ExceptionInfo
* info) {
85
return
info->arch() ==
ExceptionInfo::ARCH::ARM64
;
86
}
87
88
~RuntimeFunctionAArch64
() =
default
;
89
90
protected
:
91
uint32_t length_ = 0;
92
PACKED_FLAGS
flag_ =
PACKED_FLAGS::RESERVED
;
93
};
94
95
}
96
}
97
98
99
#endif
ExceptionInfo.hpp
LIEF::BinaryStream
Class that is used to a read stream of data from different sources.
Definition
BinaryStream.hpp:33
LIEF::PE::ExceptionInfo::rva_start
uint32_t rva_start() const
Function start address.
Definition
ExceptionInfo.hpp:70
LIEF::PE::ExceptionInfo::ARCH
ARCH
Arch discriminator for the subclasses.
Definition
ExceptionInfo.hpp:50
LIEF::PE::ExceptionInfo::ARCH::ARM64
@ ARM64
Definition
ExceptionInfo.hpp:52
LIEF::PE::ExceptionInfo::ExceptionInfo
ExceptionInfo()=delete
LIEF::PE::Parser
Main interface to parse PE binaries. In particular the static functions: Parser::parse should be used...
Definition
PE/Parser.hpp:52
LIEF::PE::RuntimeFunctionAArch64::RuntimeFunctionAArch64
RuntimeFunctionAArch64(const RuntimeFunctionAArch64 &)=default
LIEF::PE::RuntimeFunctionAArch64::classof
static bool classof(const ExceptionInfo *info)
Definition
RuntimeFunctionAArch64.hpp:84
LIEF::PE::RuntimeFunctionAArch64::operator=
RuntimeFunctionAArch64 & operator=(RuntimeFunctionAArch64 &&)=default
LIEF::PE::RuntimeFunctionAArch64::length
uint32_t length() const
Length of the function in bytes.
Definition
RuntimeFunctionAArch64.hpp:67
LIEF::PE::RuntimeFunctionAArch64::operator=
RuntimeFunctionAArch64 & operator=(const RuntimeFunctionAArch64 &)=default
LIEF::PE::RuntimeFunctionAArch64::PACKED_FLAGS
PACKED_FLAGS
Definition
RuntimeFunctionAArch64.hpp:40
LIEF::PE::RuntimeFunctionAArch64::PACKED_FLAGS::RESERVED
@ RESERVED
Definition
RuntimeFunctionAArch64.hpp:44
LIEF::PE::RuntimeFunctionAArch64::to_string
std::string to_string() const override
LIEF::PE::RuntimeFunctionAArch64::parse
static std::unique_ptr< RuntimeFunctionAArch64 > parse(Parser &ctx, BinaryStream &strm)
LIEF::PE::RuntimeFunctionAArch64::flag
PACKED_FLAGS flag() const
Flag describing the format the unwind data.
Definition
RuntimeFunctionAArch64.hpp:72
LIEF::PE::RuntimeFunctionAArch64::~RuntimeFunctionAArch64
~RuntimeFunctionAArch64()=default
LIEF::PE::RuntimeFunctionAArch64::RuntimeFunctionAArch64
RuntimeFunctionAArch64(uint64_t RVA, uint32_t length, PACKED_FLAGS flag)
Definition
RuntimeFunctionAArch64.hpp:50
LIEF::PE::RuntimeFunctionAArch64::rva_end
uint32_t rva_end() const
Function end address.
Definition
RuntimeFunctionAArch64.hpp:77
LIEF::PE::RuntimeFunctionAArch64::RuntimeFunctionAArch64
RuntimeFunctionAArch64(RuntimeFunctionAArch64 &&)=default
LIEF::PE::RuntimeFunctionAArch64::clone
std::unique_ptr< ExceptionInfo > clone() const override
Definition
RuntimeFunctionAArch64.hpp:62
LIEF::PE
Namespace related to the LIEF's PE module.
Definition
Abstract/Header.hpp:32
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0