dlv version)?$ dlv version
Delve Debugger
Version: 1.1.0
Build: $Id: 1990ba12450cab9425a2ae62e6ab988725023d5c $
go version)?$ go version
go version go1.11.2 linux/amd64
Linux/amd64
Compile the following program, debug it with delve, try to print some map values:
package main
import "fmt"
type Pair struct {
A, B int
}
func main() {
m := map[Pair]string{}
m[Pair{A: 1, B: 1}] = "x"
m[Pair{A: 1, B: 2}] = "y"
fmt.Println(m)
}
$ dlv debug test.go
(dlv) b main.main:4
...
(dlv) c
...
(dlv) p m[main.Pair{A: 1, B: 1}]
Command failed: expression *ast.CompositeLit not implemented
(dlv) p m[Pair{A: 1, B: 1}]
Command failed: expression *ast.CompositeLit not implemented
Print the corresponding map values.
"Command failed: expression *ast.CompositeLit not implemented"
Looks like CompositeLit evaluation wasn't implemented: https://github.com/go-delve/delve/blob/4c9a72e486f1f0d0c90ecede8415a871dced8117/pkg/proc/eval.go#L258
any progress here ?
I think this is really important feature.. at least with cmd-line debugging.
Most helpful comment
any progress here ?
I think this is really important feature.. at least with cmd-line debugging.