提交 2c48b60b 编写于 作者: I Ilia Choly 提交者: Derek Parker

terminal/command: list command w/ frame & goroutine commands

上级 e273949f
......@@ -311,6 +311,17 @@ func scopePrefix(client service.Client, cmdname string, pargs ...string) error {
}
scope.Frame = int(n)
i++
case "list", "ls":
frame, gid := scope.Frame, scope.GoroutineID
locs, err := client.Stacktrace(gid, frame)
if err != nil {
return err
}
if frame >= len(locs) {
return fmt.Errorf("Frame %d does not exist in goroutine %d", frame, gid)
}
loc := locs[frame]
return printfile(loc.File, loc.Line, true)
case "locals":
return callFilterSortAndOutput(locals, fullargs[i+1:])
case "args":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册