I'm new to golang. I was debugging my go application.
While I tried to run "info goroutines", it threw out:
Undefined info command: "goroutines".
Try "help info
What did I miss in my gdb configuration?
The article "Debugging Go Code with GDB" does mention:
(gdb) info goroutines
But only in the context of loading extension scripts for a given binary.
The tool chain uses this to extend GDB with a handful of commands to inspect internals of the runtime code (such as goroutines) and to pretty print the built-in map, slice and channel types.
If you'd like to see how this works, or want to extend it, take a look at src/pkg/runtime/runtime-gdb.py in the Go source distribution.
It depends on some special magic types (hash<T,U>
) and variables (runtime.m
andruntime.g
) that the linker (src/cmd/ld/dwarf.c
) ensures are described in the DWARF code.If you're interested in what the debugging information looks like, run '
objdump -W 6.out
' and browse through the .debug_* sections.
So make sure your debug session is run with those extensions activated.