aboutsummaryrefslogtreecommitdiff
path: root/opcodes/disassemble.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-02-05 11:25:24 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-04-04 13:10:52 +0100
commit49d31dc98e3f4bb15553bab9d903c542287446d4 (patch)
treeb17343477222d36703b63121d675bd467d6342de /opcodes/disassemble.c
parent60a3da00bd5407f07d64dff82a4dae98230dfaac (diff)
downloadgdb-49d31dc98e3f4bb15553bab9d903c542287446d4.zip
gdb-49d31dc98e3f4bb15553bab9d903c542287446d4.tar.gz
gdb-49d31dc98e3f4bb15553bab9d903c542287446d4.tar.bz2
opcodes/riscv: implement style support in the disassembler
Update the RISC-V disassembler to supply style information. This allows objdump to apply syntax highlighting to the disassembler output (when the appropriate command line flag is used). Ignoring colours, there should be no other user visible changes in the output of the disassembler in either objdump or gdb. opcodes/ChangeLog: * disassembler.c (disassemble_init_for_target): Set created_styled_output for riscv. * riscv-dis.c: Changed throughout to use fprintf_styled_func instead of fprintf_func.
Diffstat (limited to 'opcodes/disassemble.c')
-rw-r--r--opcodes/disassemble.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index 7325394..894c97a 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -706,6 +706,7 @@ disassemble_init_for_target (struct disassemble_info * info)
#ifdef ARCH_riscv
case bfd_arch_riscv:
info->symbol_is_valid = riscv_symbol_is_valid;
+ info->created_styled_output = true;
break;
#endif
#ifdef ARCH_wasm32