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

Re: [ns] A new instproc for Node!



Take a look at Polly's slide for
how to add changes to ns.
http://www.tik.ee.ethz.ch/~huang/talk/ns-tutorial/

Kun-chan Lan

On Sat, 27 Jan 2001, Sowmya Manjanatha wrote:

> 
> Hi,
> 
> I created a new instproc for Node, something like
> 
> Node instproc get-conn { arg1 arg2 } {
> 
> puts "Node::get-conn"
> 
> 
> }
> 
> in the file ns-node.tcl, compiled ns and tried to invoke this
> function from one of my scripts. This resulted in a segmentation
> fault and I figure that the script is not even recognizing this
> function since every other command before this line in the script
> was executed and as I have indicated the very first line which is
> a print did not get through.
> 
> gdb gave me the following sequence of class methods that I cannot
> decipher.
> 
> Can anyone tell me if I ought to do anything more than the above.
> 
> 
> Thanks,
> Sowmya.
> 
> [sowmya@h0060976cfa5c simtest]$ gdb ns core
> GNU gdb 19991004
> 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-redhat-linux"...
> Core was generated by `ns vbr.tcl'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/lib/libtk8.3.so...done.
> Reading symbols from /usr/lib/libtcl8.3.so...done.
> Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
> Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
> Reading symbols from /lib/libnsl.so.1...done.
> Reading symbols from /lib/libdl.so.2...done.
> Reading symbols from /usr/lib/libstdc++-libc6.1-1.so.2...done.
> Reading symbols from /lib/libm.so.6...done.
> Reading symbols from /lib/libc.so.6...done.
> Reading symbols from /lib/ld-linux.so.2...done.
> Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
> #0  0x402c8ea8 in chunk_alloc (ar_ptr=0x4035dd60, nb=32) at malloc.c:2875
> 2875	malloc.c: No such file or directory.
> (gdb) where
> #0  0x402c8ea8 in chunk_alloc (ar_ptr=0x4035dd60, nb=32) at malloc.c:2875
> #1  0x402c85ce in __libc_malloc (bytes=24) at malloc.c:2696
> #2  0x400e0dd0 in TclpAlloc () from /usr/lib/libtcl8.3.so
> #3  0x400e58cf in Tcl_Alloc () from /usr/lib/libtcl8.3.so
> #4  0x40100b90 in SetCmdNameFromAny () from /usr/lib/libtcl8.3.so
> #5  0x401009f7 in Tcl_GetCommandFromObj () from /usr/lib/libtcl8.3.so
> #6  0x400fbc3e in TclExecuteByteCode () from /usr/lib/libtcl8.3.so
> #7  0x400e294c in Tcl_EvalObjEx () from /usr/lib/libtcl8.3.so
> #8  0x4011e630 in TclObjInterpProc () from /usr/lib/libtcl8.3.so
> #9  0x4011e216 in TclProcInterpProc () from /usr/lib/libtcl8.3.so
> #10 0x813170c in OTclDispatch (cd=0x84d1e38, in=0x83305d0, argc=4,
> argv=0xbfffea88)
>     at otcl.c:421
> #11 0x400e1f75 in TclInvokeStringCommand () from /usr/lib/libtcl8.3.so
> #12 0x400fbe24 in TclExecuteByteCode () from /usr/lib/libtcl8.3.so
> #13 0x400e294c in Tcl_EvalObjEx () from /usr/lib/libtcl8.3.so
> #14 0x4011e630 in TclObjInterpProc () from /usr/lib/libtcl8.3.so
> #15 0x401173aa in EvalObjv () from /usr/lib/libtcl8.3.so
> #16 0x40117ab2 in Tcl_EvalEx () from /usr/lib/libtcl8.3.so
> #17 0x4010f643 in Tcl_EvalFile () from /usr/lib/libtcl8.3.so
> #18 0x40111f70 in Tcl_Main () from /usr/lib/libtcl8.3.so
> #19 0x804d405 in main (argc=2, argv=0xbffff9f4) at tclAppInit.cc:60
> Current language:  auto; currently c
> (gdb) 
> 
> 
> 
> 
> 
> *******************************************************************************
> 
>     Sowmya Manjanatha : University of New Hampshire
>     Major             : Computer Science      
>     *********************************************** 
> 
>     email        : [email protected]
> 
> *******************************************************************************
>