From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26668 invoked by alias); 27 Feb 2012 18:49:02 -0000 Received: (qmail 26650 invoked by uid 22791); 27 Feb 2012 18:49:00 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Feb 2012 18:48:43 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1RImgs4001877 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Feb 2012 13:48:42 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1RImefi013654; Mon, 27 Feb 2012 13:48:41 -0500 Message-ID: <4F4BD008.1060909@redhat.com> Date: Mon, 27 Feb 2012 19:23:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: "H.J. Lu" CC: GDB Patches , Mark Kettenis Subject: Re: AVX and unavailable registers, fix system-gcore.exp References: <4F21A489.2080200@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2012-02/txt/msg00635.txt.bz2 On 02/27/2012 06:04 PM, H.J. Lu wrote: > On Thu, Jan 26, 2012 at 11:07 AM, Pedro Alves wrote: >> 2012-01-26 Pedro Alves >> >> * i387-tdep.c (i387_supply_xsave): If we have an xsave buffer, and >> the register state is clear, supply explicit zero, instead of >> marking the register unavailable. > > This fixes 7.3/7.4 regression: > > http://www.sourceware.org/bugzilla/show_bug.cgi?id=13766 Thanks for confirming. Since you agree with the patch, I'll check it in in a few days unless I hear otherwise. I'll post a separate RFC patch proposing to remove the NULL REGS handling: >> I have a doubt in the xsave-in-corefile support bits. There's code in place to >> handle a NULL regs (as in no xsave contents to work with), so I'm handling it >> as presently: >> >> >> + >> + Note however, the case when REGS is NULL is a different case. >> + That case means we do not have access to the x87 states, so we >> + should mark the registers as unavailable (by supplying NULL). */ >> + >> but I can't figure out how would we ever get a NULL REGS there. Is there a >> convoluted path I missed? amd64-linux-tdep.c unconditionally installs >> amd64_linux_regset_sections as gdbarch_core_regset_sections >> callback, and this includes the .reg-xstate section. >> However, corelow.c:get_core_register_section bails early if >> a section is not found in the core, never reaching regset->supply_regset >> with a NULL `contents'. >> + const gdb_byte zero[MAX_REGISTER_SIZE] = { 0 }; > > Shouldn't it be static since it is never modified? I'll do that change. -- Pedro Alves