100% agreed on the kdbg and insight topics;

Concerning the -g flag, one can also configure ns2 with debugging support,
eg:

ns2> ./configure --help
ns2> ./configure --enabled-debug     (for c++ debug)
ns2> ./configure --enabled-debug  --with-tcldebug=../tcl-debug-2.0
   (for c++ and tcl debug)


********

Incidentally, this is exactly the kind of ns-users aids that would be most
useful for NS2 newcomers. 

For this, the NS2 wiki is the perfect place for NS2 beginner users to post
their success stories / detailed HOW-TOs / tried-but-failed experiments
__based on their own learning experiences and lerning curve. 

As such, and this is not the first time I make this call for volunteers,
___PLEASE CONTRIBUTE TO THE NS2 WIKI___. 

For instance, check
http://mailman.isi.edu/pipermail/ns-users/2006-January/053560.html; I've had
exactly __0__ responses for this call for volunteers! However, I've spent a
lot of time doing my own help pages for only the benefit of the NS2
community, and I'm sure that I've already helped a lot of persons already.
http://tagus.inesc-id.pt/~pestrela/ns2/


Thus:
- Have you seen any good tip in the ns2 mailing list? Did it worked? Then
put your detailed guide in the wiki. No need to be very formal, just give
all the important details!
- What, it didn't worked? Start by putting the things that worked on the
wiki, search a bit, ask for help in the mailing list, then when its solved
put the whole story in the wiki. 
- Etc etc etc.


To conclude, I sincerely fail to see why the NS2 community is so different
from other programming communities, which are probably as hard to get into
as ns2. Of course that we have our TCL/C++/bindings problems, but "they"
probably have their problems as well that we don't even imagine of.

I sincerely think that is users contribute, someday we'll be able to have
something similar to this wiki, for example:
http://developer.valvesoftware.com/wiki/Category:Programming
http://developer.valvesoftware.com/wiki/Compiling_under_Linux

Comments?
Pedro Vale Estrela


> -----Original Message-----
> From: Ilyes Gouta [mailto:[EMAIL PROTECTED]
> Sent: terça-feira, 6 de Junho de 2006 16:49
> To: [EMAIL PROTECTED]
> Cc: Hai Nam; [EMAIL PROTECTED]; NS-List
> Subject: Re: [ns] C++ debug in NS2
> 
> Hi,
> 
> There also insight  which can be found on
> http://sources.redhat.com/insight/ and several other GUI frontends for
> GDB like KDbg (http://www.kdbg.org/) which is a clean and easy to
> learn debugger based on QT. Please notice that debugging on Linux
> means pretty much interacting with GDB whatever the tool you're using.
> So getting more experience with it is really an added value.
> 
> Please note, in order to debug NS, you have to build it in O0 -g mode
> to respectively disable any optimization done by the compiler and to
> generate debugging symbols and source code references in the final
> executable. You can do this by manipulating CFLAGS within
> ns-2.29/Makefile.
> 
> Best regards,
> Ilyes Gouta.
> 
> On 6/6/06, Pedro Vale Estrela <[EMAIL PROTECTED]> wrote:
> >
> >
> > How need to take the time to learn a real debugger like DDD. Make a
> small
> > test program yourself in C, 10 lines are sufficient, then debug in
> inside
> > DDD to learn the debugerr
> > http://heather.cs.ucdavis.edu/~matloff/ddd.html
> > http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html#_Toc122255042
> >
> > Only then move to NS2. DDD is a very important investment to do in NS2
> > programming
> >
> >
> >
> > > -----Original Message-----
> > > From: Hai Nam [mailto:[EMAIL PROTECTED]
> > > Sent: terça-feira, 6 de Junho de 2006 15:45
> > > To: [EMAIL PROTECTED]; NS-List
> > > Subject: C++ debug in NS2
> > >
> > > Hello Pedro and the list,
> > >
> > > I'm modifying NS-2 C++ code. Sometimes I get the "incident de
> > > segmentation" error. By commenting out some code, I can know from
> > > which function goes this error, but it'll take more time to filter the
> > > right code block...
> > >
> > > Could you propose a debugger for me (I don't have much experience in
> > > this programming language) ? Besides commenting out some code, or put
> > > some "printf", I don't know where to start (even I debugged in some
> > > small files, I know how to put breakpoints...). In Eclipse there's
> > > tool for debug, but I reallly really don't know how to use. After a
> > > modification in code, I run NS by "make clean;make" then I run "ns
> > > example.tcl".
> > >
> > > Thanks in advance,
> > >
> > > --
> > > Hai-Nam NGUYEN
> > > http://www.jcisio.com
> >
> >


Reply via email to