Top Prev Next Up Down

The change from TEST to Quality Assurance involves a process to remove debug code from the source code. this process is described in CodeReWrite.

Tables GC and ULTcase is dependent on the evolution of the Unicode and when new characters is added,then these tables has to change. But if this is done the whole package Y2018-Text has to be reassembled. Tools for generating GC and ULTcase here.

Procedures for debug purpose in Y2018-Text code

All debug is published to the active path (PWD) during the run to files named

  1. “q” & Ada.Task_Identification.Image(Ada.Task_Identification.Current_Task) & ".lst"
  2. “q” & Ada.Task_Identification.Image(Ada.Task_Identification.Current_Task) & "_alt.lst"

The prefix”q” is used for making it eazier to spot debug files.

This debug is built for use in a multi-process environment and the name must contain the name of the current task.
(Y2018.Text.TestQ)

Qinit(s:String) – will remove all regular files in the active path with a name beginning with ‘q’ and with the suffix ‘.lst’. After the removing of files a call of Qblock(s) is executed.

Qblock(s:String) – publish a box to the debug file with the parameter

Type ANKA is used for prefixing a debug row

When a new debug file is created it is ‘stamped’ with this command

Put_Line(fileOut,"TIMESTAMP " & GNAT.Time_Stamp.Current_Time)

to make it sure that the contents is from this run. Note that a new debug file is also created when the debug is in a new thread.

Qappend or Qappend_alt procedure calls prints to the actual debug file. Structure of the call

  1. ANKA type value for prefixing (optional)
  2. String type value, except CList maps
  3. (other parameters)
All variations of the procedure call. Note Qappend_alt can be substituted for Qappend.

Qappend and Qappend_alt with CList maps

procedure Qappend(map:in out Y2018.Text.Core.Str.Clist.Map;startRow:String:="";endRow:String:="";rowPrefix:String:="";keep:Boolean:=FALSE);
procedure Qappend(a:ANKA;map:in out Y2018.Text.Core.Str.Clist.Map;startRow:String:="";endRow:String:="";rowPrefix:String:="";keep:Boolean:=FALSE);

map – maps to list
startRow – row on the list before any map rows (default no start row)
endRow – row on the list after last map row (default no end row)
rowPrefix – a second prefix for map rows
keep - if true donnot remove items from CList map

Example ExMy of output to a q____.lst file from Qappend's and Qinit.

Sometimes it is important to publish debug to another file, and this is the reason for the ‘_alt’ procedures.