aboutsummaryrefslogtreecommitdiff
path: root/disas
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2024-03-05 12:10:02 +0000
committerAlex Bennée <alex.bennee@linaro.org>2024-03-06 12:35:51 +0000
commit83b4613ba835d6ed6dcee3001c7fc56dc7b21685 (patch)
treebf4e62ecf576a388d0db187045d746848aa7e9b3 /disas
parent3077be254538b9fbb4bd5a7a9c60058b4580eb01 (diff)
disas: introduce show_opcodes
For plugins we don't expect the raw opcodes in the disassembly. We already deal with this by hand crafting our capstone call but for other diassemblers we need a flag. Introduce show_opcodes which defaults to off. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240305121005.3528075-27-alex.bennee@linaro.org>
Diffstat (limited to 'disas')
-rw-r--r--disas/disas.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/disas/disas.c b/disas/disas.c
index 0d2d06c2ec..17170d291e 100644
--- a/disas/disas.c
+++ b/disas/disas.c
@@ -299,6 +299,7 @@ void disas(FILE *out, const void *code, size_t size)
s.info.buffer = code;
s.info.buffer_vma = (uintptr_t)code;
s.info.buffer_length = size;
+ s.info.show_opcodes = true;
if (s.info.cap_arch >= 0 && cap_disas_host(&s.info, code, size)) {
return;