The alpha elf_gregset_t has 33 entries: r0-r30, then pc, then unique
(see dump_elf_thread in linux arch/alpha/kernel/process.c). The
prstatus register layout put pc at index 32 and unique at index 33,
one past where they are, so eu-readelf -n showed the unique value as
the pc and read unique past the end of the register set.
Also mark pc as the pc_register so that core file unwinding can find
the initial pc.
* backends/alpha_corenote.c (prstatus_regs): Put pc at 31 * 8
and unique at 32 * 8. Set pc_register for pc.
---
backends/alpha_corenote.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/backends/alpha_corenote.c b/backends/alpha_corenote.c
index 6190df37..7a187759 100644
--- a/backends/alpha_corenote.c
+++ b/backends/alpha_corenote.c
@@ -42,8 +42,9 @@
static const Ebl_Register_Location prstatus_regs[] =
{
{ .offset = 0, .regno = 0, .count = 31, .bits = 64 }, /* r0-r30 */
- { .offset = 32 * 8, .regno = 64, .count = 1, .bits = 64 }, /* pc */
- { .offset = 33 * 8, .regno = 66, .count = 1, .bits = 64 }, /* unique */
+ { .offset = 31 * 8, .regno = 64, .count = 1, .bits = 64,
+ .pc_register = true }, /* pc */
+ { .offset = 32 * 8, .regno = 66, .count = 1, .bits = 64 }, /* unique */
};
#define PRSTATUS_REGS_SIZE (33 * 8)
--
2.55.0