def callFrameInfoExtract(filename: str):
with open(filename, "rb") as f:
elffile = ELFFile(f)
if not elffile.has_dwarf_info():
logging.debug(" file has no DWARF info")
raise
dwarfInfo = elffile.get_dwarf_info()
cfiEntry = dwarfInfo.CFI_entries()
for i in cfiEntry:
if isinstance(i, FDE):
print(i)
print(i.get_decoded())
break
This is the binary used. It is a RISC-V binary.
fft.zip
The following is the CIE/FDE information:
and the following
DecodedCallFrameTable
is generated:we can see that the restore on reg8 is lost.
the code I used to get the
DecodedCallFrameTable
This is the binary used. It is a RISC-V binary. fft.zip