我正在使用 go 和 Google AppEngine 编写一个小 API。所有这一切都在 Liteide 和 TBH 中经过一些痛苦的设置,现在运行良好。我已经到了需要在 GDB 中开始调试的地步,这一切都已签名,Liteide 正在接受它。然而,有一个问题我无法克服,那就是让 GDB 为应用程序加载符号。以下是控制台的摘录:
&"Warning: /usr/local/go/src/pkg/runtime: No such file or directory.\n"
10000008^done,source-path="/usr/local/go/src/pkg/runtime:$cdir:$cwd"
(gdb)
&"set substitute-path /go/src/pkg/runtime /usr/local/go/src/pkg/runtime\n"
10000009^done
(gdb)
10000010^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
10000011^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
10000012^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
10000013^error,msg="No executable file specified.\nUse the \"file\" or \"exec- file\" command."
(gdb)
似乎 GDB 正在为运行时寻找错误的位置,但可能会用它代替正确的路径?我正在运行 AppEngine
"/Applications/go_appengine 2/dev_appserver.py"
我怀疑我需要告诉 GDB 调试一个特定的进程,但我不确定是什么以及在哪里配置它。有没有人对如何设置或我可能出错的地方有任何经验?