Build your application with a generated tracer

To build your application with a tracer which barectf generates using GCC:

$ gcc my-app.c barectf.c

Note that you probably need to build a platform into your application too:

$ gcc my-app.c barectf.c platform.c

You can also build the tracer and/or the platform as dynamic libraries and link your application to them if your system supports this feature.

Compiler requirements

barectf generates ANSI C code, with the exception of a requirement for stdint.h, which is part of C99.

If your C standard library doesn’t offer stdint.h, you need to create this file and define the following type definitions:

  • uint8_t

  • uint16_t

  • uint32_t

  • uint64_t

  • int8_t

  • int16_t

  • int32_t

  • int64_t

Example 1. Custom stdint.h.

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long uint64_t;
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef signed long int64_t;

#endif /* _BARECTF_STDINT_H */

Supported C compilers

The C code which barectf generates is known to be compilable by the following compilers: