aboutsummaryrefslogtreecommitdiff
path: root/include/opcode/riscv.h
diff options
context:
space:
mode:
authorNelson Chu <nelson.chu@sifive.com>2020-06-02 09:44:13 +0800
committerNelson Chu <nelson.chu@sifive.com>2020-06-03 09:20:59 +0800
commit44730156af5f411d2c47af22558e7bd84dc4fcea (patch)
tree063920ff99e17f347f29225127366a795594f653 /include/opcode/riscv.h
parent721276a249df7be8fdda2bc18c70beb5752e439e (diff)
downloadgdb-44730156af5f411d2c47af22558e7bd84dc4fcea.zip
gdb-44730156af5f411d2c47af22558e7bd84dc4fcea.tar.gz
gdb-44730156af5f411d2c47af22558e7bd84dc4fcea.tar.bz2
RISC-V: Fix the error when building RISC-V linux native gdbserver.
The original report is as follow, https://sourceware.org/pipermail/binutils/2020-June/111383.html Inlcude the bfd.h in the include/opcode/riscv.h may cause gdbserver fail to build. I just want to use the `bfd_boolean` in the opcodes/riscv-opc.c, but I didn't realize this cause the build failed. Fortunately, I can also use the `int` as the function return types just like others in the opcodes/riscv-opc.c. include/ * opcode/riscv.h: Remove #include "bfd.h". And change the return types of riscv_get_isa_spec_class and riscv_get_priv_spec_class from bfd_boolean to int. opcodes/ * riscv-opc.c (riscv_get_isa_spec_class): Change bfd_boolean to int. (riscv_get_priv_spec_class): Likewise.
Diffstat (limited to 'include/opcode/riscv.h')
-rw-r--r--include/opcode/riscv.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/opcode/riscv.h b/include/opcode/riscv.h
index feeaa6e..fecf410 100644
--- a/include/opcode/riscv.h
+++ b/include/opcode/riscv.h
@@ -24,7 +24,6 @@
#include "riscv-opc.h"
#include <stdlib.h>
#include <stdint.h>
-#include "bfd.h"
typedef uint64_t insn_t;
@@ -490,9 +489,9 @@ extern const struct riscv_opcode riscv_opcodes[];
extern const struct riscv_opcode riscv_insn_types[];
extern const struct riscv_ext_version riscv_ext_version_table[];
-extern bfd_boolean
+extern int
riscv_get_isa_spec_class (const char *, enum riscv_isa_spec_class *);
-extern bfd_boolean
+extern int
riscv_get_priv_spec_class (const char *, enum riscv_priv_spec_class *);
extern const char *
riscv_get_priv_spec_name (enum riscv_priv_spec_class);