this repo has no description
1#ifndef _XTRACELIB_H_
2#define _XTRACELIB_H_
3#include <stdint.h>
4#include <darling/emulation/common/simple.h>
5
6#include "base.h"
7#include "string.h"
8
9#ifdef XTRACE_CPP
10struct calldef
11{
12 const char* name;
13 void (*print_args)(xtrace::String* log, int nr, void* args[]);
14 void (*print_retval)(xtrace::String* log, int nr, uintptr_t rv);
15};
16
17void handle_generic_entry(xtrace::String* log, const struct calldef* defs, const char* type, int nr, void* args[]);
18void handle_generic_exit(xtrace::String* log, const struct calldef* defs, const char* type, uintptr_t retval, int force_split);
19
20void xtrace_set_gray_color(xtrace::String* log);
21void xtrace_reset_color(xtrace::String* log);
22
23void xtrace_start_line(xtrace::String* log, int indent);
24#endif
25
26XTRACE_DECLARATIONS_C_BEGIN
27
28extern int xtrace_no_color;
29
30void xtrace_log(const char* format, ...) __attribute__((format(printf, 1, 2)));
31void xtrace_log_v(const char* format, va_list args) __attribute__((format(printf, 1, 0)));
32void xtrace_error(const char* format, ...) __attribute__((format(printf, 1, 2)));
33void xtrace_error_v(const char* format, va_list args) __attribute__((format(printf, 1, 0)));
34
35void xtrace_abort(const char* message) __attribute__((noreturn));
36
37XTRACE_DECLARATIONS_C_END
38
39#endif
40