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

Re: [ns] regarding Tcl_Debugging



--- Lloyd Wood <l.wood@eim.surrey.ac.uk> wrote:
> 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. 
> 
> 

hi, I'm sorry about the manual. as u said, I
configured my ns2 again with the --enable-debug option
along with the --with-tcldebug=./../ option. it's
reconfiguring fine and then I'm making it. it's
compiling fine. after that I tried with the same
xample by adding a statement, "debug 1" ,in the first
line of the script, just to check whether it's getting
enabled or not. so when I tried to run the script in
the normal way(not in the debugging mode) like ns
example.tcl at the prompt, it's giving a warning
stating that

warning: Script debugging disabled. Reconfigure with
--with-tcldebug, and recompile. 

this is wat I xactly did, but even then it's giving
this warning. why? but the script is running fine. is
it a prob with Makefile? or shud I set the library
path of tcl-debug libraries in .cshrc file? or is
there something else that I shud do. thanx for ur
support. 

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com