到gdb官網下載gdb安裝包,解壓後,在「終端」中進入其目錄:而後依次執行以下命令行: html
1st:CFLAGS='-Wno-string-plus-int -g -O2' ./configure --disable-Werrorredis
2nd:makeapp
3rd:sudo make install命令行
以上命令執行完成後,鍵入以下命令:htm
gdb string
終端顯示以下:it
GNU gdb (GDB) 7.6.1io
Copyright (C) 2013 Free Software Foundation, Inc.編譯
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>終端
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin13.0.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb)