I add "add-auto-load-safe-path /usr/share/go/src/pkg/runtime/runtime-gdb.py" to .gdbinit, and then start gdb. Now I get:
go version go1.2.1 linux/amd64
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
Type "apropos word" to search for commands related to "word"...
Reading symbols from MergePrograms.test...done.
File "/usr/share/go/src/pkg/runtime/runtime-gdb.py", line 358
print s, ptr['goid'], "%8s" % sts[long((ptr['status']))], blk.function
SyntaxError: invalid syntax