proc: step into coroutine (#3791)

The step command is changed such that when the function being currently
called is a coroutine switch function it will move to the associated
coroutine.
Functions that switch coroutines are currently the next, stop and yield
closures produced by the iter.Pull function.
This commit is contained in:
Alessandro Arzilli
2024-09-24 19:22:04 +02:00
committed by GitHub
parent 856ad78be0
commit def0688e7a
5 changed files with 184 additions and 8 deletions

View File

@ -509,7 +509,7 @@ func (g *G) UserCurrent() Location {
frame := it.Frame()
if frame.Call.Fn != nil {
name := frame.Call.Fn.Name
if strings.Contains(name, ".") && (!strings.HasPrefix(name, "runtime.") || frame.Call.Fn.exportedRuntime()) && !strings.HasPrefix(name, "internal/") && !strings.HasPrefix(name, "runtime/internal") {
if strings.Contains(name, ".") && (!strings.HasPrefix(name, "runtime.") || frame.Call.Fn.exportedRuntime()) && !strings.HasPrefix(name, "internal/") && !strings.HasPrefix(name, "runtime/internal") && !strings.HasPrefix(name, "iter.") {
return frame.Call
}
}