mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
proc/variables: chanRecvReturnAddress uses outdated frame info
g.SP refers to the frame the goroutine was in the last time it was scheduled out. Instead of calling proc.(*Process).stacktrace directly we should call proc.(*Process).GoroutineStacktrace that substitutes fresh values retrieved from thread registers when necessary. This bug leads to occasional problems with `next`.
This commit is contained in:
@ -152,7 +152,7 @@ func (g *G) ChanRecvBlocked() bool {
|
||||
|
||||
// chanRecvReturnAddr returns the address of the return from a channel read.
|
||||
func (g *G) chanRecvReturnAddr(dbp *Process) (uint64, error) {
|
||||
locs, err := dbp.stacktrace(g.PC, g.SP, 4)
|
||||
locs, err := dbp.GoroutineStacktrace(g, 4)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user