From patchwork Thu Nov 19 13:01:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 9741 Received: (qmail 121882 invoked by alias); 19 Nov 2015 13:01:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 121773 invoked by uid 89); 19 Nov 2015 13:01:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 19 Nov 2015 13:01:13 +0000 Received: by pacdm15 with SMTP id dm15so80846096pac.3 for ; Thu, 19 Nov 2015 05:01:10 -0800 (PST) X-Received: by 10.68.238.41 with SMTP id vh9mr10431782pbc.147.1447938070376; Thu, 19 Nov 2015 05:01:10 -0800 (PST) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id ag1sm10658559pbc.41.2015.11.19.05.01.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Nov 2015 05:01:09 -0800 (PST) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 3/4] Define enum out of the scope of struct Date: Thu, 19 Nov 2015 13:01:01 +0000 Message-Id: <1447938062-29624-4-git-send-email-yao.qi@linaro.org> In-Reply-To: <1447938062-29624-1-git-send-email-yao.qi@linaro.org> References: <1447938062-29624-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes 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 * 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 {