From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44732 invoked by alias); 8 Jun 2018 14:37:36 -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 44705 invoked by uid 89); 8 Jun 2018 14:37:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=age, HContent-Transfer-Encoding:8bit X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Jun 2018 14:37:33 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w58EbRgi025955 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 8 Jun 2018 10:37:31 -0400 Received: by simark.ca (Postfix, from userid 112) id 2F5F01EF29; Fri, 8 Jun 2018 10:37:27 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 2D7071E0A9; Fri, 8 Jun 2018 10:37:26 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 08 Jun 2018 14:37:00 -0000 From: Simon Marchi To: Alan Hayward Cc: GDB Patches , Simon Marchi , nd Subject: Re: [PATCH v2 02/10] Add Aarch64 SVE Linux headers In-Reply-To: <9FBBFBF2-9363-49AA-8BC3-20E4E0AFBFED@arm.com> References: <20180606151629.36602-1-alan.hayward@arm.com> <20180606151629.36602-3-alan.hayward@arm.com> <9FBBFBF2-9363-49AA-8BC3-20E4E0AFBFED@arm.com> Message-ID: <5862fa9c22cc48d86256686e74d60f20@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 8 Jun 2018 14:37:27 +0000 X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00215.txt.bz2 On 2018-06-08 10:13, Alan Hayward wrote: > (Moved review to correct thread) > Thanks for the reviews. > >> On 7 Jun 2018, at 21:18, Simon Marchi >> wrote: >> >> Hi Alan, >> >> Just some quick comments. >> >> I get this when building on x86-64 with --enable-targets=all: > > Hmm.. I had lost that flag from my build script. I Re-added it, and > reproduced the issues. > >> >> CXX aarch64-tdep.o >> In file included from >> /home/emaisin/src/binutils-gdb/gdb/nat/aarch64-sve-linux-ptrace.h:29:0, >> from >> /home/emaisin/src/binutils-gdb/gdb/aarch64-tdep.c:61: >> /home/emaisin/src/binutils-gdb/gdb/nat/aarch64-linux-sigcontext.h:19:22: >> error: field ‘head’ has incomplete type ‘_aarch64_ctx’ >> struct _aarch64_ctx head; >> ^ >> /home/emaisin/src/binutils-gdb/gdb/nat/aarch64-linux-sigcontext.h:19:9: >> note: forward declaration of ‘struct _aarch64_ctx’ >> struct _aarch64_ctx head; >> ^ >> >> First, we should not include "nat/aarch64-sve-linux-ptrace.h" (a file >> that only makes >> sense when building on AArch64) in aarch64-tdep.c, a file built on all >> architecture >> when including the support for AArch64 debugging. It looks like >> aarch64-tdep.c >> needs sve_vq_from_vl. Maybe that definition could be moved to arch/, >> which can be >> included in aarch64-tdep.c. >> > > I had put it in there because I wanted to try and make it a complete > block > copied from Linux. The issue makes sense, so I’ve updated to restore > sve_vq_from_vl/sve_vl_from_vq back to arch/aarch64.h and removed it > from > nat/aarch64-linux-sigcontext.h > > >> Then, is the _aarch64_ctx structure guaranteed to be defined on older >> AArch64 kernels >> or should we include it too? > > > _aarch64_ctx is part of the standard aarch64 signal handling. A quick > git blame gives > me 2012 - which is roughly the age of aarch64. So, it should always be > defined. > > > Updated patch below. Checked it builds (with other sve patches) on: > X86 all-targets > Aarch64 Linux 4.10 (pre sve headers) ubuntu 16.04 > Aarch64 Linux 4.15 (with sve headers) ubuntu 18.04 > > Are you ok with the new version? The code looks good to me, thanks. I am still unsure about the licensing side of it, let me ask the FSF people about it, I'll come back to you when it's done. I hope it won't take too long! Simon