[ns] -DDEBUG option

Mubashir Rehmani mshrehmani at gmail.com
Wed Nov 5 04:15:10 PST 2008


Hi Farhan Hyder

To debug ns do the following:

1. in the directory of tcl-debug:

a) ./configure --with-tcl=<path>

b) make clean

c) make

2. in the directory of ns

a) make clean

b) ./configure --enable-debug --with-tcl=<tcl path> --with-tk=<tk path>
--with-tcldebug=<tcl-debug path> c)make
This TCL debugger enables to set specific breakpoints in the TCL code, via
"debug 1" instructions. When you do that, the TCL script will be halted at
this location, and you can check values of variables etc. Then you can
either resume execution, or execute step-by-step TCL instructions
(unfortunately, this is a very confusing debugging method, due to the nature
of TCL code)

For further details see this site:

http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html

Feel free to contact me

Regards
Mubashir Husain Rehmani
LIP6, UPMC, Paris, France.

2008/11/3 Farhan Hyder <mfhyder at gmail.com>


>  Hello all,
>
> I can't figure out what does it mean to 'compile NS with -DDEBUG option'.
> Can anyone help me with it ? I mean the procedure, how exactly do we do it
> ?
>
> "Note: ns must be compiled with -DDEBUG for this option to
>          work. Also, if debug_ (the standard debug flag) is set to 1, then
>          all the bits in debugMask_ are set."
>
>
> Thanks,
> Farhan Hyder
>



-- 
Mubashir Husain Rehmani

Mobile :   00 33 (0)6 32 00 89 35


More information about the Ns-users mailing list