Commit ede9a8a6 authored by Markus Armbruster's avatar Markus Armbruster
Browse files

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 6e2d864e, v0.14.0) to get us closer to binutils, but I
figure the fork is too distant to make this worthwhile.

Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20190417191805.28198-18-armbru@redhat.com>
parent 3979fca4
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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 */

include/qemu/fprintf-fn.h

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
/*
 * Typedef for fprintf-alike function pointers.
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 */

#ifndef QEMU_FPRINTF_FN_H
#define QEMU_FPRINTF_FN_H

typedef int (*fprintf_function)(FILE *f, const char *fmt, ...)
    GCC_FMT_ATTR(2, 3);

#endif