Closed KelvinChung2000 closed 1 year ago
Have you got a binary with this? Support can be added, but an autotest would be nice.
Yes. I got this when I compiled a benchmark with the riscv64-unknown-linux-gnu-gcc
compiler.
bfs.zip
A PR is waiting, but in the meantime, here is a monkeypatch for the issue:
import elftools.dwarf.dwarf_expr
def monkeypatch():
elftools.dwarf.dwarf_expr.DW_OP_name2opcode['DW_OP_GNU_uninit'] = 0xf0
elftools.dwarf.dwarf_expr.DW_OP_opcode2name[0xf0] = 'DW_OP_GNU_uninit'
old_init_dispatch_table = elftools.dwarf.dwarf_expr._init_dispatch_table
def _init_dispatch_table_patch(structs):
table = old_init_dispatch_table(structs)
table[0xf0] = lambda s: []
return table
elftools.dwarf.dwarf_expr._init_dispatch_table = _init_dispatch_table_patch
Source: https://github.com/sevaa/dwex/blob/master/dwex/patch.py
@KelvinChung2000 thanks for the report. Can this be closed following @sevaa 's #511 ?
The
DWARFExprParser.parse_expr
fails to parse with key0xf0
, which isDW_OP_GNU_uninit
.