From 8ffe2be85eae01203f38ba41ec2a536ef77b6a89 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 4 Aug 2017 13:46:39 +0000 Subject: [PATCH] runtime: dump registers for Alpha Patch from Uros Bizjak. Reviewed-on: https://go-review.googlesource.com/53350 From-SVN: r250873 --- gcc/go/gofrontend/MERGE | 2 +- libgo/runtime/go-signal.c | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index bf07b7f76f2..b86cb856d52 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -adac632f95d1cd3421c9c1df5204db10b6a92c44 +db685a1a9aa8b3b916dd6d1284895e01d73158e1 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c index 8c7ecbae3b5..a5a7cb8080a 100644 --- a/libgo/runtime/go-signal.c +++ b/libgo/runtime/go-signal.c @@ -298,4 +298,45 @@ dumpregs(siginfo_t *info __attribute__((unused)), void *context __attribute__((u } #endif #endif + +#ifdef __alpha__ + #ifdef __linux__ + { + mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext; + + runtime_printf("v0 %X\n", m->sc_regs[0]); + runtime_printf("t0 %X\n", m->sc_regs[1]); + runtime_printf("t1 %X\n", m->sc_regs[2]); + runtime_printf("t2 %X\n", m->sc_regs[3]); + runtime_printf("t3 %X\n", m->sc_regs[4]); + runtime_printf("t4 %X\n", m->sc_regs[5]); + runtime_printf("t5 %X\n", m->sc_regs[6]); + runtime_printf("t6 %X\n", m->sc_regs[7]); + runtime_printf("t7 %X\n", m->sc_regs[8]); + runtime_printf("s0 %X\n", m->sc_regs[9]); + runtime_printf("s1 %X\n", m->sc_regs[10]); + runtime_printf("s2 %X\n", m->sc_regs[11]); + runtime_printf("s3 %X\n", m->sc_regs[12]); + runtime_printf("s4 %X\n", m->sc_regs[13]); + runtime_printf("s5 %X\n", m->sc_regs[14]); + runtime_printf("fp %X\n", m->sc_regs[15]); + runtime_printf("a0 %X\n", m->sc_regs[16]); + runtime_printf("a1 %X\n", m->sc_regs[17]); + runtime_printf("a2 %X\n", m->sc_regs[18]); + runtime_printf("a3 %X\n", m->sc_regs[19]); + runtime_printf("a4 %X\n", m->sc_regs[20]); + runtime_printf("a5 %X\n", m->sc_regs[21]); + runtime_printf("t8 %X\n", m->sc_regs[22]); + runtime_printf("t9 %X\n", m->sc_regs[23]); + runtime_printf("t10 %X\n", m->sc_regs[24]); + runtime_printf("t11 %X\n", m->sc_regs[25]); + runtime_printf("ra %X\n", m->sc_regs[26]); + runtime_printf("t12 %X\n", m->sc_regs[27]); + runtime_printf("at %X\n", m->sc_regs[28]); + runtime_printf("gp %X\n", m->sc_regs[29]); + runtime_printf("sp %X\n", m->sc_regs[30]); + runtime_printf("pc %X\n", m->sc_pc); + } + #endif +#endif } -- 2.30.2