[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] how to use debugger
Hi,
To debug TCL scripts you need to install tcl-debugger. You will find the
src code from the ns homepage.
Regards,
Sudhin.
On Thu, 1 Jun 2000, Minehiko Iida wrote:
> Hi, all!
>
> I'd like to trace ns source code with a script (for example,
> /foo/bar/ns/ns-2.1b6/tcl/lib/simple.tcl). I tried to trace with
> debugger "gdb", but I couldn't. gdb is suspended like this:
>
> ------------------------------------------------------------------------
> Current directory is /foo/bar/ns/ns-2.1b6/tcl/ex/
> GNU gdb 4.18
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i386-unknown-freebsd"...
> (gdb) l
> 51 * Whatever the application does.
> 52 *
> 53 *----------------------------------------------------------------------
> 54 */
> 55
> 56 int
> 57 main(int argc, char **argv)
> 58 {
> 59 Tcl_Main(argc, argv,
> 60 Tcl_AppInit);
> (gdb) b 59
> Breakpoint 1 at 0x804aed6: file tclAppInit.cc, line 59.
> (gdb) run
> Starting program: /usr/local/ns/bin/ns
>
> Breakpoint 1, main (argc=1, argv=0xbfbffa1c) at tclAppInit.cc:60
> (gdb) s
> 0x8141940 in Tcl_Main () at gen/ptypes.cc:112
> (gdb) s
> %
> ---------------------------------------------------------------------
> I located the line "debug 1" at appropriate place, but did not work well.
>
> Because I couldn't understand the way of debugging only by reading
> ns manual, please tell me the way in detail.
> ----
> Minehiko Iida <[email protected]>
>
>
****************** Sudhindra Suresh Bengeri ********************
Ericsson IP Infrastructure | Home: |
920 Main Campus Dr, Suite 544 | 2502, Avent Ferry Rd, Apt #206 |
Raleigh, NC 27606 | Raleigh, NC - 27606 |
Ph. (919) 472-9945 | Ph. (919) 838-8746 |
Fax (919) 472-9999 | |
My web projection: http://www4.ncsu.edu/~ssbenger