diff options
Diffstat (limited to 'libunwindstack/DwarfMemory.cpp')
-rw-r--r-- | libunwindstack/DwarfMemory.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libunwindstack/DwarfMemory.cpp b/libunwindstack/DwarfMemory.cpp index 11806eace..b6e0412e5 100644 --- a/libunwindstack/DwarfMemory.cpp +++ b/libunwindstack/DwarfMemory.cpp | |||
@@ -14,14 +14,17 @@ | |||
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <assert.h> | ||
18 | #include <stdint.h> | 17 | #include <stdint.h> |
19 | 18 | ||
20 | #include <string> | 19 | #include <string> |
21 | 20 | ||
21 | #include <unwindstack/DwarfMemory.h> | ||
22 | #include <unwindstack/Memory.h> | ||
23 | |||
24 | #include "Check.h" | ||
22 | #include "DwarfEncoding.h" | 25 | #include "DwarfEncoding.h" |
23 | #include "DwarfMemory.h" | 26 | |
24 | #include "Memory.h" | 27 | namespace unwindstack { |
25 | 28 | ||
26 | bool DwarfMemory::ReadBytes(void* dst, size_t num_bytes) { | 29 | bool DwarfMemory::ReadBytes(void* dst, size_t num_bytes) { |
27 | if (!memory_->Read(cur_offset_, dst, num_bytes)) { | 30 | if (!memory_->Read(cur_offset_, dst, num_bytes)) { |
@@ -100,8 +103,8 @@ size_t DwarfMemory::GetEncodedSize(uint8_t encoding) { | |||
100 | } | 103 | } |
101 | 104 | ||
102 | bool DwarfMemory::AdjustEncodedValue(uint8_t encoding, uint64_t* value) { | 105 | bool DwarfMemory::AdjustEncodedValue(uint8_t encoding, uint64_t* value) { |
103 | assert((encoding & 0x0f) == 0); | 106 | CHECK((encoding & 0x0f) == 0); |
104 | assert(encoding != DW_EH_PE_aligned); | 107 | CHECK(encoding != DW_EH_PE_aligned); |
105 | 108 | ||
106 | // Handle the encoding. | 109 | // Handle the encoding. |
107 | switch (encoding) { | 110 | switch (encoding) { |
@@ -246,3 +249,5 @@ template size_t DwarfMemory::GetEncodedSize<uint64_t>(uint8_t); | |||
246 | 249 | ||
247 | template bool DwarfMemory::ReadEncodedValue<uint32_t>(uint8_t, uint64_t*); | 250 | template bool DwarfMemory::ReadEncodedValue<uint32_t>(uint8_t, uint64_t*); |
248 | template bool DwarfMemory::ReadEncodedValue<uint64_t>(uint8_t, uint64_t*); | 251 | template bool DwarfMemory::ReadEncodedValue<uint64_t>(uint8_t, uint64_t*); |
252 | |||
253 | } // namespace unwindstack | ||