sysTrace

C Scripting Language
Reference Manual
Version 4.4.0

<< Back  End  Next >>
 
 
INDEX
Introduction
Installation
Using the CSL executive
Language
Directives
System library
   sysCommand
   sysDate
   sysDateFormat
   sysDateTime
   sysDirectory
   sysElapsed
   sysEnvVar
   sysLoadScript
   sysLoadLibrary
   sysLog
   sysLogFile
   sysLogLevel
   sysPrompt
   sysSleep
   sysSecondsSince
   sysShow
   sysStartDate
   sysStartDateTime
   sysStartTime
   sysStartTimestamp
   sysTime
   sysTimestamp
   sysTrace
String library
Math library
Regular expression lib.
File library
Database library
Async Communication
Registry/Profile handling
Windows control
C API
C++ Class Interface
CSL links
  
sysTrace(
  [const mode])  // sysTrace...

Query or set trace mode. Predefined mode constants are:

Mode Description
sysTraceNone Trace output is turned off (default)
sysTraceCode Trace P-code instructions together with the 2 top stack elements.
sysTraceFuncs Trace function entry and exit. Trace output will be indented within the function.
sysTraceBlks Trace entry and exit of named blocks. Trace output will be indented within the block. Use #block to name blocks.
sysTraceMsgs Trace expressions of trace statement or API ZCslTrace and ZCsl::trace member.

The mode constants above may be combined by adding them. Combined constants are predefined as:

Mode Description
sysTraceInfo sysTraceFuncs + sysTraceBlks + sysTraceMsgs
sysTraceAll sysTraceCode + sysTraceFuncs + sysTraceBlks + sysTraceMsgs

Returns: current trace mode.

Example:

sysTrace(sysTraceCode); // turn tracing on

The trace output may look somewhat as:

test.csl: var main()
 
address opcode parameter       tos             tos-1
------- ------ --------------- --------------- ---------------
     19 push   x               <stack bottom>
     20 incv                   x               <stack bottom>
     21 jmp    7               <stack bottom>
      7 push   x               <stack bottom>
      8 load                   x               <stack bottom>
      9 push   5               3               <stack bottom>
     10 lss                    5               3
     11 jf     22              1               <stack bottom>
      .  .      .              .               .
  Copyright © IBK Landquart Last revision: 27.05.2002 << Back  Top  Next >>