mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 07:19:20 +00:00
Update kernel
This commit is contained in:
@ -23,13 +23,15 @@
|
||||
enum DebugLevel
|
||||
{
|
||||
DebugLevelNone = 0,
|
||||
DebugLevelError = 1,
|
||||
DebugLevelWarning = 2,
|
||||
DebugLevelInfo = 3,
|
||||
DebugLevelDebug = 4,
|
||||
DebugLevelTrace = 5,
|
||||
DebugLevelFixme = 6,
|
||||
DebugLevelUbsan = 7
|
||||
DebugLevelError,
|
||||
DebugLevelWarning,
|
||||
DebugLevelInfo,
|
||||
DebugLevelDebug,
|
||||
DebugLevelTrace,
|
||||
DebugLevelFixme,
|
||||
DebugLevelUbsan,
|
||||
DebugLevelStub,
|
||||
DebugLevelFunction,
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -48,12 +50,15 @@ namespace SysDbg
|
||||
#ifdef DEBUG
|
||||
#define debug(Format, ...) SysDbg::WriteLine(DebugLevelDebug, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define ubsan(Format, ...) SysDbg::WriteLine(DebugLevelUbsan, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define function(Format, ...) SysDbg::WriteLine(DebugLevelFunction, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#else
|
||||
#define debug(Format, ...)
|
||||
#define ubsan(Format, ...)
|
||||
#define function(Format, ...)
|
||||
#endif
|
||||
#define trace(Format, ...) SysDbg::WriteLine(DebugLevelTrace, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define fixme(Format, ...) SysDbg::WriteLine(DebugLevelFixme, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define stub SysDbg::WriteLine(DebugLevelStub, __FILE__, __LINE__, __FUNCTION__, "stub")
|
||||
|
||||
#define locked_error(Format, ...) SysDbg::LockedWriteLine(DebugLevelError, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_warn(Format, ...) SysDbg::LockedWriteLine(DebugLevelWarning, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
@ -61,12 +66,15 @@ namespace SysDbg
|
||||
#ifdef DEBUG
|
||||
#define locked_debug(Format, ...) SysDbg::LockedWriteLine(DebugLevelDebug, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_ubsan(Format, ...) SysDbg::LockedWriteLine(DebugLevelUbsan, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_function(Format, ...) SysDbg::LockedWriteLine(DebugLevelFunction, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#else
|
||||
#define locked_debug(Format, ...)
|
||||
#define locked_ubsan(Format, ...)
|
||||
#define locked_function(Format, ...)
|
||||
#endif
|
||||
#define locked_trace(Format, ...) SysDbg::LockedWriteLine(DebugLevelTrace, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_fixme(Format, ...) SysDbg::LockedWriteLine(DebugLevelFixme, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_stub SysDbg::LockedWriteLine(DebugLevelStub, __FILE__, __LINE__, __FUNCTION__, "stub")
|
||||
|
||||
#else
|
||||
|
||||
@ -81,12 +89,15 @@ void SysDbgLockedWriteLine(enum DebugLevel Level, const char *File, int Line, co
|
||||
#ifdef DEBUG
|
||||
#define debug(Format, ...) SysDbgWriteLine(DebugLevelDebug, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define ubsan(Format, ...) SysDbgWriteLine(DebugLevelUbsan, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define function(Format, ...) SysDbgWriteLine(DebugLevelFunction, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#else
|
||||
#define debug(Format, ...)
|
||||
#define ubsan(Format, ...)
|
||||
#define function(Format, ...)
|
||||
#endif
|
||||
#define trace(Format, ...) SysDbgWriteLine(DebugLevelTrace, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define fixme(Format, ...) SysDbgWriteLine(DebugLevelFixme, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define stub SysDbgWriteLine(DebugLevelStub, __FILE__, __LINE__, __FUNCTION__, "stub")
|
||||
|
||||
#define locked_error(Format, ...) SysDbgLockedWriteLine(DebugLevelError, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_warn(Format, ...) SysDbgLockedWriteLine(DebugLevelWarning, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
@ -94,15 +105,16 @@ void SysDbgLockedWriteLine(enum DebugLevel Level, const char *File, int Line, co
|
||||
#ifdef DEBUG
|
||||
#define locked_debug(Format, ...) SysDbgLockedWriteLine(DebugLevelDebug, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_ubsan(Format, ...) SysDbgLockedWriteLine(DebugLevelUbsan, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_function(Format, ...) SysDbgLockedWriteLine(DebugLevelFunction, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#else
|
||||
#define locked_debug(Format, ...)
|
||||
#define locked_ubsan(Format, ...)
|
||||
#define locked_function(Format, ...)
|
||||
#endif
|
||||
#define locked_trace(Format, ...) SysDbgLockedWriteLine(DebugLevelTrace, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_fixme(Format, ...) SysDbgLockedWriteLine(DebugLevelFixme, __FILE__, __LINE__, __FUNCTION__, Format, ##__VA_ARGS__)
|
||||
#define locked_stub SysDbgLockedWriteLine(DebugLevelStub, __FILE__, __LINE__, __FUNCTION__, "stub")
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#define stub fixme("stub")
|
||||
|
||||
#endif // !__FENNIX_KERNEL_DEBUGGER_H__
|
||||
|
Reference in New Issue
Block a user