From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2825 invoked by alias); 28 Apr 2016 14:47:27 -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 2758 invoked by uid 89); 28 Apr 2016 14:47:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=diversion, hour X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 28 Apr 2016 14:47:17 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A75DE494; Thu, 28 Apr 2016 14:47:15 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3SElEcd015666; Thu, 28 Apr 2016 10:47:14 -0400 Subject: Re: [PING][PATCH 2/2] Involve gdbarch in taking DWARF register pieces To: Andreas Arnez , Ulrich Weigand References: <20160415180943.4FEE857EE@oc7340732750.ibm.com> <571134CD.8080507@redhat.com> <5714E6EA.8050905@redhat.com> <57150356.3090508@redhat.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Thu, 28 Apr 2016 14:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-04/txt/msg00636.txt.bz2 On 04/28/2016 02:24 PM, Andreas Arnez wrote: > Ping: > > https://sourceware.org/ml/gdb-patches/2016-04/msg00437.html > > IIRC, there was some uncertainty about the clarity/meaning of the new > gdbarch method's description below. Or has this cleared up by now? Sorry, I've spent the last hour trying to wrap my head around this, but I'm still confused. :-/ I'm sorry to be blocking this. > > On Tue, Apr 19 2016, Andreas Arnez wrote: > >> Here's another attempt: >> >> Determine the physical placement of a piece of size LEN within register >> *REGNUM, possibly overwriting *REGNUM. (E.g., some ABIs have unwindable >> sub-registers embedded in non-unwindable full registers, and this method >> diverts from the full register to the sub-register if possible.) I couldn't find any reference to "sub-register" in the codebase. I'd assume it's something like "eax" being a sub part of "rax" on x86-64. But I'm not certain that's the case here? On a machine with vector registers, is a FP register really a chunk of the vector register, or is it a real separate physical register? My main confusion revolves I think, around how these points are addressed: - FP registers and vector registers have the same identical DWARF register number. - If the object stored is <= 8 bytes, we should find it in the FP register; otherwise get it from the vector register. I'd naively think that the fix for something like that would be to make dwarf_reg_to_regnum return the gdb FP register number instead of the vector number, when the type fits in a FP register, instead of the need for an extra diversion step. Ignoring the fact that we don't currently pass the type/size to gdbarch_dwarf_reg_to_regnum. It may be that the end result is the same, but it's all blurry to me still. Thanks, Pedro Alves