How gdb print address of a var in go program?
How gdb print address of a var in go program? I success install gdb 8.0.1 and make it run in mac os x. When debug this program I don't see the address of key . key package main func main(){ m := map[string]int{ "abc":123, } key := byte("abc") x, ok := m[string(key)] println(x, ok) } Here is what I have done with gdb: go build -gcflags "-N" test_append.go gdb test_append (gdb) b 9 Breakpoint 1 at 0x104d4b4: file /Users/jiamo/go/src/test/test_append.go, line 9. (gdb) c The program is not being run. (gdb) run Starting program: /Users/jiamo/go/src/test/test_append Thread 3 hit Breakpoint 1, main.main () at /Users/jiamo/go/src/test/test_append.go:9 9 x, ok := m[string(key)] (gdb) info locals key = uint8 = {97 'a', 98 'b', 99 'c'} m = map[string]int = {["abc"] = 123} ok = false x = 17195648 (gdb) p key $1 = uint8 * = {97 'a', 98 'b', 99 'c'} (gdb) p &key $2 = u...