From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22854 invoked by alias); 25 Nov 2013 15:01:40 -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 22841 invoked by uid 89); 25 Nov 2013 15:01:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Nov 2013 15:01:39 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAPF1SiL027985 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Nov 2013 10:01:28 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rAPF1Q5x013360; Mon, 25 Nov 2013 10:01:27 -0500 Message-ID: <52936646.9030704@redhat.com> Date: Mon, 25 Nov 2013 15:04:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Walfred Tedeschi CC: yao@codesourcery.com, gdb-patches@sourceware.org Subject: Re: [PATCH v1 1/1] Fix PR16193 - gdbserver aborts. References: <1385386802-16948-1-git-send-email-walfred.tedeschi@intel.com> <529363FF.3060602@intel.com> In-Reply-To: <529363FF.3060602@intel.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-11/txt/msg00777.txt.bz2 On 11/25/2013 02:51 PM, Walfred Tedeschi wrote: > Hello All, > > For clarification the macro I386_XSTATE_SIZE(XCR0) was returning for any > XCR0 the value 576. I must be very dense today, sorry. :-( Can you point out why that was so before the patch, and no longer is so after the patch? >> > /* Get I386 XSAVE extended state size. */ >> > #define I386_XSTATE_SIZE(XCR0) \ >> > - (((XCR0) & I386_XSTATE_BNDCFG) != 0 ? I386_XSTATE_BNDCFG_SIZE \ >> > - : (((XCR0) & I386_XSTATE_BNDREGS) != 0 ? I386_XSTATE_BNDCFG_SIZE \ >> > - : (((XCR0) & I386_XSTATE_AVX_SIZE) != 0 ? I386_XSTATE_AVX_SIZE \ >> > - : I386_XSTATE_SSE_SIZE))) >> > + (HAS_MPX (XCR0) ? I386_XSTATE_BNDCFG_SIZE : \ >> > + (HAS_AVX (XCR0) ? I386_XSTATE_AVX_SIZE : I386_XSTATE_SSE_SIZE)) I'm unrolling the new macros in my head, and I can figure out why does this now return a different value. :-/ -- Pedro Alves