I am writing a tool which uses libbfd
and libopcodes
in x86-32 and x86-64 Linux to perform disassembly. The problem is that whilst I am able to get
Unfortunately, as of binutils libopcodes 2.22, insn_type
is not filled in on either i386 or x86_64. The only widespread supported architectures are MIPS, Sparc, and the Cell’s SPU. This is still true as of current CVS HEAD.
It's hard to prove that something does not exist, but for instance, in the Sparc disassembler source you can see several occurrences of insn_type
being set, for instance info->insn_type = dis_branch
, whereas in the i386 disassembler source there are no occurrences of insn_type
nor any of the values it would be expected to have (dis_branch
, dis_nonbranch
etc.).
Checking for all the libopcodes files that support insn_type
you get:
opcodes/mips-dis.c
opcodes/spu-dis.c
opcodes/microblaze-dis.c
opcodes/cris-dis.c
opcodes/sparc-dis.c
opcodes/mmix-dis.c