GDB是一款bug调试工具,下载地址为https://ftp.gnu.org/gnu/gdb/安装的平台为ppc64 ppc64 ppc64 GNU/Linux,系统为Red Hat Enterprise Linux Server release 5.1 (Tikanga);之前安装正常,但是使用后,发现不能识别core文件,看了README之后,发现首先需要让GDB识别机器。
解压gdb-6.5.tar.gz,cd gdb-6.5,首先建议查看下readme的内容README for GNU development toolsThis directory contains various GNU compilers, assemblers, linkers,debuggers, etc., plus their support routines, definitions, and documentation.
If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README; if with a libg++ release,see libg++/README, etc. That'll give you info about thispackage -- supported targets, how to use it, how to report bugs, etc.
It is now possible to automatically configure and build a variety oftools with one command. To build all of the tools contained herein,run the ``configure'' script here, e.g.:
./configuremakeTo install them (by default in /usr/local/bin, /usr/local/lib, etc),then do:
make install(If the configure script can't determine your type of computer, give itthe name as an argument, for instance ``./configure sun4''. You canuse the script ``config.sub'' to test whether a name is recognized; ifit is, config.sub translates it to a triplet specifying CPU, vendor,and OS.)If you have more than one compiler on your system, it is often best toexplicitly set CC in the environment before running configure, and toalso set CC when running make. For example (assuming sh/bash/ksh):
CC=gcc ./configuremakeA similar example using csh:
setenv CC gcc./configuremakeMuch of the code and documentation enclosed is copyright bythe Free Software Foundation, Inc. See the file COPYING orCOPYING.LIB in the various directories, for a description of theGNU General Public License terms under which you can copy the files.
REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for infoon where and how to report problems.
现在查看下gdb/configure.tgt内容,查找你的机器对应的target选项,例如cpu,系统的标识我这台服务器是ppc64的,安装了redhatLinux,所以对应powerpc64-*-linux*) gdb_target=linux这条。
现在进行编译前的准备,回到gdb-6.5的目录运行。/config.sub powerpc64-redhat-linux,如果一切正常的话,会返回下面这样的结果powerpc64-redhat-linux-gnu现在,可以进行安装步骤了。
首先,编译./configure ppc64-redhat-linux不过官方推荐的编译器是gcc,所以上面的命令改成这样CC=gcc ./configure ppc64-redhat-linux接下来,就是很make和make install了,一切正常的话,那么GDB就安装完成了。
GDB的使用,命令gdb 参数 core文件针对我的程序,那么是这样gdb owccm core.XXXXX
关键词标签:LINUX
相关阅读
热门文章 安装红帽子RedHat Linux9.0操作系统教程使用screen管理你的远程会话GNU/Linux安装vmware如何登录linux vps图形界面 Linux远程桌面连
人气排行 Linux下获取CPUID、硬盘序列号与MAC地址linux tc实现ip流量限制dmidecode命令查看内存型号linux下解压rar文件安装红帽子RedHat Linux9.0操作系统教程Ubuntu linux 关机、重启、注销 命令lcx.exe、nc.exe、sc.exe入侵中的使用方法查看linux服务器硬盘IO读写负载
查看所有0条评论>>