From 6be7fd3f9b5a7f319e362c41c53d9773022377e0 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 21 Mar 2023 17:44:29 +0100 Subject: [PATCH] runtime: let (*sigctxt).r9 return the correct register value on netbsd Fixes #59152 Change-Id: I7f89e2b48db9ff120d7cd094b72ded865874e961 Reviewed-on: https://go-review.googlesource.com/c/go/+/478135 Auto-Submit: Tobias Klauser TryBot-Result: Gopher Robot Run-TryBot: Tobias Klauser Reviewed-by: Heschi Kreinick Reviewed-by: Benny Siegert --- src/runtime/signal_netbsd_amd64.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/signal_netbsd_amd64.go b/src/runtime/signal_netbsd_amd64.go index 67fe4377fd..2112efea22 100644 --- a/src/runtime/signal_netbsd_amd64.go +++ b/src/runtime/signal_netbsd_amd64.go @@ -26,7 +26,7 @@ func (c *sigctxt) rsi() uint64 { return c.regs().__gregs[_REG_RSI] } func (c *sigctxt) rbp() uint64 { return c.regs().__gregs[_REG_RBP] } func (c *sigctxt) rsp() uint64 { return c.regs().__gregs[_REG_RSP] } func (c *sigctxt) r8() uint64 { return c.regs().__gregs[_REG_R8] } -func (c *sigctxt) r9() uint64 { return c.regs().__gregs[_REG_R8] } +func (c *sigctxt) r9() uint64 { return c.regs().__gregs[_REG_R9] } func (c *sigctxt) r10() uint64 { return c.regs().__gregs[_REG_R10] } func (c *sigctxt) r11() uint64 { return c.regs().__gregs[_REG_R11] } func (c *sigctxt) r12() uint64 { return c.regs().__gregs[_REG_R12] } -- 2.48.1