IT貓撲網(wǎng):您身邊最放心的安全下載站! 最新更新|軟件分類(lèi)|軟件專(zhuān)題|手機(jī)版|論壇轉(zhuǎn)貼|軟件發(fā)布

您當(dāng)前所在位置: 首頁(yè)操作系統(tǒng)LINUX → LINUX下GDB的安裝

LINUX下GDB的安裝

時(shí)間:2015-06-28 00:00:00 來(lái)源:IT貓撲網(wǎng) 作者:網(wǎng)管聯(lián)盟 我要評(píng)論(1)

??? GDB是一款bug調(diào)試工具,下載地址為http://ftp.gnu.org/gnu/gdb/安裝的平臺(tái)為ppc64 ppc64 ppc64 GNU/Linux,系統(tǒng)為Red Hat Enterprise Linux Server release 5.1 (Tikanga);之前安裝正常,但是使用后,發(fā)現(xiàn)不能識(shí)別core文件,看了README之后,發(fā)現(xiàn)首先需要讓GDB識(shí)別機(jī)器。

??? 解壓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)容,查找你的機(jī)器對(duì)應(yīng)的target選項(xiàng),例如cpu,系統(tǒng)的標(biāo)識(shí)我這臺(tái)服務(wù)器是ppc64的,安裝了redhatLinux,所以對(duì)應(yīng)powerpc64-*-linux*)???? gdb_target=linux這條。

??? 現(xiàn)在進(jìn)行編譯前的準(zhǔn)備,回到gdb-6.5的目錄運(yùn)行。/config.sub powerpc64-redhat-linux,如果一切正常的話,會(huì)返回下面這樣的結(jié)果powerpc64-redhat-linux-gnu現(xiàn)在,可以進(jìn)行安裝步驟了。

??? 首先,編譯./configure ppc64-redhat-linux不過(guò)官方推薦的編譯器是gcc,所以上面的命令改成這樣CC=gcc ./configure ppc64-redhat-linux接下來(lái),就是很make和make install了,一切正常的話,那么GDB就安裝完成了。

??? GDB的使用,命令gdb 參數(shù) core文件針對(duì)我的程序,那么是這樣gdb owccm core.XXXXX

關(guān)鍵詞標(biāo)簽:LINUX

相關(guān)閱讀

文章評(píng)論
發(fā)表評(píng)論

熱門(mén)文章 安裝紅帽子RedHat Linux9.0操作系統(tǒng)教程 安裝紅帽子RedHat Linux9.0操作系統(tǒng)教程 Tomcat9.0如何安裝_Tomcat9.0環(huán)境變量配置方法 Tomcat9.0如何安裝_Tomcat9.0環(huán)境變量配置方法 多種操作系統(tǒng)NTP客戶(hù)端配置 多種操作系統(tǒng)NTP客戶(hù)端配置 Linux操作系統(tǒng)修改IP Linux操作系統(tǒng)修改IP

相關(guān)下載

    人氣排行 Linux下獲取CPUID、硬盤(pán)序列號(hào)與MAC地址 dmidecode命令查看內(nèi)存型號(hào) linux tc實(shí)現(xiàn)ip流量限制 安裝紅帽子RedHat Linux9.0操作系統(tǒng)教程 linux下解壓rar文件 lcx.exe、nc.exe、sc.exe入侵中的使用方法 Ubuntu linux 關(guān)機(jī)、重啟、注銷(xiāo) 命令 查看linux服務(wù)器硬盤(pán)IO讀寫(xiě)負(fù)載