next up previous contents index
Next: 18.3 Mixing Tcl and Up: 18. Debugging ns Previous: 18.1 Tcl-level Debugging

   
18.2 C++-Level Debugging

Debugging at C++ level can be done using any standard debugger. The following macro for gdb makes it easier to see what happens in Tcl-based subroutines:

## for Tcl code
define pargvc
set $i=0
while $i \< argc
  p argv[$i]
  set $i=$i+1
  end
end
document pargvc
Print out argc argv[i]'s common in Tcl code.
(presumes that argc and argv are defined)
end




2000-08-24