Lines Matching refs:memory_
37 DwarfSection::DwarfSection(Memory* memory) : memory_(memory) {} in DwarfSection()
72 memory_.set_cur_offset(offset); in GetCieFromOffset()
85 if (!memory_.ReadBytes(&length32, sizeof(length32))) { in FillInCieHeader()
87 last_error_.address = memory_.cur_offset(); in FillInCieHeader()
93 if (!memory_.ReadBytes(&length64, sizeof(length64))) { in FillInCieHeader()
95 last_error_.address = memory_.cur_offset(); in FillInCieHeader()
99 cie->cfa_instructions_end = memory_.cur_offset() + length64; in FillInCieHeader()
103 if (!memory_.ReadBytes(&cie_id, sizeof(cie_id))) { in FillInCieHeader()
105 last_error_.address = memory_.cur_offset(); in FillInCieHeader()
115 cie->cfa_instructions_end = memory_.cur_offset() + length32; in FillInCieHeader()
119 if (!memory_.ReadBytes(&cie_id, sizeof(cie_id))) { in FillInCieHeader()
121 last_error_.address = memory_.cur_offset(); in FillInCieHeader()
135 if (!memory_.ReadBytes(&cie->version, sizeof(cie->version))) { in FillInCie()
137 last_error_.address = memory_.cur_offset(); in FillInCie()
150 if (!memory_.ReadBytes(&aug_value, 1)) { in FillInCie()
152 last_error_.address = memory_.cur_offset(); in FillInCie()
160 memory_.set_cur_offset(memory_.cur_offset() + 1); in FillInCie()
163 if (!memory_.ReadBytes(&cie->segment_size, 1)) { in FillInCie()
165 last_error_.address = memory_.cur_offset(); in FillInCie()
171 if (!memory_.ReadULEB128(&cie->code_alignment_factor)) { in FillInCie()
173 last_error_.address = memory_.cur_offset(); in FillInCie()
178 if (!memory_.ReadSLEB128(&cie->data_alignment_factor)) { in FillInCie()
180 last_error_.address = memory_.cur_offset(); in FillInCie()
187 if (!memory_.ReadBytes(&return_address_register, 1)) { in FillInCie()
189 last_error_.address = memory_.cur_offset(); in FillInCie()
193 } else if (!memory_.ReadULEB128(&cie->return_address_register)) { in FillInCie()
195 last_error_.address = memory_.cur_offset(); in FillInCie()
200 cie->cfa_instructions_offset = memory_.cur_offset(); in FillInCie()
205 if (!memory_.ReadULEB128(&aug_length)) { in FillInCie()
207 last_error_.address = memory_.cur_offset(); in FillInCie()
210 cie->cfa_instructions_offset = memory_.cur_offset() + aug_length; in FillInCie()
215 if (!memory_.ReadBytes(&cie->lsda_encoding, 1)) { in FillInCie()
217 last_error_.address = memory_.cur_offset(); in FillInCie()
223 if (!memory_.ReadBytes(&encoding, 1)) { in FillInCie()
225 last_error_.address = memory_.cur_offset(); in FillInCie()
228 memory_.set_pc_offset(pc_offset_); in FillInCie()
229 if (!memory_.ReadEncodedValue<AddressType>(encoding, &cie->personality_handler)) { in FillInCie()
231 last_error_.address = memory_.cur_offset(); in FillInCie()
236 if (!memory_.ReadBytes(&cie->fde_address_encoding, 1)) { in FillInCie()
238 last_error_.address = memory_.cur_offset(); in FillInCie()
254 memory_.set_cur_offset(offset); in GetFdeFromOffset()
265 if (!memory_.ReadBytes(&length32, sizeof(length32))) { in FillInFdeHeader()
267 last_error_.address = memory_.cur_offset(); in FillInFdeHeader()
274 if (!memory_.ReadBytes(&length64, sizeof(length64))) { in FillInFdeHeader()
276 last_error_.address = memory_.cur_offset(); in FillInFdeHeader()
279 fde->cfa_instructions_end = memory_.cur_offset() + length64; in FillInFdeHeader()
282 if (!memory_.ReadBytes(&value64, sizeof(value64))) { in FillInFdeHeader()
284 last_error_.address = memory_.cur_offset(); in FillInFdeHeader()
298 fde->cfa_instructions_end = memory_.cur_offset() + length32; in FillInFdeHeader()
301 if (!memory_.ReadBytes(&value32, sizeof(value32))) { in FillInFdeHeader()
303 last_error_.address = memory_.cur_offset(); in FillInFdeHeader()
321 uint64_t cur_offset = memory_.cur_offset(); in FillInFde()
333 memory_.set_cur_offset(cur_offset); in FillInFde()
336 memory_.set_pc_offset(load_bias_); in FillInFde()
337 bool valid = memory_.ReadEncodedValue<AddressType>(cie->fde_address_encoding, &fde->pc_start); in FillInFde()
340 memory_.set_pc_offset(0); in FillInFde()
341 if (!valid || !memory_.ReadEncodedValue<AddressType>(cie->fde_address_encoding, &fde->pc_end)) { in FillInFde()
343 last_error_.address = memory_.cur_offset(); in FillInFde()
351 if (!memory_.ReadULEB128(&aug_length)) { in FillInFde()
353 last_error_.address = memory_.cur_offset(); in FillInFde()
356 uint64_t cur_offset = memory_.cur_offset(); in FillInFde()
358 memory_.set_pc_offset(pc_offset_); in FillInFde()
359 if (!memory_.ReadEncodedValue<AddressType>(cie->lsda_encoding, &fde->lsda_address)) { in FillInFde()
361 last_error_.address = memory_.cur_offset(); in FillInFde()
366 memory_.set_cur_offset(cur_offset + aug_length); in FillInFde()
368 fde->cfa_instructions_offset = memory_.cur_offset(); in FillInFde()
378 DwarfOp<AddressType> op(&memory_, regular_memory); in EvalExpression()
556 DwarfCfa<AddressType> cfa(&memory_, fde); in GetCfaLocationInfo()
578 DwarfCfa<AddressType> cfa(&memory_, fde); in Log()
600 memory_.clear_func_offset(); in Init()
601 memory_.clear_text_offset(); in Init()
602 memory_.set_cur_offset(offset); in Init()
603 memory_.set_data_offset(offset); in Init()
659 memory_.set_cur_offset(next_entries_offset_); in GetNextCieOrFde()
661 if (!memory_.ReadBytes(&value32, sizeof(value32))) { in GetNextCieOrFde()
663 last_error_.address = memory_.cur_offset(); in GetNextCieOrFde()
673 if (!memory_.ReadBytes(&value64, sizeof(value64))) { in GetNextCieOrFde()
675 last_error_.address = memory_.cur_offset(); in GetNextCieOrFde()
679 next_entries_offset_ = memory_.cur_offset() + value64; in GetNextCieOrFde()
681 if (!memory_.ReadBytes(&value64, sizeof(value64))) { in GetNextCieOrFde()
683 last_error_.address = memory_.cur_offset(); in GetNextCieOrFde()
694 next_entries_offset_ = memory_.cur_offset() + value32; in GetNextCieOrFde()
697 if (!memory_.ReadBytes(&value32, sizeof(value32))) { in GetNextCieOrFde()
699 last_error_.address = memory_.cur_offset(); in GetNextCieOrFde()
765 if (next_entries_offset_ < memory_.cur_offset()) { in GetFdes()
797 if (next_entries_offset_ < memory_.cur_offset()) { in GetFdeFromPc()