Hello friends,
I have successfully set up ns-3-dce with libos mptcp ( see here how :
https://groups.google.com/forum/#!topic/ns-3-users/M3A5ydBLktY )
My aim is to debug the code at $HOME/net-next-nuse/net/mptcp/mptcp_sched.c
How do I do so ?
I have tried the following :
lawrence@lawrence:~/ns-3-dce$ ./waf --run dce-iperf-mptcp --command-template="gdb --args %s"
Waf: Entering directory `/home/lawrence/ns-3-dce/build'[ 10/367]
lib/pkgconfig/libns3-dev-netlink-debug.pc: -> build/lib/pkgconfig/libns3-dev-netlink-debug.pc[116/367]
lib/pkgconfig/libns3-dev-dce-debug.pc: -> build/lib/pkgconfig/libns3-dev-dce-debug.pcWaf: Leaving directory `/home/lawrence/ns-3-dce/build'
'build' finished successfully (0.225s)GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<
http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<
http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/lawrence/ns-3-dce/build/
bin/dce-iperf-mptcp...done.
(gdb) b write
Function "write" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (write) pending.
(gdb) run
Starting program: /home/lawrence/ns-3-dce/build/bin/dce-iperf-mptcp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, write () at ../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) step
ns3::ElfCache::CopyFile (this=0x7ffff7dd8f00 <ns3::CoojaLoader::Peek()::modules>, source="/home/lawrence/net-next-nuse/liblinux.so", destination="elf-cache/0/liblinux.so") at ../model/elf-cache.cc:65
65 bytes_written += written;
(gdb) step
62 while (bytes_written != bytes_read)
(gdb) step
67 bytes_read = read (src, buffer, 1024);
(gdb) step
read () at ../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) step
ns3::ElfCache::CopyFile (this=0x7ffff7dd8f00 <ns3::CoojaLoader::Peek()::modules>, source="/home/lawrence/net-next-nuse/liblinux.so", destination="elf-cache/0/liblinux.so") at ../model/elf-cache.cc:59
59 while (bytes_read > 0)
(gdb)
I think I should enter and debug the library at $HOME/net-next-nuse/liblinux.so to get to the mptcp_sched.c file. However I don't know how as gdb doesn't seem to leave the file ../model/elf-cache.cc
What do I do ?