From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7615 invoked by alias); 28 Mar 2012 14:55:13 -0000 Received: (qmail 7563 invoked by uid 22791); 28 Mar 2012 14:55:11 -0000 X-SWARE-Spam-Status: No, hits=-6.8 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; Wed, 28 Mar 2012 14:54:52 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2SEsqq6017389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 28 Mar 2012 10:54:52 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q2SEspcF001233 for ; Wed, 28 Mar 2012 10:54:51 -0400 Subject: [PATCH] IA64: EC, the Epilog Count register, is available in ptrace. To: gdb-patches@sourceware.org From: Pedro Alves Date: Wed, 28 Mar 2012 14:55:00 -0000 Message-ID: <20120328145451.12183.7502.stgit@brno.lan> In-Reply-To: <4F730961.6030003@redhat.com> References: <4F730961.6030003@redhat.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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-03/txt/msg00942.txt.bz2 > gcore.exp failures related to these issues. It shows the $f0/$f1 issue, and > also, that $ec is read back from the core as 0, but it is read as > *unavailable* when debugging a live process. The latter is because > have (ia64-linux-nat.c): > > static int u_offsets[] = > { > ... > PT_AR_LC, > -1, /* Not available: EC, the Epilog Count register. */ > > But in ia64-linux-nat.c:supply_gregset: > > regcache_raw_supply (regcache, IA64_LC_REGNUM, regp + 53); > regcache_raw_supply (regcache, IA64_EC_REGNUM, regp + 54); > > which is suspicious (the registers is not retrievable with ptrace, but > it's in the core?). Indeed, on this system's /usr/include/asm/ptrace_offsets.h > I see: > > #define PT_AR_EC 0x0800 > #define PT_AR_LC 0x0808 > > So it does look like it is available with ptrace. Git blame on the kernel's sources shows the define always existed for at least as long as there's git history (1da177e, 2.6.12-rc2). I haven't checked further back... WDYT? 2012-03-28 Pedro Alves * ia64-linux-nat.c (u_offsets): Map IA64_EC_REGNUM to PT_AR_EC. --- gdb/ia64-linux-nat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c index 60b873b..24bde2d 100644 --- a/gdb/ia64-linux-nat.c +++ b/gdb/ia64-linux-nat.c @@ -272,7 +272,7 @@ static int u_offsets[] = -1, -1, -1, -1, -1, -1, -1, -1, -1, PT_AR_PFS, PT_AR_LC, - -1, /* Not available: EC, the Epilog Count register. */ + PT_AR_EC, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,