This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/4] Define enum out of the scope of struct
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 19 Nov 2015 13:01:01 +0000
- Subject: [PATCH 3/4] Define enum out of the scope of struct
- Authentication-results: sourceware.org; auth=none
- References: <1447938062-29624-1-git-send-email-yao dot qi at linaro dot org>
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.
---
gdb/gdbserver/linux-aarch64-low.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index a145f80..7cd9b77 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
{
--
1.9.1