From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119679 invoked by alias); 11 Jun 2018 02:47:52 -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 119495 invoked by uid 89); 11 Jun 2018 02:47:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Full X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Jun 2018 02:47:16 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id E23FD1E02D; Sun, 10 Jun 2018 22:47:14 -0400 (EDT) Subject: Re: [PATCH v2 10/10] Remove reg2 section from Aarch64 SVE cores To: Alan Hayward , gdb-patches@sourceware.org Cc: nd@arm.com References: <20180606151629.36602-1-alan.hayward@arm.com> <20180606151629.36602-11-alan.hayward@arm.com> From: Simon Marchi Message-ID: Date: Mon, 11 Jun 2018 02:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180606151629.36602-11-alan.hayward@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-06/txt/msg00271.txt.bz2 On 2018-06-06 11:16 AM, Alan Hayward wrote: > reg2 sections in SVE binaries will cause gdb to segfault on loading > due to miscalculating the register size. > > For now, simply remove reg2 from SVE core files. This results in > core files without any vector/float register. Full core support > for SVE will come in a later set of patches. > > 2018-06-06 Alan Hayward > > gdb/ > * aarch64-linux-tdep.c > (aarch64_linux_iterate_over_regset_sections): Check for SVE. > --- > gdb/aarch64-linux-tdep.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c > index 96dc8a1132..b05bb49ae8 100644 > --- a/gdb/aarch64-linux-tdep.c > +++ b/gdb/aarch64-linux-tdep.c > @@ -227,10 +227,13 @@ aarch64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, > void *cb_data, > const struct regcache *regcache) > { > + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > + > cb (".reg", AARCH64_LINUX_SIZEOF_GREGSET, &aarch64_linux_gregset, > NULL, cb_data); > - cb (".reg2", AARCH64_LINUX_SIZEOF_FPREGSET, &aarch64_linux_fpregset, > - NULL, cb_data); > + if (!tdep->has_sve ()) > + cb (".reg2", AARCH64_LINUX_SIZEOF_FPREGSET, &aarch64_linux_fpregset, > + NULL, cb_data); > } > > /* Implement the "core_read_description" gdbarch method. SVE not yet > IIUC, this doesn't remove existing features? If a program was using the neon registers, they will still be available? If so, this LGTM. Simon