aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/export_test.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2023-02-14 12:25:11 -0500
committerAustin Clements <austin@google.com>2023-03-10 17:59:37 +0000
commit3e360b035f4c3014e9564f4994c68ccc296ef629 (patch)
tree1eddb9edefe065d015026fe628b8b62e7f7e3320 /src/runtime/export_test.go
parent9872428a715a907a122ad705b5fa42f11a385664 (diff)
downloadgo-3e360b035f4c3014e9564f4994c68ccc296ef629.tar.xz
runtime: new API for filling PC traceback buffers
Currently, filling PC traceback buffers is one of the jobs of gentraceback. This moves it into a new function, tracebackPCs, with a simple API built around unwinder, and changes all callers to use this new API. Updates #54466. Change-Id: Id2038bded81bf533a5a4e71178a7c014904d938c Reviewed-on: https://go-review.googlesource.com/c/go/+/468300 Reviewed-by: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/export_test.go')
-rw-r--r--src/runtime/export_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go
index 25758972f1..31d32eabeb 100644
--- a/src/runtime/export_test.go
+++ b/src/runtime/export_test.go
@@ -483,7 +483,9 @@ func LockOSCounts() (external, internal uint32) {
func TracebackSystemstack(stk []uintptr, i int) int {
if i == 0 {
pc, sp := getcallerpc(), getcallersp()
- return gentraceback(pc, sp, 0, getg(), 0, &stk[0], len(stk), nil, nil, _TraceJumpStack)
+ var u unwinder
+ u.initAt(pc, sp, 0, getg(), unwindJumpStack) // Don't ignore errors, for testing
+ return tracebackPCs(&u, 0, stk)
}
n := 0
systemstack(func() {