From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12528 invoked by alias); 7 Feb 2012 19:36:22 -0000 Received: (qmail 12265 invoked by uid 22791); 7 Feb 2012 19:36:20 -0000 X-SWARE-Spam-Status: No, hits=-6.9 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; Tue, 07 Feb 2012 19:35:57 +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 q17JZsMa006651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Feb 2012 14:35:54 -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 q17JZqVD002002; Tue, 7 Feb 2012 14:35:53 -0500 Message-ID: <4F317D18.8090304@redhat.com> Date: Tue, 07 Feb 2012 19:36:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: Rainer Orth CC: gdb-patches@sourceware.org Subject: Re: Fix %eflags register index on Solaris/amd64 References: 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/msg00085.txt.bz2 On 02/07/2012 06:00 PM, Rainer Orth wrote: > When I looked at %eflags in gdb, I found that > it was always shown as 0/empty, which makes no sense. Digging around in > gdb, I found the culprit: in both amd64-sol2-tdep.c > (amd64_sol2_gregset_reg_offset) and i386-sol2-nat.c > (amd64_sol2_gregset64_reg_offs, amd64_sol2_gregset32_reg_offs) the > offset for %eflags was wrong: has > > #define EFL 16 > > for the 32-bit case, but > > #define REG_RFL 19 > > for 64-bit, while 16 in 64-bit is > > #define REG_ERR 16 ... > The following patch fixes this and fixes all but one of the > gcc.dg/simulate-thread tests. I still have to investigate that last > one. > > Ok for mainline? Looks obvious to me. Ok. You may want to double check the other registers if you haven't yet. -- Pedro Alves