- 论坛徽章:
- 0
|
本帖最后由 lli_njupt 于 2011-04-26 12:48 编辑
因为要查看内存泄露的问题,所以使用-g编译,
#make
gcc xds.c -O2 -MD -Wall -Xlinker "-(" -lxds -Xlinker "-)" -o xds -g -L ./xsl/lib
#gdb xds
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/red/software/xsl/xds...(no debugging symbols found)...done.
(gdb)
但是如果手动执行命令
#gcc xds.c -O2 -MD -Wall -Xlinker "-(" -lxds -Xlinker "-)" -o xds -g -L ./xsl/lib
就不会有no debugging symbols found的提示了,不只是否也有人遇到类似的问题!
另外生成libxds.a中的.o都是使用了-g选项的。
个人怀疑:是否是环境变量的问题,也即执行Makefile时的环境变量和shell中的环境变量差别,导致不同的结果。 |
|