From 0cba1fe0ba89302bb5e168198ee53990d1abf94f Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Wed, 16 Sep 2015 20:59:30 -0700 Subject: [PATCH] proc/variables: Use sched.pc instead of gopc for G location gopc is the instruction of the `go` command that spawned this goroutine. What we really want (unless we can get the PC from the thread) is the value of sched.pc which is the value of the PC at the time it was parked. --- proc/variables.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc/variables.go b/proc/variables.go index 12c26c98..9400aa0a 100644 --- a/proc/variables.go +++ b/proc/variables.go @@ -204,7 +204,7 @@ func parseG(thread *Thread, gaddr uint64, deref bool) (*G, error) { return nil, err } - f, l, fn := thread.dbp.goSymTable.PCToLine(gopc) + f, l, fn := thread.dbp.goSymTable.PCToLine(pc) g := &G{ Id: int(goid), GoPC: gopc, -- GitLab