profile
viewpoint

Ask questionsVariable value printing error on linux/arm64

Please answer the following before submitting your issue:

Note: Please include any substantial examples (debug session output, stacktraces, etc) as linked gists.

  1. What version of Delve are you using (dlv version)? Delve Debugger Version: 1.5.0 Build: af250d45126070adbc702fe4ae1b74f19dcfdf97

  2. What version of Go are you using? (go version)? go version devel +b6dbaef68f Tue Sep 15 23:14:33 2020 +0000 linux/arm64

  3. What operating system and processor architecture are you using? linux/arm64 Ubuntu 18.04.4 LTS

  4. What did you do? $ cat foo.go

package foo
func reset(a []int, i int) []int {
        a[i] = 4
        return a
}

$ dlv exec go/pkg/tool/linux_arm64/compile -- foo.go (dlv) b go/src/cmd/compile/internal/ssa/prove.go:761 (dlv) c (dlv) n (dlv) p ft.unsat false (dlv) s (dlv) p ft.unsat true

  1. What did you expect to see? $ dlv exec go/pkg/tool/linux_arm64/compile -- foo.go (dlv) b go/src/cmd/compile/internal/ssa/prove.go:761 (dlv) c (dlv) n (dlv) p ft.unsat false (dlv) s (dlv) p ft.unsat false
  2. What did you see instead? $ dlv exec go/pkg/tool/linux_arm64/compile -- foo.go (dlv) b go/src/cmd/compile/internal/ssa/prove.go:761 (dlv) c (dlv) n (dlv) p ft.unsat false (dlv) s (dlv) p ft.unsat true
go-delve/delve

Answer questions erifan

The variable is in fact false, the code is https://github.com/golang/go/blob/1ee30d25c517cfa5674a35754602f1a9ba3562f4/src/cmd/compile/internal/ssa/prove.go#L761. After ft is created, ft.unsat is false, and then ft calls checkpoint. Just enter this function and print ft.unsat again, it becomes true. Obviously, it has not been changed. Debug the same program with dlv on linux/amd64, the print is correct.

useful!

Related questions

Version of Delve is too old for this version of Go (maximum supported version 1.12, suppress this error with --check-go-version=false) hot 2
Starting dlv on a process immediately segfaults hot 1
Debugging process hung hot 1
Can't debug TinyGo: 'panic: interface conversion: interface {} is int64, not dwarf.Offset' hot 1
Would it be possible to add a feature to dump structures in hexadecimal? hot 1
Need help to port delve for AARCH64 hot 1
panic: runtime error: index out of range hot 1
undefined: signGeneric verifyGeneric hot 1
Support plugins hot 1
Debugging broken after MacOS Mojave Install hot 1
Unable to download go-delve using "go get" hot 1
Import cycle not allowed hot 1
source:https://uonfu.com/
Github User Rank List