1. 程式人生 > >tcl-debug的下載與安裝及NSG2的下載與使用

tcl-debug的下載與安裝及NSG2的下載與使用

下載:https://pan.baidu.com/s/1rmDucC_FfT2XS8M5PsmZ1g

解壓後將tcl-debug-2.0資料夾放到ns-allinone-2.35資料夾下。

配置:

嘗試執行 ./configure --prefix=/home/你的資料夾名/ns-allinone-2.35/ns-2.35 --with-tcl=/home/你的資料夾名/ns-allinone-2.35/tcl8.5.10/unix --with-tcl-ver=8.5.10

如果失敗,則需要修改configure檔案:

第628行 . $TCLCONFIG 的上面加一行:TCLCONFIG="../tcl8.5.10/unix/tclConfig.sh"

第1360行 # see if one is installed 的上面加一行:ac_cv_c_tclh="../tcl8.5.10/generic"

改好後直接執行 ./configure 。

 

如果配置成功,則執行 make。

make成功後會生成libtcldbg.a這個檔案,將這個檔案複製到/ns-allinone-2.35/lib資料夾裡。

使用終端進入ns-allinone-2.35/ns-2.35資料夾下:

配置 ./configure --with-tcldebug=/home/你的資料夾名/ns-allinone-2.35/tcl-debug-2.0 --with-tcl=/home/你的資料夾名/ns-allinone-2.35/tcl8.5.10/unix --with-tcl-ver=8.5.10

如果有出現過以下兩行則表示配置成功:

checking for libtcldbg... -L/home/share/ns-allinone-2.33/tcl-debug-2.0 -ltcldbg
checking dmalloc... not requested with --with-dmalloc

 

配置成功後執行:

make clean

make depend

make

 

make完成後隨便找個tcl的例子在第一行加入 debug 1 ,然後執行該例子,如果出現dbg2.0>則表示安裝成功。

 

基本指令

s 單步執行(進入程序)
n 單步執行(不進入程序)
c 繼續
r 繼續執行直到從過程中返回
u 轉至上級作用域
d 轉至下級作用域
w 列出呼叫棧
b 設定,清除或顯示斷點
h 幫助

 

NSG2下載:https://pan.baidu.com/s/141_-6o8bSmeMlIMMAdFdug

使用:https://www.linuxidc.com/Linux/2012-06/63762.htm

 

參考資料

https://www.linuxidc.com/Linux/2012-06/63761.htm

http://nsnam.sourceforge.net/wiki/index.php/Installing_tcl-debug_for_ns-allinone-2.31