代码拉取完成,页面将自动刷新
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)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。