# GDB 远程调试 Golang ## Target ```bash gdbserver : # 如 gdbserver :889 demo-go ``` ## Host ```bash arm-linux-gnueabihf-gdb # 如: target remote 192.168.1.100:8899 (gdb) target remote : (gdb) set language go # 如: file /host/path/to/demo-go (gdb) file (gdb) b : (gdb) b . # 查看调用栈 (gdb) bt # 切换调用栈 (gdb) f # 查看 goroutine (gdb) info goroutines (gdb) goroutines bt ``` GDB 调试 Golang 无法查看 string、slice 等类型。 ## 外部参考资料 1. [Golang 程序调试工具介绍(gdb vs dlv)](https://blog.csdn.net/dianfu2892/article/details/101466591)