-
-
Notifications
You must be signed in to change notification settings - Fork 339
Expand file tree
/
Copy pathIBinary.h
More file actions
39 lines (31 loc) · 885 Bytes
/
IBinary.h
File metadata and controls
39 lines (31 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* Copyright (C) 2006 - 2025 Evan Teran <evan.teran@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef IBINARY_H_20070718_
#define IBINARY_H_20070718_
#include "API.h"
#include "Types.h"
#include <memory>
#include <vector>
class IRegion;
class EDB_EXPORT IBinary {
public:
struct Header {
edb::address_t address;
size_t size;
// TODO(eteran): maybe label/type/etc...
};
public:
virtual ~IBinary() = default;
public:
[[nodiscard]] virtual bool native() const = 0;
[[nodiscard]] virtual edb::address_t entryPoint() = 0;
[[nodiscard]] virtual size_t headerSize() const = 0;
[[nodiscard]] virtual const void *header() const = 0;
[[nodiscard]] virtual std::vector<Header> headers() const = 0;
public:
using create_func_ptr_t = std::unique_ptr<IBinary> (*)(const std::shared_ptr<IRegion> &);
};
#endif