User Tools

Site Tools


cdc:nos2.source:nam5871:ns_dbg

NS$DBG

Table Of Contents

  • [00002] PROC NS$DBG1)
  • [00004] NS$DBG - TRACE PROCEDURE CALLS.
  • [00008] TRACE PROCEDURE CALLS.

Source Code

NS$DBG.txt
  1. *DECK NS$DBG
  2. PROC NS$DBG((PROCNAME)); # TRACE PROCEDURE CALLS #
  3.  
  4. # TITLE NS$DBG - TRACE PROCEDURE CALLS.#
  5.  
  6. BEGIN # NS$DBG #
  7. #
  8. ** NS$DBG - TRACE PROCEDURE CALLS.
  9. *
  10. * J.C. LEE 1981
  11. *
  12. * THIS ROUTINE PROCESS TRACE PROCEDURE CALLS.
  13. *
  14. * PROC NS$DBG(PROCNAME)
  15. *
  16. * ENTRY:
  17. * PROCNAME - PROCEDURE NAME.
  18. *
  19. * EXIT:
  20. * NONE.
  21. *
  22. * NOTE:
  23. * CODE IN THIS PROC ONLY COMPILED IN DEBUG MODE.
  24. *
  25. * METHOD:
  26. * STORE PROCEDURE NAME INTO TRACE TABLE. IF TABLE IS FULL,
  27. * RESET INDEX TO POINT TO THE BEGINNING OF TABLE, AND
  28. * OVERRIDE TABLE.
  29. *
  30. #
  31.  
  32. ITEM PROCNAME C(10); # PROCEDURE NAME #
  33.  
  34. $BEGIN
  35.  
  36. ITEM CURINDEX U = 0; # CURRENT INDEX OF TRACE TABLE #
  37.  
  38. DEF L$TRACETAB # 100 #;# TRACE TABLE SIZE #
  39. ARRAY TRACETABLE [1:L$TRACETAB] S(1);
  40. BEGIN
  41. ITEM TT$PROCNAM C(0,0,10) = [L$TRACETAB(0)];
  42. END
  43.  
  44. CONTROL EJECT;
  45.  
  46. CURINDEX = CURINDEX + 1;
  47. IF CURINDEX GR L$TRACETAB
  48. THEN # INDEX EXCEEDS TABLE SIZE #
  49. CURINDEX = 1; # RESET INDEX TO 1 #
  50.  
  51. TT$PROCNAM[CURINDEX] = PROCNAME;
  52.  
  53. $END
  54.  
  55. RETURN;
  56. END # NS$DBG #
  57. TERM
1)
PROCNAME
cdc/nos2.source/nam5871/ns_dbg.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator