lks9 / src-tracer

Other
0 stars 0 forks source link

Tracing + Logging #35

Open lks9 opened 1 year ago

lks9 commented 1 year ago

The idea is to allow extra logging while tracing. This is then also considered while retracing.

Approach: Manually instrument the original source code with the following macros:

LOG_INTEGER( i );
LOG_STRING( s );
LOG_DATA( buf, size );

Basically, the trace format allows that already by using _TRACE_SET_LEN_x, _TRACE_SET_LEN_STRING and _TRACE_SET_LEN_PREFIX for integers, null-terminated strings and data with size up to 255 bits (logging data with a bigger size would not be helpful anyways). So the remaining steps are: