[libopcodes] Switching manually between print_insn_arm and print_insn_thumb(16|32)
Emmanuel Fleury
fleury@labri.fr
Mon Aug 18 08:46:00 GMT 2014
Hello,
I am writing a small disassembler for ARM based on libopcodes. For now,
I managed to get the full ARM mode to be operational (32 bits
instructions).
But, once I get the disassembler_ftype (I simplified the code):
abfd->arch_info = bfd_scan_arch ("arm");
this->disassembler_fn = disassembler(abfd);
How can I switch to thumb mode on demand ?
I would like to get access to print_insn_thumb(16|32) when needed.
I also have a second question which is somehow a bit similar. I would
like to be able to decide what endianness is selected in the abdf
structure. I tried to access directly to the field and set it:
(abfd)->xvec->byteorder = BFD_ENDIAN_BIG;
But, the xvec created by new_bfd() seems to be read-only. Is there a way
to work around and be able to modify endianness on-the-fly ?
Regards
--
Emmanuel Fleury
Computer Science is no more about computers than astronomy is
about telescopes.
-- Edsger Dijkstra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20140818/432b7fdd/attachment.sig>
More information about the Binutils
mailing list