diff --git a/include/common/trace.h b/include/common/trace.h new file mode 100644 index 0000000..187ba90 --- /dev/null +++ b/include/common/trace.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2026, Mirocom Laboratories + * Provided under the BSD-3 clause + * + * Abstract: + * This header provides trace helpers. + * Author: + * Ian M. Moffett + */ + +#ifndef COMMON_TRACE_H +#define COMMON_TRACE_H 1 + +#include +#include "common/state.h" + +#define trace_error(state, fmt, ...) \ + printf("fatal: " fmt, ##__VA_ARGS__); \ + printf("near line %d\n", (state)->line_num); + +#endif /* !COMMON_TRACE_H */