summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-11-19 13:58:29 +0000
committerYao Qi <yao.qi@linaro.org>2015-11-19 14:01:03 +0000
commit6c1c9a8bbd2aa3fbc627525b452e7dbbaf40efc5 (patch)
tree8bf68c9327d8f7e2084677cd7b07f44a3064954b
parent9caa33114e9195b0d28ad46d21a11a8f838ffb07 (diff)
downloadbinutils-gdb-6c1c9a8bbd2aa3fbc627525b452e7dbbaf40efc5.tar.gz
Define enum out of the scope of struct
This patch moves the enum definition out of the scope of struct, and fixes the following error. gdb/gdbserver/linux-aarch64-low.c:681:18: error: 'OPERAND_REGISTER' was not declared in this scope operand.type = OPERAND_REGISTER; ^ gdb/gdbserver: 2015-11-19 Yao Qi <yao.qi@linaro.org> * linux-aarch64-low.c (enum aarch64_operand_type): New. (struct aarch64_operand): Move enum out.
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/linux-aarch64-low.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 0e3d6736365..183f8a9b57f 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,10 @@
2015-11-19 Yao Qi <yao.qi@linaro.org>
+ * linux-aarch64-low.c (enum aarch64_operand_type): New.
+ (struct aarch64_operand): Move enum out.
+
+2015-11-19 Yao Qi <yao.qi@linaro.org>
+
* linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
struct user_fpsimd_state *.
(aarch64_store_fpregset): Likewise.
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index a145f80bb4a..7cd9b77e1a3 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -614,17 +614,20 @@ enum aarch64_condition_codes
LE = 0xd,
};
+enum aarch64_operand_type
+{
+ OPERAND_IMMEDIATE,
+ OPERAND_REGISTER,
+};
+
/* Representation of an operand. At this time, it only supports register
and immediate types. */
struct aarch64_operand
{
/* Type of the operand. */
- enum
- {
- OPERAND_IMMEDIATE,
- OPERAND_REGISTER,
- } type;
+ enum aarch64_operand_type type;
+
/* Value of the operand according to the type. */
union
{