時間:2015-06-28 00:00:00 來源:IT貓撲網(wǎng) 作者:網(wǎng)管聯(lián)盟 我要評論(1)
??? GDB是一款bug調(diào)試工具,下載地址為http://ftp.gnu.org/gnu/gdb/安裝的平臺為ppc64 ppc64 ppc64 GNU/Linux,系統(tǒng)為Red Hat Enterprise Linux Server release 5.1 (Tikanga);之前安裝正常,但是使用后,發(fā)現(xiàn)不能識別core文件,看了README之后,發(fā)現(xiàn)首先需要讓GDB識別機器。
??? 解壓gdb-6.5.tar.gz,cd gdb-6.5,首先建議查看下readme的內(nèi)容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.
??? 現(xiàn)在查看下gdb/configure.tgt內(nèi)容,查找你的機器對應(yīng)的target選項,例如cpu,系統(tǒng)的標(biāo)識我這臺服務(wù)器是ppc64的,安裝了redhatLinux,所以對應(yīng)powerpc64-*-linux*)???? gdb_target=linux這條。
??? 現(xiàn)在進行編譯前的準(zhǔn)備,回到gdb-6.5的目錄運行。/config.sub powerpc64-redhat-linux,如果一切正常的話,會返回下面這樣的結(jié)果powerpc64-redhat-linux-gnu現(xiàn)在,可以進行安裝步驟了。
??? 首先,編譯./configure ppc64-redhat-linux不過官方推薦的編譯器是gcc,所以上面的命令改成這樣CC=gcc ./configure ppc64-redhat-linux接下來,就是很make和make install了,一切正常的話,那么GDB就安裝完成了。
??? GDB的使用,命令gdb 參數(shù) core文件針對我的程序,那么是這樣gdb owccm core.XXXXX
關(guān)鍵詞標(biāo)簽:LINUX
相關(guān)閱讀
熱門文章 安裝紅帽子RedHat Linux9.0操作系統(tǒng)教程 Tomcat9.0如何安裝_Tomcat9.0環(huán)境變量配置方法 多種操作系統(tǒng)NTP客戶端配置 Linux操作系統(tǒng)修改IP
人氣排行 Linux下獲取CPUID、硬盤序列號與MAC地址 dmidecode命令查看內(nèi)存型號 linux tc實現(xiàn)ip流量限制 安裝紅帽子RedHat Linux9.0操作系統(tǒng)教程 linux下解壓rar文件 lcx.exe、nc.exe、sc.exe入侵中的使用方法 Ubuntu linux 關(guān)機、重啟、注銷 命令 查看linux服務(wù)器硬盤IO讀寫負載