PatchworkOS
Loading...
Searching...
No Matches
Debugging

Debugging. More...

Macros

#define AML_DEBUG_ERROR(ctx, format, ...)   aml_debug_error(ctx, __func__, format, ##__VA_ARGS__)
 Macro to simplify calling aml_debug_error() with the current function name.
 

Functions

void aml_debug_error (aml_term_list_ctx_t *ctx, const char *function, const char *format,...)
 Log a debug error message with context information.
 

Detailed Description

Debugging.

Macro Definition Documentation

◆ AML_DEBUG_ERROR

#define AML_DEBUG_ERROR (   ctx,
  format,
  ... 
)    aml_debug_error(ctx, __func__, format, ##__VA_ARGS__)

Macro to simplify calling aml_debug_error() with the current function name.

Definition at line 30 of file debug.h.

Function Documentation

◆ aml_debug_error()

void aml_debug_error ( aml_term_list_ctx_t ctx,
const char *  function,
const char *  format,
  ... 
)

Log a debug error message with context information.

Errors should be used for unrecoverable faults such as invalid AML bytecode or runtime errors like runing out of memory.

Parameters
ctxThe AML term list context.
functionThe function name where the error occurred.
formatThe format string for the error message.
...Additional arguments for the format string.

Definition at line 96 of file debug.c.

References aml_debug_dump(), aml_method_find(), AML_NAME_TO_STRING, aml_term_list_ctx_t::current, DEREF, aml_term_list_ctx_t::end, aml_method_obj_t::end, aml_state_t::errorDepth, LOG_ERR, LOG_LEVEL_ERR, log_vprint(), NULL, aml_term_list_ctx_t::start, aml_method_obj_t::start, start(), aml_term_list_ctx_t::state, va_end, and va_start.