dongzhanlu8890 2014-07-10 05:46 采纳率: 0%
浏览 34
已采纳

无法使gdb适用于Go 1.3程序

(gdb) info goroutines
Python Exception <class 'gdb.error'> 
Attempt to extract a component of a value that is not a (null).:
Error occurred in Python command: 
Attempt to extract a component of a value that is not a (null).

Version:

GDB:    7.7.1  
Python: 3.4.1  
OS:     CentOS 6.5 x86_64
  • 写回答

1条回答 默认 最新

  • duan20145 2014-07-10 12:22
    关注

    From http://golang.org/doc/gdb:

    GDB does not understand Go programs well. The stack management, threading, and runtime contain aspects that differ enough from the execution model GDB expects that they can confuse the debugger, even when the program is compiled with gccgo. As a consequence, although GDB can be useful in some situations, it is not a reliable debugger for Go programs, particularly heavily concurrent ones. Moreover, it is not a priority for the Go project to address these issues, which are difficult. In short, the instructions below should be taken only as a guide to how to use GDB when it works, not as a guarantee of success.

    Also check issue 7796

    There's http://ernestmicklei.com/2012/12/14/hopwatch-a-debugging-tool-for-go/, which isn't like gdb, you have to add breakpoints yourself in the code.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码