整个是一个docker环境: 1.12.1,镜像是我自己做的.
操作系统版本: Ubuntu 14.04.5 LTS
go版本: 1.6.3
在gdb中执行run命令出错!
聽
错误输出:
warning:Error disabling address space randomization: Operation not permitted
环境:docker
聽
解决办法:
warning:Error disabling address space randomization: Operation not permitted
聽
结论:
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
聽
聽
聽
info goroutines: Undefined info command:“goroutines”
错误输出:
(gdb)info goroutines
Undefinedinfo command: "goroutines".聽Try "help info".
聽
相关资料:
Undefinedinfo command: “goroutines”
Text filesrc/runtime/runtime-gdb.py
聽
结论:
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]
参看上个问题的结论
应该是把/usr/share/gdb/python里的东西加到sys.path里面去了
本文出自 “马兵的博客” 博客,请务必保留此出处http://3732370.blog.51cto.com/3722370/1885675
有疑问加站长微信联系(非本文作者)