Hi, ns users,
I am in trouble when debuging the NS2. After re-compling the NS with the
parapmeter '-g ' , I began to debug NS. I set a breakpoint in packet.h.
But GDB did not trace into it and tell me 'no file or dictionary'. I am
confused now.
Thanks in advance.
yanzwyanzw
There are some detail information as follow.
============================================================
:~/ns-allinone-2.29/ns-2.29/tcl/ex$ gdb ns
GNU gdb 6.3-debian
....
This GDB was configured as "i486-linux-gnu"...Using host libthread_db
library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) set args worm.tcl
(gdb) b Packet::init(Packet*)
Breakpoint 1 at 0x8054f60: file packet.h, line 534.
(gdb) info b
Num Type Disp Enb Address What
1 breakpoint keep y 0x08054f60 in Packet::init(Packet*) at
packet.h:534
(gdb) r
Starting program: /home/yanzw/ns-allinone-2.29/bin/ns worm.tcl
[Thread debugging using libthread_db enabled]
[New Thread -1211987744 (LWP 26566)]
[New Thread -1211991120 (LWP 26569)]
(0 1) 25Mb 10ms DropTail
(0 2) 25Mb 10ms DropTail
(0 3) 25Mb 10ms DropTail
... ...
A 56.00 157580 2019 39900 0 0
A 57.00 157283 2316 39900 0 0
A 58.00 156944 2655 39900 0 1
[Switching to Thread -1211483936 (LWP 26362)]
Breakpoint 1, Packet::init (p=0x9ec6268) at packet.h:534
534 packet.h: No such file or directory.
in packet.h
... ...
(gdb) info sources
Source files for which symbols have been read in:
/home/yanzw/ns-allinone-2.29/ns-2.29/diffusion3/ns/diffrtg.cc,
/home/yanzw/ns-allinone-2.29/tclcl-1.17/tclcl.h, diffrtg.h, iodev.hh,
/usr/include/c++/4.0.2/bits/stl_list.h, /usr/include/c
++/4.0.2/bits/list.tcc,
/usr/include/c++/4.0.2/bits/allocator.h,
/usr/include/c++/4.0.2/ext/mt_allocator.h, message.hh,
/usr/include/c++/4.0.2/bits/stl_vector.h,
/usr/include/c++/4.0.2/bits/stl_construct.h, packet.h, flags.h,
address.h,
basetrace.h, agent.h, ip.h, ns-process.h, packet-stamp.h,
filter_core.hh,
timers.hh, scheduler.h, <<C++-namespaces>>
Source files for which symbols will be read in on demand:
crtn.S, /build/buildd/glibc-2.3.5/build-tree/i386-libc/csu/crtn.S,
tclcl.h,
/home/yanzw/ns-allinone-2.29/tclcl-1.17/embedded-tclobj.cc, tracedvar.h,
/home/yanzw/ns-allinone-2.29/tclcl-1.17/tracedvar.cc,
/home/yanzw/ns-allinone-2.29/tclcl-1.17/Tcl2.cc, tclcl-mappings.h,
/home/yanzw/ns-allinone-2.29/tclcl-1.17/Tcl.cc, ptypes.cc,
/home/yanzw/ns-allinone-2.29/ns-2.29/gen/ptypes.cc, ns_tcl.cc,
/home/yanzw/ns-allinone-2.29/ns-2.29/gen/ns_tcl.cc,
/home/yanzw/ns-allinone-2.29/ns-2.29/gen/version.c, vector.tcc,
stl_uninitialized.h, stl_algobase.h, list.tcc, stl_map.h,
stl_function.h,
---Type <return> to continue, or q <return> to quit---
... ...
=============================================================