This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] IA64: EC, the Epilog Count register, is available in ptrace.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 28 Mar 2012 15:54:51 +0100
- Subject: [PATCH] IA64: EC, the Epilog Count register, is available in ptrace.
- References: <4F730961.6030003@redhat.com>
> 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 <palves@redhat.com>
* 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,