|
今天安装XXGDB-1.12(图形界面调试工具),
下载地址ftp://ftp.x.org/contrib/utilities/xxgdb-1.12.tar.gz
下载回来源文件压缩包
xxgdb-1.12.tar.gz
解压缩(图形界面下用右键菜单中的解压缩选项)
得到文件夹
xxgdb-1.12
进入这个文件夹,只看到一堆源程序文件,不能直接用
./configure
make
make install
来安装,头大!!
耐着性子,看里面的文本文件,有个XXGDB_README文件里有一段说
XXGDB version 1.12
------------------
>> SEE ALSO XDBX DOCUMENTATION <<
>> SEE ALSO xxgdb.man DOCUMENTATION <<
XXGDB is a X window interface to the GDB debugger.
GDB must be accessible in the current path.
xxgdb should run gdb 4.x (as well as the older versions).
This X window interface has been adapted to GDB from the source
distribution files of XDBX version 2.1 (patch level 2) which
implements an X window interface to the DBX debugger.
See the XDBX_README file for more information on XDBX.
XXGDB has been originally tested on Sparc workstation running Solaris
It should also run on SUN OS.
To build, xxgdb, first build the makefile by using 'xmkmf' or other
shell script using 'imake'.
最后一句说,为了编译,要先建立Makefile文件,用xmkmf命令或者其他的命令环境用imake
上网查查,这个xmkmf是X11提供的根据imakefile文件自动建立Makefile文件的命令,好像以后会废掉,用autoscanf/automake代替,在这个目录下启动终端,运行xmkmf命令
[root@MagicLinux xxgdb-1.12]#xmkmf
imake -DUseInstalled -I/usr/X11R6/lib/X11/config
[root@MagicLinux xxgdb-1.12]#
执行make进行编译
[root@MagicLinux xxgdb-1.12]# make
gcc -m32 -O2 -pipe -D_FORTIFY_SOURCE=2 -m32 -march=i686 -mcpu=i686 -mtune=i686 -fno-strict-aliasing -pipe -I/usr/X11R6/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFUNCPROTO=15 -DNARROWPROTO -DSYSV -DGDB -DCREATE_IO_WINDOW -g -c -o calldbx.o calldbx.c
In file included from /usr/X11R6/include/X11/Intrinsic.h:56,
from /usr/X11R6/include/X11/IntrinsicP.h:54,
from defs.h:71,
from global.h:66,
from calldbx.c:76:
/usr/X11R6/include/X11/Xlib.h:81: error: conflicting types for 'wchar_t'
/usr/lib/gcc/i686-magic-linux/3.4.4/include/stddef.h:325: error: previous declaration of 'wchar_t' was here
make: *** [calldbx.o] 错误 1
[root@MagicLinux xxgdb-1.12]#
说是头文件中的定义有冲突,我修改/usr/X11R6/include/X11/Xlib.h文件的81行将
typedef unsigned long wchar_t;
改成
/*typedef unsigned long wchar_t;*/
注释掉
重新执行make
编译成功,在目录下有个xxgdb的可执行文件,起动它,窗口出来了。 |
|