[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] regarding Tcl_Debugging



On Fri, 12 Oct 2001, Raj M Verma wrote:
> --- Lloyd Wood <l.wood@eim.surrey.ac.uk> wrote:
> > On Wed, 10 Oct 2001, Raj M Verma wrote:
> > 
> > > Dear ns-users, I'm trying to use tcl-debug-2.0 for
> > > just checking how it works, but I cudn't able to get
> > > the way to use it. I downloaded tcl-debug-2.0 and
> > > expect-5.33 seperately to my ns-allinone-2.1b8a
> > > directory. I've configured, made and installed
> > them.
> > 
> > have you since rebuilt ns to enable tcl debugging?
> 
> hi, I'm sorry that I didn't get ur point. wat do u
> mean by rebuilt ns? do I have to install, configure
> and validate it again?

configure with --enable-debug and --tcl-debug=path switches and make.

You might want to try reading the configure file. Or do 
configure --help.

> I donno whether I've to do it
> again. but for me right now debugger is workin fine
> with some simple loops and procedures. If I try to
> give a complete application like the following
> example, 
> 
> set ns [new Simulator]
> $ns rtproto DV
> .....
> ...
> ..
> 
> I'm giving the command "expect -D 1 example.tcl" at my
> user prompt. then it's going into the debugger mode
> and the output is as follows.
> 1: new Simulator
> dbg1.0>
> 5: namespace current
> dbg5.1>
> invalid command name "new"
>     while executing
> "new Simulator"
>   (file "example.tcl" line 1)
> 
> 
> So, according to my guess it shud be a prob with OTcl
> linkage, 

...if expect is actaully running ns.

recompiling generally fixes linking.

> 'cos I heard that this tcl-debugger works
> only with pure Tcl code but not with the combination
> of C++ and OTcl(especially for ns). how far is this
> true?

No idea. All the important stuff needs gdb anyway.

> and one more doubt is that as far as I know the
> debugger that I'm using is the latest
> one(tcl-debug-2.0) but in the manual(tcl-debug.ps)
> that was given in the package, it was mentioned that
> it was taken from the proceedings of 1993 Tcl/Tk
> workshop, how can they give such an old manual for the
> latest release?

Feel free to write an updated version...

What extra does using expect with ns give you, and is your expect even
launching ns? (Okay, expect has a graphical interface - updating ns
tcl/tk glue with the stuff nam has would fix that and allow Tk in
simulation scripts.)

L.

> cud u pls clarify my doubts regarding
> whether I can use this debugger for the applications
> in ns2 and if so, which is the better way to do it.
> thanx a lot.
> Raj. 

<L.Wood@surrey.ac.uk>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>