* Exectued changes for IAR Embedded Workbench output .elf File
* applied review findings
raw_value=raw_value,
offset=attr_offset)
+ # count and then consume any null termination bytes to avoid wrong die size calculation
+ zero_term = 0
+ with preserve_stream_pos(self.stream):
+ while True:
+ b = self.stream.read(1)
+ if b == 0:
+ zero_term += 1
+ else:
+ break
+ if zero_term > 0:
+ # there was at least one zero termination -> consume all of them
+ self.stream.read(zero_term)
+
self.size = self.stream.tell() - self.offset
def _translate_attr_value(self, form, raw_value):
DW_FORM_flag_present = StaticField('', 0),
DW_FORM_sec_offset = self.Dwarf_offset(''),
DW_FORM_exprloc = self._make_block_struct(self.Dwarf_uleb128),
- DW_FORM_ref_sig8 = self.Dwarf_offset(''),
+ DW_FORM_ref_sig8 = self.Dwarf_uint64(''),
DW_FORM_GNU_strp_alt=self.Dwarf_offset(''),
DW_FORM_GNU_ref_alt=self.Dwarf_offset(''),