Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The TraceLog Service Class

The service class TraceLog logs tracing messages intended to add aid in the analysis and debugging of the translations produced by the tool. Its methods are controlled via various Select debugging flags.


The TraceCalls debugging flag attribute tells the expression processor within the compiler to issues detailed progress messages. These messages can be used to determine why particular types of code have been generated. The output produced is extensive as the following fragment shows.


The TraceChanges debugging flag attribute writes a log message each time the compiler or analyser changes the type or context flags of a component. The message has the following columns:


Column Description of content
subRootThe root offset of the subprogram containing the code upon which the change is based
symRootThe root offset of the component that is being changed
linenoThe approxinent line number of the source statement upon which the change is based
valueThe new value being set
fileThe root offset of the source file containg the code upon which the change is based
changeA code indicating the context in which the change was made


The method TraceLog_LitmusTest

Prototype


Code Block
languagenone
themeEclipse
linenumberstrue
 
void TraceLog_LitmusTest(int subRoot,int iCall)
The TraceLog_LitmusTest method logs a message requested by the LitmusTests debugging flag. This flag attribute directs the analyser to perform various detailed tests on the compiled code as it is processed and transformed into its final form. The messages produced can be used to trace particular problems being introduced into the analysed code. Its parameters are as follows:


Parameter Description
subRootspecifies the root offset of the component whose code is currently being analysed.
iCallspecifies a unique call number that can be used to identify the precise call to this method that is logging the message.


The method TraceLog_GetObjectType

Prototype


Code Block
languagenone
themeEclipse
linenumberstrue
 int TraceLog_GetObjectType(int iCall,int root)
The TraceLog_GetObjectType method traces calls to the Store_GetObjectType method and logs a message for any calls that have a potentially malformed root parameter. Its parameters are as follows:


Parameter Description
iCallspecifies a unique call number that can be used to identify the precise call to this method that is logging the message. The last used value of iCall was 982.
rootspecifies the root offset of the component whose object type is wanted.

The method returns the storage object type of the component if its root offset is well-formed else it returns zero.

The method TraceLog_TraceCall

Prototype


Code Block
languagenone
themeEclipse
linenumberstrue
 
void TraceLog_TraceCall(int iCall,int subCall,int* Parents,char* statement)
The TraceLog_TraceCall method logs a message during compilation requested by the TraceCalls debugging flag. This flag attribute directs the compiler to trace the calls made during compilation. The messages produced can be used to trace particular problems being introduced by the compiler. Its parameters are as follows:


Parameter Description
iCallspecifies a unique call number that can be used to identify the precise call to this method that is logging the message.
subCallspecifies a support value associated with the call to facilitate debugging.
Parentscontains the number and root offsets of the components in whose scope the call occurs.
statementcontains the actual statement that is causing the call.


The method TraceLog_SetTracing

Prototype


Code Block
languagenone
themeEclipse
linenumberstrue
 void TraceLog_SetTracing(int on)
The method TraceLog_SetTracing method turns the call tracing flag on or off. Its parameter is as follows:


Parameter Description of value
onspecifies whether the flag should be on or off. A value of zero turns it off; else it is turned on.


Panel
bgColorCCFFFF
titleTable of Contents

Table of Contents