mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
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:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user