1. install tcl-debug
a. put the directory of "tcl-debug-1.9" parallel to ns-2. (Actually, it
can be put somewhere else).
b. it seems that tcl-debug needs to be installed manually, instead of ns
will compile it automatically, which is the impression I have from the
nsdoc, then follow the instruction about the installation note in
tcl-debug-1.9 directory, "./configure" and "make". It may not be necessary
to install tcl-debug to the system, since libtcldbg.a should have been
made and already in the directory "tcl-debug-1.9".
2. go into ns-2 directory and make ns again
a. ./configure --enable-debug --with-tcldebug=../tcl-debug-1.9
b. make clean
c. make
3. Tcl debugging
a. insert "debug 1" somewhere in the tcl script
b. #>gdb ns
c. (gdb)run myscript.tcl
4. C++ debugging
a. #>gdb ns
b. (gdb)break classname::memberfunction
c. (gdb)run myscript.tcl
No comments:
Post a Comment