Friday, October 28, 2011

How to use gdb with NS2

I have always faced the problem of segmentation fault many time while performing simulation on NS2. Using gdb is one of the way to find in which function problem is being occurred. So i am just writing it down how to use gdb with NS2

Step1: Go to NS folder via change director command cd.
Step2: Start gdb with NS2 using command gdb ns
Step3: Start the simulation file (say multi.tcl in test folder) using command run test/multi.tcl

Result: Program stops and display the function where segmentation fault has occurred

-----------------
Usman Shahid

No comments:

Post a Comment