The ns-3 Network Simulator Project

Use breakpoints and backtrace in star.cc

Set breakpoint for the OnOffHelper function (src/applications/helper/on-off-helper.cc:32) called by the main function in star.cc. When the breakpoint is reached during the execution, list the trace of functions calling it and understand the line from where it is called. Do this every time the function is called. The program star.cc can be found in examples/tcp.

The steps to complete this task are as follows:

  1. Configure and build ns-3 (not needed if ns-3 is already configured and built).
  2. Copy star.cc from examples/tcp to scratch.
  3. Execute the command: ./waf shell.
  4. Execute command: gdb build/scratch/star
  5. Set breakpoints for the OnOffHelper function.
  6. List the breakpoint.
  7. Run till execution reaches the breakpoint. (Perform steps 7 and 8 each time the breakpoint is reached).
  8. List the trace for the function call.
  9. Provide the snapshots at each step for the evaluation of the completed task.

Task tags

  • training
  • code
  • gdb

Students who completed this task

hax0kartik, BoredPerson, ra1nst0rm3d, Kr0n0s, SaiMyGuy, howie

Task type

  • code Code
  • chrome_reader_mode Documentation / Training
  • assessment Outreach / Research
close

2019