--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
You can even use the Eclipse debugger.
Alessandro R.
On Thu, Apr 5, 2012 at 7:50 AM, K wrote:
Hi,
I am having problem to set break points for gdb. Here's the scenario:
ns3 is configured by
$ ./waf -d debug --enable-examples --enable-tests configure
I am running the aodv example in the path:
**/ns-allinone-3.12.1/ns-3.12.1/src/aodv/examples
by
$./waf --run aodv --command-template="gdb %s"
I can set break points in aodv.cc but when I tried to set bp in files
not in the current directory (v4ping.cc, for example, which is not in
the same directory), gdb printed info "No source file named
v4ping.cc".
Is there any way to get around this problem?
Thanks for any suggestions.
Kelly
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+unsubscribe@googlegroups.com.
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"PATH-TO-NS3/build/"
$ gdb /path-to-file/build/src/aodv/examples/aodv
(gdb) break ns3::MacRxMiddle::Receive(Ptr<Packet>, const WifiMacHeader)
Can't find member of namespace, class, struct, or union named "ns3::MacRxMiddle::Receive"
Hint: try 'ns3::MacRxMiddle::Receive(Ptr<Packet>, const WifiMacHeader)<TAB> or 'ns3::MacRxMiddle::Receive(Ptr<Packet>, const WifiMacHeader)<ESC-?>
(Note leading single quote.)
Make breakpoint pending on future shared library load? (y or [n])
Breakpoint 1 (ns3::MacRxMiddle::Receive(Ptr<Packet>, const WifiMacHeader)) pending.
(gdb) r
Starting program: /home/trinacriax/repos/ns-3-allinone/ns-3-dev/build/src/aodv/examples/aodv
[Thread debugging using libthread_db enabled]
Creating 10 nodes 100 m apart.
Starting simulation for 10 s ...
PING 10.0.0.10 56(84) bytes of data.
Breakpoint 1, ns3::MacRxMiddle::Receive (this=0x6512a0, packet=..., hdr=0x7fffffffd470) at ../src/wifi/model/mac-rx-middle.cc:248
248 NS_LOG_FUNCTION (packet << hdr);
(gdb)
(gdb) break ns3::V4Ping::Receive
Breakpoint 3 at 0x7ffff6b999a2: file ../src/applications/model/v4ping.cc, line 102.
(gdb) r
Starting program: /home/trinacriax/repos/ns-3-allinone/ns-3-dev/build/src/aodv/examples/aodv
[Thread debugging using libthread_db enabled]
Creating 10 nodes 100 m apart.
Starting simulation for 10 s ...
PING 10.0.0.10 56(84) bytes of data.
Breakpoint 3, ns3::V4Ping::Receive (this=0x6adc90, socket=...) at ../src/applications/model/v4ping.cc:102
102 {
(gdb)
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y <PENDING> ns3::MacRxMiddle::Receive(Ptr<Packet>, const WifiMacHeader)
2 breakpoint keep y <PENDING> ns3::V4Ping::Receive
(gdb)
(gdb) disable 1
(gdb) r
Starting program: /home/trinacriax/repos/ns-3-allinone/ns-3-dev/build/src/aodv/examples/aodv
[Thread debugging using libthread_db enabled]
Creating 10 nodes 100 m apart.
Starting simulation for 10 s ...
PING 10.0.0.10 56(84) bytes of data.
Breakpoint 2, ns3::V4Ping::Receive (this=0x6adc90, socket=...) at ../src/applications/model/v4ping.cc:102
102 {
(gdb)
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/sVwQ7thtMu0J.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.