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

[ns] Re:Segmentation fault in Nortel's Diffserv Module



There has been some discussion on how to use gdb with ns on the mailing
list, even I have answered some... hence you can get all the info from the
archives.

in short:
change the line in the Makefile
CCOPT   =
to
CCOPT   = -g

make clean
make

now run gdb with ns
$ gdb ns
gdb> set args <tcl_file>
gdb> run
after it seg faults it will be back to the gdb prompt,
gdb> where
this will give u the stack trace, this will help u identify the function
call and line number that's the culprit... this will be the beginning of
your debugging ;-)

regards,
Sudhin.

On Thu, 22 Mar 2001, Xiang wrote:

> Hi,
> Thank you for your help. But I can't find test-all-diffserv testsuit in
> ~ns/tcl/test/.  The diffserv module I am using is ns-release7 in
> ns-allinone2.1b6,RHlinux 6.0.  I install Diffserv module followed Nortel's
> directions(i.e. install.txt in ns-release7.tar.gz).  It seems the example tcl
> script (such as ds-cbr-trtcm.tcl etc.) run with no problem.
> How can I find where this problem occured?
> BTW, How to use gdb in ns script?
> Thanks again!
> Xiang
>
> > ----- Original Message -----
> > From: "Xuan Chen" <[email protected]>
> > To: "Xiang" <[email protected]>
> > Cc: <[email protected]>
> > Sent: Thursday, March 22, 2001 2:54 AM
> > Subject: Re: [ns] Segmentation fault in Nortel's Diffserv Module
> >
> > > I did not get the same error as you mentioned. I would suggest you to make
> > > sure the diffserv module in your ns works ok. YOu probably want to run its
> > > testsuite first:
> > >
> > > ~ns/tcl/test/test-all-diffserv
> > >
> > > Thanks.
> > > -chen xuan
> > >
> > > On Wed, 21 Mar 2001, Sudhindra Suresh Bengeri wrote:
> > >
> > > > Xiang,
> > > >
> > > > I ran the script it did not encounter any seg faults. Hence I think the
> > > > script is ok there must be some problem with the .cc/.h files of the
> > > > diffserv impl. Have you tried gdb'ing ns when you got the seg fault.
> > > >
> > > > I had some problem with the CBQ object that you had for the node <->
> > edge
> > > > links, changed it to DropTail and it worked fine, but that was not the
> > > > problem you were looking for right.
> > > >
> > > > Regards,
> > > > Sudhin.
> > > >
> > >
>
>

****************** Sudhindra Suresh Bengeri ********************
Graduate Research Assistant   | Home:                          |
to Dr. George N. Rouskas      | 2110, Gorman St.,              |
EGRC 454H, Computer Sci. dept.| Raleigh, NC - 27606            |
NCSU, Raleigh, NC 27695       | Ph. (919) 852-1961             |
(919)515-3655(P) / 515-7925(F)
My web projection: http://www4.ncsu.edu/~ssbenger