aboutsummaryrefslogtreecommitdiff
path: root/include/disas
diff options
context:
space:
mode:
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>2015-06-23 20:57:32 -0700
committerAndreas Färber <afaerber@suse.de>2015-07-09 15:20:40 +0200
commit2de295c544dda8680a82fe465c92d236d49c4d4f (patch)
tree8e5273078512ce4e69b263e7a16975aa8a128128 /include/disas
parent691b9572e337f2d74b4b527c3dc76f542c6a5734 (diff)
disas: Add print_insn to disassemble info
Add the print_insn pointer to the disassemble info structure. This is to prepare for QOMification support, where a QOM CPU hook function will be responsible for setting the print_insn() function. Add this function to the existing struct to consolidate such that only the one struct needs to be passed to the new QOM API. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/disas')
-rw-r--r--include/disas/bfd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/disas/bfd.h b/include/disas/bfd.h
index 8bd703cb1a..a112e9c8c3 100644
--- a/include/disas/bfd.h
+++ b/include/disas/bfd.h
@@ -313,6 +313,11 @@ typedef struct disassemble_info {
void (*print_address_func)
(bfd_vma addr, struct disassemble_info *info);
+ /* Function called to print an instruction. The function is architecture
+ * specific.
+ */
+ int (*print_insn)(bfd_vma addr, struct disassemble_info *info);
+
/* Function called to determine if there is a symbol at the given ADDR.
If there is, the function returns 1, otherwise it returns 0.
This is used by ports which support an overlay manager where
@@ -463,6 +468,7 @@ int generic_symbol_at_address(bfd_vma, struct disassemble_info *);
(INFO).read_memory_func = buffer_read_memory, \
(INFO).memory_error_func = perror_memory, \
(INFO).print_address_func = generic_print_address, \
+ (INFO).print_insn = NULL, \
(INFO).symbol_at_address_func = generic_symbol_at_address, \
(INFO).flags = 0, \
(INFO).bytes_per_line = 0, \