Lines Matching refs:memory_
38 DwarfSection::DwarfSection(Memory* memory) : memory_(memory) {} in DwarfSection()
76 memory_.set_data_offset(entries_offset_); in GetCieFromOffset()
77 memory_.set_cur_offset(offset); in GetCieFromOffset()
90 if (!memory_.ReadBytes(&length32, sizeof(length32))) { in FillInCieHeader()
92 last_error_.address = memory_.cur_offset(); in FillInCieHeader()
98 if (!memory_.ReadBytes(&length64, sizeof(length64))) { in FillInCieHeader()
100 last_error_.address = memory_.cur_offset(); in FillInCieHeader()
104 cie->cfa_instructions_end = memory_.cur_offset() + length64; in FillInCieHeader()
108 if (!memory_.ReadBytes(&cie_id, sizeof(cie_id))) { in FillInCieHeader()
110 last_error_.address = memory_.cur_offset(); in FillInCieHeader()
120 cie->cfa_instructions_end = memory_.cur_offset() + length32; in FillInCieHeader()
124 if (!memory_.ReadBytes(&cie_id, sizeof(cie_id))) { in FillInCieHeader()
126 last_error_.address = memory_.cur_offset(); in FillInCieHeader()
140 if (!memory_.ReadBytes(&cie->version, sizeof(cie->version))) { in FillInCie()
142 last_error_.address = memory_.cur_offset(); in FillInCie()
155 if (!memory_.ReadBytes(&aug_value, 1)) { in FillInCie()
157 last_error_.address = memory_.cur_offset(); in FillInCie()
165 memory_.set_cur_offset(memory_.cur_offset() + 1); in FillInCie()
168 if (!memory_.ReadBytes(&cie->segment_size, 1)) { in FillInCie()
170 last_error_.address = memory_.cur_offset(); in FillInCie()
176 if (!memory_.ReadULEB128(&cie->code_alignment_factor)) { in FillInCie()
178 last_error_.address = memory_.cur_offset(); in FillInCie()
183 if (!memory_.ReadSLEB128(&cie->data_alignment_factor)) { in FillInCie()
185 last_error_.address = memory_.cur_offset(); in FillInCie()
192 if (!memory_.ReadBytes(&return_address_register, 1)) { in FillInCie()
194 last_error_.address = memory_.cur_offset(); in FillInCie()
198 } else if (!memory_.ReadULEB128(&cie->return_address_register)) { in FillInCie()
200 last_error_.address = memory_.cur_offset(); in FillInCie()
205 cie->cfa_instructions_offset = memory_.cur_offset(); in FillInCie()
210 if (!memory_.ReadULEB128(&aug_length)) { in FillInCie()
212 last_error_.address = memory_.cur_offset(); in FillInCie()
215 cie->cfa_instructions_offset = memory_.cur_offset() + aug_length; in FillInCie()
220 if (!memory_.ReadBytes(&cie->lsda_encoding, 1)) { in FillInCie()
222 last_error_.address = memory_.cur_offset(); in FillInCie()
228 if (!memory_.ReadBytes(&encoding, 1)) { in FillInCie()
230 last_error_.address = memory_.cur_offset(); in FillInCie()
233 memory_.set_pc_offset(pc_offset_); in FillInCie()
234 if (!memory_.ReadEncodedValue<AddressType>(encoding, &cie->personality_handler)) { in FillInCie()
236 last_error_.address = memory_.cur_offset(); in FillInCie()
241 if (!memory_.ReadBytes(&cie->fde_address_encoding, 1)) { in FillInCie()
243 last_error_.address = memory_.cur_offset(); in FillInCie()
262 memory_.set_data_offset(entries_offset_); in GetFdeFromOffset()
263 memory_.set_cur_offset(offset); in GetFdeFromOffset()
274 if (!memory_.ReadBytes(&length32, sizeof(length32))) { in FillInFdeHeader()
276 last_error_.address = memory_.cur_offset(); in FillInFdeHeader()
283 if (!memory_.ReadBytes(&length64, sizeof(length64))) { in FillInFdeHeader()
285 last_error_.address = memory_.cur_offset(); in FillInFdeHeader()
288 fde->cfa_instructions_end = memory_.cur_offset() + length64; in FillInFdeHeader()
291 if (!memory_.ReadBytes(&value64, sizeof(value64))) { in FillInFdeHeader()
293 last_error_.address = memory_.cur_offset(); in FillInFdeHeader()
307 fde->cfa_instructions_end = memory_.cur_offset() + length32; in FillInFdeHeader()
310 if (!memory_.ReadBytes(&value32, sizeof(value32))) { in FillInFdeHeader()
312 last_error_.address = memory_.cur_offset(); in FillInFdeHeader()
330 uint64_t cur_offset = memory_.cur_offset(); in FillInFde()
342 memory_.set_cur_offset(cur_offset); in FillInFde()
345 memory_.set_pc_offset(section_bias_); in FillInFde()
346 bool valid = memory_.ReadEncodedValue<AddressType>(cie->fde_address_encoding, &fde->pc_start); in FillInFde()
349 memory_.set_pc_offset(0); in FillInFde()
350 if (!valid || !memory_.ReadEncodedValue<AddressType>(cie->fde_address_encoding, &fde->pc_end)) { in FillInFde()
352 last_error_.address = memory_.cur_offset(); in FillInFde()
360 if (!memory_.ReadULEB128(&aug_length)) { in FillInFde()
362 last_error_.address = memory_.cur_offset(); in FillInFde()
365 uint64_t cur_offset = memory_.cur_offset(); in FillInFde()
367 memory_.set_pc_offset(pc_offset_); in FillInFde()
368 if (!memory_.ReadEncodedValue<AddressType>(cie->lsda_encoding, &fde->lsda_address)) { in FillInFde()
370 last_error_.address = memory_.cur_offset(); in FillInFde()
375 memory_.set_cur_offset(cur_offset + aug_length); in FillInFde()
377 fde->cfa_instructions_offset = memory_.cur_offset(); in FillInFde()
387 DwarfOp<AddressType> op(&memory_, regular_memory); in EvalExpression()
580 DwarfCfa<AddressType> cfa(&memory_, fde, arch); in GetCfaLocationInfo()
603 DwarfCfa<AddressType> cfa(&memory_, fde, arch); in Log()
624 memory_.clear_func_offset(); in Init()
625 memory_.clear_text_offset(); in Init()
626 memory_.set_cur_offset(offset); in Init()
639 memory_.set_data_offset(entries_offset_); in GetNextCieOrFde()
640 memory_.set_cur_offset(next_entries_offset); in GetNextCieOrFde()
642 if (!memory_.ReadBytes(&value32, sizeof(value32))) { in GetNextCieOrFde()
644 last_error_.address = memory_.cur_offset(); in GetNextCieOrFde()
654 if (!memory_.ReadBytes(&value64, sizeof(value64))) { in GetNextCieOrFde()
656 last_error_.address = memory_.cur_offset(); in GetNextCieOrFde()
660 next_entries_offset = memory_.cur_offset() + value64; in GetNextCieOrFde()
662 if (!memory_.ReadBytes(&value64, sizeof(value64))) { in GetNextCieOrFde()
664 last_error_.address = memory_.cur_offset(); in GetNextCieOrFde()
675 next_entries_offset = memory_.cur_offset() + value32; in GetNextCieOrFde()
678 if (!memory_.ReadBytes(&value32, sizeof(value32))) { in GetNextCieOrFde()
680 last_error_.address = memory_.cur_offset(); in GetNextCieOrFde()