BB2 C port
API reference: Blitz libraries in C and the shared code
Loading...
Searching...
No Matches
covfmt.h
Go to the documentation of this file.
1/*
2 * covfmt.h - the format of a coverage file (TEST:cov/<program>.cov), as
3 * the coverage variants of the programs write it and testinfo map reads it.
4 *
5 * All fields are 32-bit big-endian (the m68k's own order):
6 *
7 * offset 0 COVFMT_MAGIC ("BCOV")
8 * offset 4 COVFMT_VERSION
9 * offset 8 the size of the code hunk in bytes (the .text size of the
10 * program's link map)
11 * offset 12 the length of the bitmap in bytes,
12 * COVFMT_BITMAP_LEN(code size)
13 * offset 16 the bitmap
14 *
15 * Bit i stands for the function that starts at offset 2 * i of the code
16 * hunk: byte i / 8, mask 1 << (i % 8). A set bit means the function was
17 * called at least once.
18 */
19#ifndef COVFMT_H
20#define COVFMT_H
21
22#define COVFMT_MAGIC 0x42434F56UL /* "BCOV" */
23#define COVFMT_VERSION 1
24#define COVFMT_HEADER_SIZE 16
25#define COVFMT_BITMAP_LEN(code_size) (((code_size) / 2 + 7) / 8)
26
27#endif