forked from jeremy-rifkin/cpptrace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjit_objects.hpp
More file actions
31 lines (27 loc) · 745 Bytes
/
jit_objects.hpp
File metadata and controls
31 lines (27 loc) · 745 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
#ifndef JIT_OBJECTS_HPP
#define JIT_OBJECTS_HPP
#include "binary/elf.hpp"
#include "binary/mach-o.hpp"
#include "cpptrace/forward.hpp"
#include "utils/optional.hpp"
#include "platform/platform.hpp"
CPPTRACE_BEGIN_NAMESPACE
namespace detail {
void register_jit_object(const char*, std::size_t);
void unregister_jit_object(const char*);
void clear_all_jit_objects();
#if IS_LINUX || IS_APPLE
#if IS_LINUX
using jit_object_type = elf;
#elif IS_APPLE
using jit_object_type = mach_o;
#endif
struct jit_object_lookup_result {
jit_object_type& object;
frame_ptr base;
};
optional<jit_object_lookup_result> lookup_jit_object(frame_ptr pc);
#endif
}
CPPTRACE_END_NAMESPACE
#endif