LIEF: Library to Instrument Executable Formats Version 0.16.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_ABSTRACT_FUNCTION_H
17#define LIEF_ABSTRACT_FUNCTION_H
30 public:
enum class FLAGS : uint32_t {
33 NONE = 0, CONSTRUCTOR = 1 << 0,
65 Function(
const std::string& name, uint64_t address) :
68 Function(
const std::string& name, uint64_t address, FLAGS flags) :
69 Function(name, address)
85 Function&
add(FLAGS f) {
88 flags_ = (FLAGS)((uint32_t)flags_ | (uint32_t)f);
91 bool has(FLAGS f)
const {
94 return ((uint32_t)flags_ & (uint32_t)f) != 0;
107 void accept(Visitor& visitor)
const override;
112 FLAGS flags_ = FLAGS::NONE;
Class that represents a function in the binary.
Definition Abstract/Function.hpp:29
void address(uint64_t address)
Definition Abstract/Function.hpp:103
~Function() override=default
bool has(FLAGS f) const
Check if the function has the given flag.
Definition Abstract/Function.hpp:93
Function(const std::string &name, uint64_t address)
Definition Abstract/Function.hpp:65
void accept(Visitor &visitor) const override
std::vector< FLAGS > flags_list() const
List of FLAGS.
FLAGS
Flags used to characterize the semantic of the function.
Definition Abstract/Function.hpp:32
Function(const std::string &name)
Definition Abstract/Function.hpp:59
FLAGS flags() const
Definition Abstract/Function.hpp:82
friend std::ostream & operator<<(std::ostream &os, const Function &entry)
Function(uint64_t address)
Definition Abstract/Function.hpp:62
Function(const Function &)=default
Function & operator=(const Function &)=default
Function(const std::string &name, uint64_t address, FLAGS flags)
Definition Abstract/Function.hpp:68
uint64_t address() const
Address of the current function. For functions that are set with the FLAGS::IMPORTED flag,...
Definition Abstract/Function.hpp:99
Function & add(FLAGS f)
Add a flag to the current function.
Definition Abstract/Function.hpp:87
This class represents a symbol in an executable format.
Definition Abstract/Symbol.hpp:28
#define ENABLE_BITMASK_OPERATORS(X)
Definition enums.hpp:24
LIEF namespace.
Definition Abstract/Binary.hpp:36
const char * to_string(Binary::VA_TYPES e)
#define LIEF_API
Definition visibility.h:41