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.
This commit is contained in:
Derek Parker
2015-09-16 20:59:30 -07:00
parent 2c48b60bb4
commit 0cba1fe0ba

View File

@ -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,