
LINUX
adi_1987
这个作者很懒,什么都没留下…
展开
-
gdb调试程序
gdb调试程序 1要使用gdb调试程序,在编译的时候需要在编译的时候将调试信息加到可执行文件中(cc,gcc,g++)的-g参数可以做到。 gcc -g hello.c -o hello 2.启动gdb的方法有几种 1)gdb hello [hello为执行程序名字] 2)gdb hello core [hello为执行程序名字,core为原创 2016-12-07 15:20:11 · 220 阅读 · 0 评论 -
Linux环境变量
liunx一般通过 export GOPATH=$HOME/work来设置环境变量,这样设置只是临时生效的,linux并不保存的 正确的做做法是vim ~/bash_profile 把环境变量写在文件里,对于当前用户生效 如果需要对所有用户生效,则编辑/etc/profile # vi /etc/profile export CLASS原创 2017-01-19 15:42:34 · 307 阅读 · 0 评论