ldr: ifdef logging

This commit is contained in:
Lightos1
2026-07-26 21:36:12 +02:00
parent 9eb53f5a0b
commit 8c54df039f
4 changed files with 30 additions and 10 deletions

View File

@@ -28,11 +28,22 @@
#include "customize.hpp"
#include "oc_log.hpp"
#if HOC_UART_LOG
#define LOGGING(fmt, ...) ::ams::ldr::hoc::UartLog(fmt, ##__VA_ARGS__)
#if ((!defined(HOC_UART_LOG)) && (defined(AMS_BUILD_FOR_AUDITING) || defined(AMS_BUILD_FOR_DEBUGGING)))
#define HOC_IRAM_LOG 1
#else
#define LOGGING(fmt, ...) ((void)0)
#define HOC_IRAM_LOG 0
#endif
#if defined(AMS_BUILD_FOR_AUDITING) || defined(AMS_BUILD_FOR_DEBUGGING)
#if defined(HOC_IRAM_LOG)
#define LOGGING(...) Log(__VA_ARGS__)
#else if defined(HOC_UART_LOG)
#define LOGGING(...) AMS_LOG(__VA_ARGS__)
#endif
#else
#define LOGGING(...) ((void)0)
#endif
#define CRASH(msg, ...) { ams::diag::AbortImpl(msg, __PRETTY_FUNCTION__, "", 0); __builtin_unreachable(); }
#define PATCH_OFFSET(offset, value) \