'DW_CFA_advance_loc4', 'DW_CFA_advance_loc'):
_assert_FDE_instruction(instr)
factored_offset = instr.args[0] * cie['code_alignment_factor']
- s += ' %s: %s to %08x\n' % (
+ s += ' %s: %s to %016x\n' % (
name, factored_offset, factored_offset + pc)
pc += factored_offset
elif name in ( 'DW_CFA_remember_state', 'DW_CFA_restore_state',
for entry in self._dwarfinfo.CFI_entries():
if isinstance(entry, CIE):
- self._emitline('\n%08x %08x %08x CIE' % (
+ self._emitline('\n%08x %016x %016x CIE' % (
entry.offset, entry['length'], entry['CIE_id']))
self._emitline(' Version: %d' % entry['version'])
self._emitline(' Augmentation: "%s"' % bytes2str(entry['augmentation']))
self._emitline(' Return address column: %d' % entry['return_address_register'])
self._emitline()
else: # FDE
- self._emitline('\n%08x %08x %08x FDE cie=%08x pc=%08x..%08x' % (
+ self._emitline('\n%08x %016x %016x FDE cie=%08x pc=%016x..%016x' % (
entry.offset,
entry['length'],
entry['CIE_pointer'],
for entry in self._dwarfinfo.CFI_entries():
if isinstance(entry, CIE):
- self._emitline('\n%08x %08x %08x CIE "%s" cf=%d df=%d ra=%d' % (
+ self._emitline('\n%08x %016x %016x CIE "%s" cf=%d df=%d ra=%d' % (
entry.offset,
entry['length'],
entry['CIE_id'],
entry['return_address_register']))
ra_regnum = entry['return_address_register']
else: # FDE
- self._emitline('\n%08x %08x %08x FDE cie=%08x pc=%08x..%08x' % (
+ self._emitline('\n%08x %016x %016x FDE cie=%08x pc=%016x..%016x' % (
entry.offset,
entry['length'],
entry['CIE_pointer'],
Some utilities that use libelf to create synthetic ELF files
Also, readelf picked up from a built binutils. Run it with --version to version
-details.
+details. The binary is built on a 64-bit Ubuntu machine.