[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] help on ns debug
Dear all:
I am a very beginner user of Ns and Linux. I want to do the debug in TCL code
and C++ code of ns. But, it's not easy to understand the description and
samples in the "ns Notes and Documents". Would you give me some help for the
following questions.
1. I have downloaded the packet of tcl-debug-1.9 and put it under the directory
of ns-allinone-2.1b5. After configuring and compiling tcl-debug-1.9, I come
into the directory of ns-2.1b5 to do the configuration and compile, the
configure command is following.
./configure --with-otcl=../otcl-1.0a4 --with-tclcl=../tclcl-1.0b8 \
--with-tcl=../tclbox --with-tk=../tkbox --disable-static \
--with-tcldebug=../tcl-debug-1.9 --enable-debug|| die\
"Ns configuration failed! Exiting ..."
Are all of my operations correct?
2. After installed tcl-debug-1.9, how to test it in tcl code level? I try to use
a very simple test script file (ns directory/tcl/ex/simple.tcl) of ns to test
the debug functions. I put "debug 1" into script file, but the ns doesn't stop
running after "debug 1" and no any error reported. Does it need any other
command?
3. For C++ code level debug, should I include Dbg.h in all cpp files of ns? For
example, if I want to debug the functionality of TCP, should I include the Dbg
in tcp.h and call Dbg_on() at the the place where I want to do debug?
4. If any one has a simple debug sample, would you share it to me? It will be
very useful to me.
Thanks a lot.
Yan Qiang