From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45574 invoked by alias); 11 Aug 2015 19:40:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 45565 invoked by uid 89); 11 Aug 2015 19:40:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 11 Aug 2015 19:40:16 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B367628FC0; Tue, 11 Aug 2015 15:40:14 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id O-suSXs4PELR; Tue, 11 Aug 2015 15:40:14 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 81D9D28F69; Tue, 11 Aug 2015 15:40:14 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 0211C46992; Tue, 11 Aug 2015 12:40:12 -0700 (PDT) Date: Tue, 11 Aug 2015 19:40:00 -0000 From: Joel Brobecker To: Yao Qi Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH 2/7] New regs_info for aarch32 Message-ID: <20150811194012.GA19956@adacore.com> References: <1438355801-25798-1-git-send-email-yao.qi@linaro.org> <1438355801-25798-3-git-send-email-yao.qi@linaro.org> <55BF7383.5030304@redhat.com> <55BF980F.5010306@gmail.com> <55BFA0AD.5000408@redhat.com> <86614ve5z5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <86614ve5z5.fsf@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-08/txt/msg00247.txt.bz2 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1479 Hi Yao, > 2015-08-04 Yao Qi > > * configure.srv (srv_tgtobj): Add linux-aarch32-low.o. > * linux-aarch32-low.c: New file. > * linux-aarch32-low.h: New file. > * linux-arm-low.c (arm_fill_gregset): Move it to > linux-aarch32-low.c. > (arm_store_gregset): Likewise. > (arm_fill_vfpregset): Call arm_fill_vfpregset_num > (arm_store_vfpregset): Call arm_store_vfpregset_num. > (arm_arch_setup): Check if PTRACE_GETREGSET works. > (regs_info): Rename to regs_info_arm. > (arm_regs_info): Return regs_info_aarch32 if > have_ptrace_getregset is 1 and target description is > arm_with_neon or arm_with_vfpv3. > (initialize_low_arch): Don't call init_registers_arm_with_neon. > Call initialize_low_arch_aarch32 instead. This patch is causing a GDBserver build failure on some versions of GNU/Linux (the version we support is fairly old), but also on relatively recent versions of Android as well. The problem is that NT_ARM_VFP is not always defined. I tried the attached patch, which I was a bit dubious about, but seems to work ("info float" does not error out, and print a series of zeros), but I'm not sure whether I'm exercising the code at all. The other alternative I was thinking of was perhaps to just #ifndef out the entry in aarch32_regsets that needs NT_ARM_VFP. It might be cleaner, but I haven't tried it. gdb/gdbserver/ChangeLog: * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined. WDYT? Thanks! -- Joel --9jxsPFA5p3P2qPhR Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gdbserver-linux-aarch32-low-build-failure-when-NT_AR.patch" Content-length: 1204 >From 6c3cc336283db01c11a89bdbfdb70cc90a7b5d3e Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 11 Aug 2015 15:28:19 -0400 Subject: [PATCH] gdbserver/linux-aarch32-low: build failure when NT_ARM_VFP not defined On some older versions of GNU/Linux, gdbserver now fails to build due to an undefined reference to NT_ARM_VFP. Same issue on Android, where this macros is undefined until Android API level 21 (Android 5.0 "Lollipop"). This patch modifies linux-aarch32-low.c to define that macros when not already defined. gdb/gdbserver/ChangeLog: * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined. --- gdb/gdbserver/linux-aarch32-low.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdb/gdbserver/linux-aarch32-low.c b/gdb/gdbserver/linux-aarch32-low.c index 7f3b985..5876b13 100644 --- a/gdb/gdbserver/linux-aarch32-low.c +++ b/gdb/gdbserver/linux-aarch32-low.c @@ -27,6 +27,12 @@ #include #endif +/* Some older versions of GNU/Linux and Android do not define + the following macros. */ +#ifndef NT_ARM_VFP +#define NT_ARM_VFP 0x400 +#endif + /* Collect GP registers from REGCACHE to buffer BUF. */ void -- 2.1.4 --9jxsPFA5p3P2qPhR--