From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56202 invoked by alias); 17 Jul 2018 15:08:52 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 56188 invoked by uid 89); 17 Jul 2018 15:08:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Being X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Jul 2018 15:08:50 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w6HF8hgZ019400 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 17 Jul 2018 11:08:48 -0400 Received: by simark.ca (Postfix, from userid 112) id 91BBE1EF29; Tue, 17 Jul 2018 11:08:43 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 4993D1E077; Tue, 17 Jul 2018 11:08:42 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 17 Jul 2018 15:08:00 -0000 From: Simon Marchi To: Paul Topley Cc: gdb@sourceware.org Subject: Re: ymm register error In-Reply-To: References: Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00035.txt.bz2 On 2018-07-17 07:43, Paul Topley wrote: > When trying to run gdb server on a skylake-x HEDT platform (i9-7940X) > I encounter the following error: > > > regcache.c:264: A problem internal to GDBserver has been detected. > Unknown register ymm0h requested > > From what I can tell from furious googling is that the ymm registers > have changed location from broadwell-e to skylake-x. > > I can see references to the ymm registers in gdb's codebase, with > apparent positioning related to features like org.gnu.gdb.i386.avx & > org.gnu.gdb.i386.avx512. > > Being a complete novice around gdb's codebase, I'm not sure if I need > to enable or state something at configure stage so that the right ymm > register location is referenced. > > gdb server 8 in ubuntu bionics repos works OK on the skylake-x > platform, but when I compile myself it does not. > > Is there something specific I need to be stating at compile time to > "get" gdbserver 8 to work on skylake-x > > Paul Hi Paul, I don't have access to a system with this kind of processor, so I can only give you pointers on how I would debug this. My first intuition would be to debug gdbserver, starting at the "x86_linux_read_description" function. There, gdbserver tries to detect what features are available on the current processor and create a corresponding target description (essentially the list of existing registers). It's possible that it's getting something wrong. This code has also changed in the last few releases, changing from static lists to something created more dynamically. Normally, execution would end up in amd64_create_target_description. You processors supports the AVX instructions and therefore has the ymm0h register, so it should enter this condition: if (xcr0 & X86_XSTATE_AVX) regnum = create_feature_i386_64bit_avx (tdesc, regnum); But it also has AVX-512, so it should probably also enter this condition: if (xcr0 & X86_XSTATE_AVX512) regnum = create_feature_i386_64bit_avx512 (tdesc, regnum); Simon