provided by the user.
-installing
+Installing
----------
Make sure you have `pip` for Python 3. On the latest Ubuntu releases,
sudo pip3 install barectf
-using
+Using
-----
Using barectf involves:
contains a few complete examples.
-### writing the CTF metadata
+### Writing the CTF metadata
The **Common Trace Format** is a specialized file format for recording
trace data. CTF is designed to be very fast to write and very flexible.
by barectf.
-#### types
+#### Types
The supported structure field types are:
running `barectf`.
-##### integers
+##### Integers
CTF integers are defined like this:
clock. You may always follow the example above.
-##### floating point numbers
+##### Floating point numbers
CTF floating point numbers are defined like this:
custom floating point number to this when calling the tracing function).
-##### strings
+##### Strings
CTF strings are pretty simple to define:
buffer to mark the end of the recorded string).
-##### enumerations
+##### Enumerations
CTF enumerations associate labels to ranges of integer values. They
are a great way to trace named states using an integer. Here's an
integer function parameter compatible with the associated CTF integer type.
-##### static arrays
+##### Static arrays
Structure field names may be followed by a subscripted constant to
define a static array of the field type:
on an 8-bit boundary.
-##### dynamic arrays
+##### Dynamic arrays
Just like static arrays, dynamic arrays are defined using a subscripted
length, albeit in this case, this length refers to another field using
with a native byte order.
-##### structures
+##### Structures
Structures contain fields associating a name to a type. The fields
are recorded in the specified order within the CTF binary stream.
in a human-readable form by the CTF reader thanks to the CTF metadata.
-#### type aliases
+#### Type aliases
Type aliases associate a name with a type definition. Any type may have
any name. They are similar to C `typedef`s.
```
-### running the `barectf` command
+### Running the `barectf` command
Using the `barectf` command-line utility is easy. In its simplest form,
it outputs a few C99 files out of a CTF metadata file:
barectf --output /custom/path metadata
-### using the generated C99 code
+### Using the generated C99 code
This section assumes you ran `barectf` with no options:
tracing function.
-### reading CTF traces
+### Reading CTF traces
To form a complete CTF trace, put your CTF metadata file (it should be
named `metadata`) and your binary stream files (concatenations of CTF