[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 17/17] include: Move fprintf_function to disas/
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 17/17] include: Move fprintf_function to disas/ |
Date: |
Sat, 13 Apr 2019 06:59:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
"Dr. David Alan Gilbert" <address@hidden> writes:
> * Markus Armbruster (address@hidden) wrote:
>> 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>
>
> I'm OKish with this - although it's the only place we currently
> use it, it's a fairly common concept, so I'm not sure it's worth
> banishing.
I found 15 uses, ranging from questionable to outright bad. I
eliminated 14, and cleaned up one. I guess that has made me skeptical
on the chances of this type getting used sanely.
Banishing the type to where it came from reduces the temptation.
Perhaps that's not actually necessary now we've gotten rid of the bad
examples.
Should a sane use come up, we can simply revert this patch.
> Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Thanks!
- [Qemu-devel] [PATCH 12/17] qom/cpu: Simplify how CPUClass::dump_statistics() prints, (continued)
- [Qemu-devel] [PATCH 12/17] qom/cpu: Simplify how CPUClass::dump_statistics() prints, Markus Armbruster, 2019/04/11
- [Qemu-devel] [PATCH 11/17] target/i386: Simplify how x86_cpu_dump_local_apic_state() prints, Markus Armbruster, 2019/04/11
- [Qemu-devel] [PATCH 15/17] monitor: Clean up how monitor_disas() funnels output to monitor, Markus Armbruster, 2019/04/11
- [Qemu-devel] [PATCH 07/17] block/qapi: Clean up how we print to monitor or stdout, Markus Armbruster, 2019/04/11
- [Qemu-devel] [PATCH 17/17] include: Move fprintf_function to disas/, Markus Armbruster, 2019/04/11
- [Qemu-devel] [PATCH 08/17] memory: Clean up how mtree_info() prints, Markus Armbruster, 2019/04/11
- [Qemu-devel] [PATCH 16/17] disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h, Markus Armbruster, 2019/04/11
- [Qemu-devel] [PATCH 10/17] target: Clean up how the dump_mmu() print, Markus Armbruster, 2019/04/11
- [Qemu-devel] [PATCH 09/17] target: Simplify how the TARGET_cpu_list() print, Markus Armbruster, 2019/04/11