next up previous contents index
Next: 24.3 Mixing Tcl and Up: 24. Debugging ns Previous: 24.1 Tcl-level Debugging   Contents   Index


24.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



2008-10-06