From ede9a8a656c992deecce45f8175985dd81cc6be9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 17 Apr 2019 21:18:05 +0200 Subject: include: Move fprintf_function to disas/ The previous commits have eliminated fprintf_function outside disassemblers, simplifying code and cleaning up the ugly type-punning fprintf_function seems to attract. Move fprintf_function to include/disas/dis-asm.h to reduce the temptation to abuse it. I considered renaming it to fprintf_ftype (reverting that part of commit 6e2d864edf5, v0.14.0) to get us closer to binutils, but I figure the fork is too distant to make this worthwhile. Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert Message-Id: <20190417191805.28198-18-armbru@redhat.com> --- include/disas/dis-asm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/disas') diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h index 41b61c85f9..9240ec32c2 100644 --- a/include/disas/dis-asm.h +++ b/include/disas/dis-asm.h @@ -9,8 +9,6 @@ #ifndef DISAS_BFD_H #define DISAS_BFD_H -#include "qemu/fprintf-fn.h" - typedef void *PTR; typedef uint64_t bfd_vma; typedef int64_t bfd_signed_vma; @@ -243,6 +241,9 @@ typedef struct symbol_cache_entry } udata; } asymbol; +typedef int (*fprintf_function)(FILE *f, const char *fmt, ...) + GCC_FMT_ATTR(2, 3); + enum dis_insn_type { dis_noninsn, /* Not a valid instruction */ dis_nonbranch, /* Not a branch instruction */ -- cgit v1.2.3