Generating Reports

To generate reports when one of the BITCOV variants are used, an auxiliary tool dmp2txt is used to convert the dumped array to the text version (MON.txt) of the coverage data file.

Note: When the MON.txt file is finally generated, it is further processed as in the standard HOTA workflow, using ctc2dat, ctcpost and typically ctc2html.

MON.dmp file is a copy from the target memory CTC_array[] vector. Logically it is a binary file. If the file has been captured from the target by gdb debugger, the dumped file is in one of the gdb dump file formats. Or the file can be "straight binary", in which case it is as if it were written from the target memory by the following C code snippet:

/*Code snippet to explain the straigth binary format of MON.dmp*/
#include <stdio.h >
 unsigned char CTC_array[0xff];
 void dumpit()
 {
  FILE *fp = fopen("MON.dmp","wb");
  fwrite(CTC_array, sizeof(CTC_array),
          sizeof(unsigned char), fp);
  fclose(fp);
 }

dmp2txt detects automatically if the file is in some of the gdb dump file formats (Intel hex, Motorola s-record, Tektronix and Verilog formats are recognized) or if it is "straight binary".

The dmp2txt utility converts the binary form coverage data from MON.dmp to HOTA toolchain’s MON.txt format. The conversion needs the MON.aux file, created when the code was instrumented. The result is written to stdout. It can be directed to a file or directly piped to ctc2dat utility to get the coverage data to MON.dat form.

Syntax and Options of dmp2txt

dmp2txt [options] dump-file aux-file
-h, --help
Displays help on screen
-l8, -l16, -l32, -l64, -l128, -b8, -b16, -b32, -b64, -b128
Endianness (l/b) and number of bits per array element. 1 is default, and the options -l8 and -b8 are the same.
--dump2, --force
Needed for support's debug purposes only.

Examples

dmp2txt MON.dmp MON.aux > MON.txt
dmp2txt MON.dmp MON.aux >> MON.txt
dmp2txt MON.dmp MON.aux | ctc2dat