下载: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