Set breakpoints at one place in star.cc with a condition using gdb (GNU Debugger)
Set one breakpoint in a C++ program ‘star.cc’ using gdb (GNU Debugger). The program star.cc can be found in examples/tcp. Copy this program in scratch folder and follow the steps given below to start debugging a program using gdb in ns-3:
- Copy star.cc from examples/tcp to scratch
- Configure and build ns-3.
- Execute command: ./waf shell
- Execute command: gdb build/scratch/star
- Set breakpoints at line numbers 96 with condition i = 3.
- Run the program.
- Print value of i.
Provide the snapshots at each step for evaluation of the completed task.
Reference to gdb commands.