2014-07-10 31 views
1
(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). 

版本無法獲取GDB的圍棋1.3程序工作

GDB: 7.7.1 
Python: 3.4.1 
OS:  CentOS 6.5 x86_64 

回答

0

http://golang.org/doc/gdb

GDB不明白圍棋程序以及。堆棧管理 線程和運行時包含的方面與 執行模型有很大的不同.GDB希望當程序使用gccgo編譯時,他們可能會混淆調試器,甚至是 。因此,雖然GDB在某些情況下可能很有用,但它不適用於Go程序的可靠調試器 ,特別是高度併發的程序。而且,對於Go項目來說,這不是 的優先問題,因此難以解決這些問題,即 。簡而言之,下面的說明只應作爲 指南來指導如何在工作時使用GDB,而不是保證成功。

還要檢查issue 7796

http://ernestmicklei.com/2012/12/14/hopwatch-a-debugging-tool-for-go/,這是不喜歡GDB,你要自己添加斷點在代碼中。