[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-4.1 36/36] include: Move fprintf_function to disa
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL for-4.1 36/36] include: Move fprintf_function to disas/ |
Date: |
Thu, 18 Apr 2019 22:51:35 +0200 |
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 <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
---
include/disas/dis-asm.h | 5 +++--
include/qemu/fprintf-fn.h | 14 --------------
2 files changed, 3 insertions(+), 16 deletions(-)
delete mode 100644 include/qemu/fprintf-fn.h
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 */
diff --git a/include/qemu/fprintf-fn.h b/include/qemu/fprintf-fn.h
deleted file mode 100644
index 9068a960b3..0000000000
--- a/include/qemu/fprintf-fn.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * 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
--
2.17.2
- [Qemu-devel] [PULL for-4.1 00/36] Error reporting & monitor patches for 2019-04-18, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 04/36] util/error: do not free error on error_abort, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 02/36] log: Make glib logging go through QEMU, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 01/36] qemu-io: Use error_[gs]et_progname(), Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 13/36] vl: Make -machine $TYPE, help and -accel help print to stdout, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 03/36] error: Fix error_report_err(), warn_report_err() hint printing, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 08/36] mips/boston: Report errors with error_report(), not error_printf(), Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 12/36] s390x/kvm: Report warnings with warn_report(), not error_printf(), Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 07/36] loader-fit: Wean off error_printf(), Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 36/36] include: Move fprintf_function to disas/,
Markus Armbruster <=
- [Qemu-devel] [PULL for-4.1 14/36] monitor error: Make printf()-like functions return a value, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 22/36] tcg: Simplify how dump_opcount_info() prints, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 32/36] qemu-print: New qemu_fprintf(), qemu_vfprintf(), Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 11/36] vfio: Report warnings with warn_report(), not error_printf(), Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 20/36] include: Include fprintf-fn.h only where needed, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 19/36] monitor: Simplify how -device/device_add print help, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 30/36] target/i386: Simplify how x86_cpu_dump_local_apic_state() prints, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 34/36] monitor: Clean up how monitor_disas() funnels output to monitor, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 17/36] char: Make -chardev help print to stdout, Markus Armbruster, 2019/04/18
- [Qemu-devel] [PULL for-4.1 28/36] target: Simplify how the TARGET_cpu_list() print, Markus Armbruster, 2019/04/18