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

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

LINUX下GDB的安裝

時間:2015/6/28來源:IT貓撲網(wǎng)作者:網(wǎng)管聯(lián)盟我要評論(0)

    GDB是一款bug調(diào)試工具,下載地址為https://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識別機(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ī)器對應(yīng)的target選項,例如cpu,系統(tǒng)的標(biāo)識我這臺服務(wù)器是ppc64的,安裝了redhatLinux,所以對應(yīng)powerpc64-*-linux*)     gdb_target=linux這條。

    現(xiàn)在進(jìn)行編譯前的準(zhǔn)備,回到gdb-6.5的目錄運行。/config.sub powerpc64-redhat-linux,如果一切正常的話,會返回下面這樣的結(jié)果powerpc64-redhat-linux-gnu現(xiàn)在,可以進(jì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)閱讀

文章評論
發(fā)表評論

熱門文章 安裝紅帽子RedHat Linux9.0操作系統(tǒng)教程安裝紅帽子RedHat Linux9.0操作系統(tǒng)教程使用screen管理你的遠(yuǎn)程會話使用screen管理你的遠(yuǎn)程會話GNU/Linux安裝vmwareGNU/Linux安裝vmware如何登錄linux vps圖形界面 Linux遠(yuǎn)程桌面連如何登錄linux vps圖形界面 Linux遠(yuǎn)程桌面連

相關(guān)下載

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