#include <image_snapshot.h>
Definition at line 39 of file image_snapshot.h.
◆ Image() [1/2]
dart::Image::Image |
( |
const void * |
raw_memory | ) |
|
|
inlineexplicit |
◆ Image() [2/2]
dart::Image::Image |
( |
const uword |
raw_memory | ) |
|
|
inlineexplicit |
Definition at line 43 of file image_snapshot.h.
44 : raw_memory_(raw_memory),
45 snapshot_size_(FieldValue(raw_memory, HeaderField::ImageSize)),
46 extra_info_(ExtraInfo(raw_memory_, snapshot_size_)) {
48 }
static constexpr bool IsAligned(T x, uintptr_t alignment, uintptr_t offset=0)
static constexpr intptr_t kObjectStartAlignment
◆ bss()
uword * dart::Image::bss |
( |
| ) |
const |
Definition at line 68 of file image_snapshot.cc.
68 {
69#if defined(DART_PRECOMPILED_RUNTIME)
70 ASSERT(extra_info_ !=
nullptr);
71
72 ASSERT(extra_info_->bss_offset_ != 0);
73
74
75
76 return reinterpret_cast<uword*
>(raw_memory_ + extra_info_->bss_offset_);
77#else
78 return nullptr;
79#endif
80}
◆ build_id()
const uint8_t * dart::Image::build_id |
( |
| ) |
const |
Definition at line 91 of file image_snapshot.cc.
91 {
92#if defined(DART_PRECOMPILED_RUNTIME)
93 ASSERT(extra_info_ !=
nullptr);
94 if (extra_info_->build_id_offset_ != kNoBuildId) {
95 auto const note = reinterpret_cast<elf::Note*>(
96 raw_memory_ + extra_info_->build_id_offset_);
97 return note->data + note->name_size;
98 }
99#endif
100 return nullptr;
101}
◆ build_id_length()
intptr_t dart::Image::build_id_length |
( |
| ) |
const |
Definition at line 103 of file image_snapshot.cc.
103 {
104#if defined(DART_PRECOMPILED_RUNTIME)
105 ASSERT(extra_info_ !=
nullptr);
106 if (extra_info_->build_id_offset_ != kNoBuildId) {
107 auto const note = reinterpret_cast<elf::Note*>(
108 raw_memory_ + extra_info_->build_id_offset_);
109 return note->description_size;
110 }
111#endif
112 return 0;
113}
◆ compiled_to_elf()
bool dart::Image::compiled_to_elf |
( |
| ) |
const |
Definition at line 115 of file image_snapshot.cc.
115 {
116#if defined(DART_PRECOMPILED_RUNTIME)
117 ASSERT(extra_info_ !=
nullptr);
118
119
120
121 return extra_info_->instructions_relocated_address_ != kNoRelocatedAddress;
122#else
123 return false;
124#endif
125}
◆ contains()
bool dart::Image::contains |
( |
uword |
address | ) |
const |
|
inline |
Definition at line 59 of file image_snapshot.h.
59 {
62 }
uword object_size() const
void * object_start() const
◆ instructions_relocated_address()
uword dart::Image::instructions_relocated_address |
( |
| ) |
const |
Definition at line 82 of file image_snapshot.cc.
82 {
83#if defined(DART_PRECOMPILED_RUNTIME)
84 ASSERT(extra_info_ !=
nullptr);
85 return extra_info_->instructions_relocated_address_;
86#else
87 return kNoRelocatedAddress;
88#endif
89}
◆ object_size()
uword dart::Image::object_size |
( |
| ) |
const |
|
inline |
Definition at line 57 of file image_snapshot.h.
57{ return snapshot_size_ - kHeaderSize; }
◆ object_start()
void * dart::Image::object_start |
( |
| ) |
const |
|
inline |
Definition at line 53 of file image_snapshot.h.
53 {
54 return reinterpret_cast<void*>(raw_memory_ + kHeaderSize);
55 }
◆ AssemblyImageWriter
friend class AssemblyImageWriter |
|
friend |
◆ BitsContainer
friend class BitsContainer |
|
friend |
◆ BlobImageWriter
◆ ImageWriter
The documentation for this class was generated from the following files: