The Data File Converter ctc2dat

If HOTA is used, the coverage data is written in textualized form, usually to a text file MON.txt. With ctc2dat, this input is converted to the standard data file format ("MON.dat").

Example for the call

ctc2dat -i MON.txt -o MON.dat

Options

-h
Shows command line help.
-i inputfile
The input text-encoded coverage data file, normally MON.txt. In the absence of this parameter, the input is read from stdin.
-o outputfile
The output data file name, including its possible path. In the absence of this option, the output data file name and path is derived from each instrumented file and from the environment variables CTC_DATA_PATH and CTC_DATA_NAME, if defined. This output file is further processed with ctcpost to generate coverage reports..
-b
Brief log messages are written to stdout.
-s
No log messages are written to stdout. In the absence of options –b or –s, the tool runs in verbose mode and writes some more messages about its processing to stdout.

The input

ctc2dat is able to process input data in two different forms. In the default implementation, the MON.txt looks like:
Dump of CTC++ coverage data from target memory at Wed May 09 10:54:20 2018:

<START:MODUL,Y,e,1,4,3,4,0,1fGJv3,fjLll,18,w,1U,1b,1s,1b,1v,1n,1q,1j,1U,1u,v,m
,1U,1c,1n,1b,1U,1d,1w,1Z,1l,1o,1k,1d,1r,1U,1b,1Z,1k,1b,k,1b,18,w,1U,1b,1s,1b,1
v,1n,1q,1j,1U,1u,v,m,1U,1c,1n,1b,1U,1d,1w,1Z,1l,1o,1k,1d,1r,1U,1g,1n,1s,1Z,1U,
1F,1H,1G,k,1c,1Z,1s,3,1,1,0,1,1,02,1,1,0,2,0,1,0,MODUL,W,e,2,2,1,02,1fGJv3,3I9
ybO,18,w,1U,1b,1s,1b,1v,1n,1q,1j,1U,1u,v,m,1U,1c,1n,1b,1U,1d,1w,1Z,1l,1o,1k,1d
,1r,1U,1h,1n,k,1b,18,w,1U,1b,1s,1b,1v,1n,1q,1j,1U,1u,v,m,1U,1c,1n,1b,1U,1d,1w,
1Z,1l,1o,1k,1d,1r,1U,1g,1n,1s,1Z,1U,1F,1H,1G,k,1c,1Z,1s,4,3,4,3,0,4,MODUL,Z,e,
1,1,2,02,1fGJv3,1ThfWL,18,w,1U,1b,1s,1b,1v,1n,1q,1j,1U,1u,v,m,1U,1c,1n,1b,1U,1
d,1w,1Z,1l,1o,1k,1d,1r,1U,1o,1q,1h,1l,1d,k,1b,18,w,1U,1b,1s,1b,1v,1n,1q,1j,1U,
1u,v,m,1U,1c,1n,1b,1U,1d,1w,1Z,1l,1o,1k,1d,1r,1U,1g,1n,1s,1Z,1U,1F,1H,1G,k,1c,
1Z,1s,1,1,3,2,1,1,>

In this example, coverage data for three source files ("MODUL") was stored in one step.

If a debug log is used to bring the coverage data to the host, each line shall be started with "CTCDATA:". Then the whole log can be used as an input, and ctc2dat sorts out all other lines.