整个是一个docker环境
docker版本: 1.12.1,镜像是我自己做的基于ubuntu:14.04.05.
容器操作系统版本: 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".
相关资料:
https://golang.org/doc/gdb
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/1885740
原文地址:http://3732370.blog.51cto.com/3722370/1885740