diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-09-12 10:47:33 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2020-10-03 04:25:14 -0500 |
commit | f343346b147b8871d628defa4fe038eb1a2e4e08 (patch) | |
tree | 9659a5f01a79cccacf9c7e0dcaf48dbfcb252ecc /include/disas | |
parent | a4038a00ed94d3752044edae8f285772a244a887 (diff) | |
download | qemu-f343346b147b8871d628defa4fe038eb1a2e4e08.zip qemu-f343346b147b8871d628defa4fe038eb1a2e4e08.tar.gz qemu-f343346b147b8871d628defa4fe038eb1a2e4e08.tar.bz2 |
disas: Split out capstone code to disas/capstone.c
There is nothing target-specific about this code, so it
can be added to common_ss. This also requires that the
base capstone dependency be added to common_ss, so that
we get the correct include paths added to CFLAGS.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/disas')
-rw-r--r-- | include/disas/dis-asm.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h index 6b45aa9..2164762 100644 --- a/include/disas/dis-asm.h +++ b/include/disas/dis-asm.h @@ -460,6 +460,18 @@ int print_insn_riscv32 (bfd_vma, disassemble_info*); int print_insn_riscv64 (bfd_vma, disassemble_info*); int print_insn_rx(bfd_vma, disassemble_info *); +#ifdef CONFIG_CAPSTONE +bool cap_disas_target(disassemble_info *info, uint64_t pc, size_t size); +bool cap_disas_host(disassemble_info *info, void *code, size_t size); +bool cap_disas_monitor(disassemble_info *info, uint64_t pc, int count); +bool cap_disas_plugin(disassemble_info *info, uint64_t pc, size_t size); +#else +# define cap_disas_target(i, p, s) false +# define cap_disas_host(i, p, s) false +# define cap_disas_monitor(i, p, c) false +# define cap_disas_plugin(i, p, c) false +#endif /* CONFIG_CAPSTONE */ + #ifndef ATTRIBUTE_UNUSED #define ATTRIBUTE_UNUSED __attribute__((unused)) #endif |