Slide 4
Slide 4 text
go のデバッガ
ほぼ gdb 一択:
gdb 向けに、いくつか拡張がされている
string, slice, map, channel 用に最適化された出力
slice と map 用のコマンド$len()と$cap()がある
interface 型の変数を動的型にキャストする$dtype()とiface
がある
goroutine 用のコマンドがある
Debugging Go Code with GDB
(gdb) p urls
$11 = []string = {"http://golang.org/", "http://golang.org/cmd"}
(gdb) whtais var
type = main.MyInterface
(gdb) p $dtype(var)
$26 = (struct struct MyImpl) 0xf8400b4930
(gdb) iface var
main.MyInterface: struct MyImpl
(gdb) info goroutines
(gdb) goroutine cmd