From patchwork Sun Jan 12 20:23:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 37337 Received: (qmail 31893 invoked by alias); 12 Jan 2020 20:23:06 -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 31838 invoked by uid 89); 12 Jan 2020 20:23:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=ham version=3.3.1 spammy=Arm, HContent-Transfer-Encoding:8bit X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 12 Jan 2020 20:23:04 +0000 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id wIciATzzypsBvIog (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Jan 2020 15:23:02 -0500 (EST) Received: from simark.lan (unknown [192.222.164.54]) by smtp.ebox.ca (Postfix) with ESMTP id 77B42441B21; Sun, 12 Jan 2020 15:23:02 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed 1/2] gdbserver: include linux-arm-tdesc.h in linux-arm-tdesc.c Date: Sun, 12 Jan 2020 15:23:00 -0500 Message-Id: <20200112202301.494123-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-IsSubscribed: yes When building with -Wmissing-declarations, I get: CXX linux-arm-tdesc.o /binutils-gdb/gdb/gdbserver/linux-arm-tdesc.c:29:1: error: no previous declaration for 'const target_desc* arm_linux_read_description(arm_fp_type)' [-Werror=missing-declarations] 29 | arm_linux_read_description (arm_fp_type fp_type) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /binutils-gdb/gdb/gdbserver/linux-arm-tdesc.c:49:1: error: no previous declaration for 'arm_fp_type arm_linux_get_tdesc_fp_type(const target_desc*)' [-Werror=missing-declarations] 49 | arm_linux_get_tdesc_fp_type (const target_desc *tdesc) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Include linux-arm-tdesc.h in linux-arm-tdesc.c to fix it. And because linux-arm-tdesc.h uses the arm_fp_type, it should include arch/arm.h as well. gdb/gdbserver/ChangeLog: * linux-arm-tdesc.c: Include linux-arm-tdesc.h. * linux-arm-tdesc.h: Include arch/arm.h. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/linux-arm-tdesc.c | 3 +++ gdb/gdbserver/linux-arm-tdesc.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 83be63c393e8..67d39beba5b8 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2020-01-12 Simon Marchi + + * linux-arm-tdesc.c: Include linux-arm-tdesc.h. + * linux-arm-tdesc.h: Include arch/arm.h. + 2020-01-12 Simon Marchi * linux-aarch64-low.c (aarch64_write_goto_address): Make static. diff --git a/gdb/gdbserver/linux-arm-tdesc.c b/gdb/gdbserver/linux-arm-tdesc.c index 5af1f90070b8..2c9fac83cd5b 100644 --- a/gdb/gdbserver/linux-arm-tdesc.c +++ b/gdb/gdbserver/linux-arm-tdesc.c @@ -16,6 +16,9 @@ along with this program. If not, see . */ #include "server.h" + +#include "linux-arm-tdesc.h" + #include "tdesc.h" #include "arch/arm.h" #include diff --git a/gdb/gdbserver/linux-arm-tdesc.h b/gdb/gdbserver/linux-arm-tdesc.h index bc782e13320a..5e8c6a3be57a 100644 --- a/gdb/gdbserver/linux-arm-tdesc.h +++ b/gdb/gdbserver/linux-arm-tdesc.h @@ -18,6 +18,8 @@ #ifndef GDBSERVER_LINUX_ARM_TDESC_H #define GDBSERVER_LINUX_ARM_TDESC_H +#include "arch/arm.h" + /* Return the Arm target description with fp registers FP_TYPE. */ const target_desc * arm_linux_read_description (arm_fp_type fp_type);