How to get instruction information from libopcodes?
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 libopcodes to disassemble, I am unable to get any instruction information. For the purposes of demonstration, I have made a minimal example which reproduces my issue. The program should disassemble itself from entry point to the first RET / RETQ . The code is a bit hacked up with globals and error checking has been omitted for brevity, etc. but should illustrate the issue clearly. #include <bfd.h> #include <dis-asm.h> #include <stdbool.h> #include