From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 827 invoked by alias); 4 Dec 2016 11:11:32 -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 818 invoked by uid 89); 4 Dec 2016 11:11:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f182.google.com Received: from mail-qt0-f182.google.com (HELO mail-qt0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 04 Dec 2016 11:11:20 +0000 Received: by mail-qt0-f182.google.com with SMTP id n6so291025048qtd.1 for ; Sun, 04 Dec 2016 03:11:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GAUuMV3OKyIUHFBWcXURr8ra+VGee+a8eaXfnE8qzis=; b=KsVotFSxCkO0znEpcifaAVOErdFWBV0E/84rx/YK3yAunJPrIAxPjdBvqh67MLJw6f 7Wxz44Sw0poxwqVPZd8mN1yJOnIiVtZAUBjyxFyAoxQeTdQuZYSs1ROmP1Vzx7W5OppC 21CzCJjIX2t9PAYzcEtMLtuNc+dLCB9wVU8gjXFIBCkUinJD9iiTzl0s/y+IKsHrULu2 82/VK3m3ChTRapwlLxxrzCh8yFCiZCBxvp1a4eIbZWOcpkR0VgXup+hIcrUDPNzOqXQh 65DhMAlodlCEcROKdLyNQZjnh8aHN4ZakZxA9K1PyytcEitbCQG54HTdeIEqnAo8hJr0 UNmw== X-Gm-Message-State: AKaTC037iwBOa0yLZ9tLAcCn7uWE7gewBv9KV5Yic7awFebj3tB8vLt6/ukKT16EmbFsCiDh2NbNHVrmf+f6Mg== X-Received: by 10.237.61.210 with SMTP id j18mr45903667qtf.137.1480849879109; Sun, 04 Dec 2016 03:11:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.144.11 with HTTP; Sun, 4 Dec 2016 03:11:18 -0800 (PST) In-Reply-To: References: <20161202214613.GA54717@beast> <20161202224952.panaxwmmrx4emord@localhost> From: Yao Qi Date: Sun, 04 Dec 2016 11:11:00 -0000 Message-ID: Subject: Re: [PATCH] Fix PTRACE_GETREGSET failure for compat inferiors on arm64 To: Kees Cook Cc: "gdb-patches@sourceware.org" , Brian Murray , Matthias Klose Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00126.txt.bz2 On Fri, Dec 2, 2016 at 11:08 PM, Kees Cook wrote: >>> diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c >>> index d11bdc6..2126cd7 100644 >>> --- a/gdb/arm-linux-nat.c >>> +++ b/gdb/arm-linux-nat.c >>> @@ -384,17 +384,19 @@ arm_linux_fetch_inferior_registers (struct target= _ops *ops, >>> if (-1 =3D=3D regno) >>> { >>> fetch_regs (regcache); >>> - fetch_fpregs (regcache); >> >> We should only call fetch_fpregs if tdep->have_fpa_registers is true. > > I couldn't determine how this was handled. What actually sets > org.gnu.gdb.arm.fpa in tdesc? I found gdb/features/arm/arm-fpa.xml and > seems to imply it's always included with arm? I wasn't able to follow, > but it seemed like _having_ VFP was a indicator that FPA wasn't used. > What is I meant is that instead of calling fetch_fpregs unconditionally, we call fetch_fpregs if tdep->have_fpa_registers is true, like this, if (tdep->have_fpa_registers) fetch_fpregs (regcache); IOW, we only fetch FPA registers if we know FPA registers are available, as described in target description. --=20 Yao (=E9=BD=90=E5=B0=A7)