From 2de295c544dda8680a82fe465c92d236d49c4d4f Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Tue, 23 Jun 2015 20:57:32 -0700 Subject: disas: Add print_insn to disassemble info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- include/disas/bfd.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/disas/bfd.h b/include/disas/bfd.h index 8bd703c..a112e9c 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, \ -- cgit v1.1