1 Star 0 Fork 0

gxj / delve

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
issue573.go 602 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main
// A debugger test.
// dlv debug
// b main.foo
// c
// s
// s
// Expect to be stopped in fmt.Printf or runtime.duffzero
// In bug, s #2 runs to the process exit because the call
// to duffzero enters duffzero well after the nominal entry
// and skips the internal breakpoint placed by Step().
import "fmt"
var v int = 99
func foo(x, y int) (z int) { // c stops here
fmt.Printf("x=%d, y=%d, z=%d\n", x, y, z) // s #1 stops here; s #2 is supposed to stop in Printf or duffzero.
z = x + y
return
}
func main() {
x := v
y := x * x
z := foo(x, y)
fmt.Printf("z=%d\n", z)
}
1
https://gitee.com/guoxiaojun19991011/delve.git
git@gitee.com:guoxiaojun19991011/delve.git
guoxiaojun19991011
delve
delve
v1.1.0

搜索帮助