您好,登錄后才能下訂單哦!
整個是一個docker環(huán)境
docker版本: 1.12.1,鏡像是我自己做的基于ubuntu:14.04.05.
容器操作系統(tǒng)版本: Ubuntu 14.04.5 LTS
go版本: 1.6.3
在gdb中執(zhí)行run命令出錯!
錯誤輸出:
warning:Error disabling address space randomization: Operation not permitted
環(huán)境:docker
解決辦法:
warning:Error disabling address space randomization: Operation not permitted
結(jié)論:
When running within a dockercontainer, I got this error until I added--security-optseccomp=unconfined to the dockerrun. – Cameron Taggart Jun 7 at 4:28
來自 <http://stackoverflow.com/questions/35860527/warning-error-disabling-address-space-randomization-operation-not-permitted>
info goroutines: Undefined info command:“goroutines”
錯誤輸出:
(gdb)info goroutines
Undefinedinfo command: "goroutines". Try "help info".
相關(guān)資料:
https://golang.org/doc/gdb
Undefinedinfo command: “goroutines”
Debugging Go Code with GDB
Text filesrc/runtime/runtime-gdb.py
結(jié)論:
使用GDB調(diào)試GO程序
http://www.cnblogs.com/guxuanqing/p/5638363.html
建立~/.gdbinit
add-auto-load-safe-path/usr/local/go/src/runtime/runtime-gdb.py
setauto-load safe-path /
pythonsys.path.append("/usr/share/gdb/python")
/usr/local/go/src/runtime/runtime-gdb.py里面的gdb怎么搞出來的?
goobjfile= gdb.current_objfile() or gdb.objfiles()[0]
參看上個問題的結(jié)論
應(yīng)該是把/usr/share/gdb/python里的東西加到sys.path里面去了
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。