ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
instrument_log.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
45#pragma once
46
47#include <stdbool.h>
48#include <stddef.h>
49#include <stdint.h>
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
61enum {
65};
66
73#if defined(__clang__)
74#define ASCII_INSTR_SOURCE_PRINT_SIGNAL_HANDLER __attribute__((annotate("ASCII_INSTR_SOURCE_PRINT_SIGNAL_HANDLER")))
75#else
76#define ASCII_INSTR_SOURCE_PRINT_SIGNAL_HANDLER
77#endif
78
89
103
113
124
142void asciichat_instr_log_line(const char *file_path, uint32_t line_number, const char *function_name,
143 const char *snippet, uint8_t is_macro_expansion);
144
154
165void asciichat_instr_log_pc(uintptr_t program_counter);
166
169#ifdef __cplusplus
170}
171#endif
unsigned int uint32_t
Definition common.h:58
unsigned char uint8_t
Definition common.h:56
bool asciichat_instr_coverage_enabled(void)
Check if coverage logging is enabled.
void asciichat_instr_runtime_destroy(asciichat_instr_runtime_t *runtime)
Destroy a runtime context and release resources.
void asciichat_instr_runtime_global_shutdown(void)
Global shutdown of the instrumentation system.
void asciichat_instr_log_line(const char *file_path, uint32_t line_number, const char *function_name, const char *snippet, uint8_t is_macro_expansion)
Log a source line execution event.
void asciichat_instr_log_pc(uintptr_t program_counter)
Log a program counter for coverage analysis.
asciichat_instr_runtime_t * asciichat_instr_runtime_get(void)
Get or create the thread-local runtime context.
@ ASCII_INSTR_SOURCE_PRINT_MACRO_INVOCATION
@ ASCII_INSTR_SOURCE_PRINT_MACRO_EXPANSION
@ ASCII_INSTR_SOURCE_PRINT_MACRO_NONE
char file_path[PLATFORM_MAX_PATH_LENGTH]
Definition mmap.c:37