]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
RISC-V: Fix display of partial instructions
authorCharlie Jenkins <charlie@rivosinc.com>
Tue, 7 Jan 2025 21:35:44 +0000 (13:35 -0800)
committerNelson Chu <nelson@rivosinc.com>
Thu, 9 Jan 2025 02:09:16 +0000 (10:09 +0800)
commit6a04e8230707d8bbfaae8bd4c13f5c3018337971
treee2960261e3ac23159ed0553988b70e8d37cb0d5f
parent162502b593989171fafe5e6e8d92d5a626aa7568
RISC-V: Fix display of partial instructions

As of commit e43d8768d909 ("RISC-V: Fix disassemble fetch fail return
value.") partial instructions are no longer displayed by objdump. While
that commit fixed the behavior of print_insn_riscv() returning the
arbitrary status value upon failure, it caused the behavior of dumping
instructions to change. Allow partial instructions to be displayed once
again and only return -1 if no part of the instruction was able to be
displayed.

Fixes: e43d8768d909 ("RISC-V: Fix disassemble fetch fail return
value.")

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Acked-By: Andrew Burgess <aburgess@redhat.com>
opcodes/riscv-dis.c