PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
debug.h
Go to the documentation of this file.
1#pragma once
2
5
6/**
7 * @brief Debugging
8 * @defgroup modules_acpi_aml_debug Debugging
9 * @ingroup modules_acpi_aml
10 *
11 * @{
12 */
13
14/**
15 * @brief Log a debug error message with context information.
16 *
17 * Errors should be used for unrecoverable faults such as invalid AML bytecode or runtime errors like runing out of
18 * memory.
19 *
20 * @param ctx The AML term list context.
21 * @param function The function name where the error occurred.
22 * @param format The format string for the error message.
23 * @param ... Additional arguments for the format string.
24 */
25void aml_debug_error(aml_term_list_ctx_t* ctx, const char* function, const char* format, ...);
26
27/**
28 * @brief Macro to simplify calling `aml_debug_error()` with the current function name.
29 */
30#define AML_DEBUG_ERROR(ctx, format, ...) aml_debug_error(ctx, __func__, format, ##__VA_ARGS__)
31
32/** @} */
void aml_debug_error(aml_term_list_ctx_t *ctx, const char *function, const char *format,...)
Log a debug error message with context information.
Definition debug.c:96
Context for reading a TermList.
Definition term.h:37