33#define DBG_DEFAULT_LEVELS (ERR_LEVEL|FIXME_LEVEL)
41#define BOCHS_OUTPUT_PORT 0xE9
43ULONG DebugPort = RS232;
57#define CONST_STR_LEN(x) (sizeof(x)/sizeof(x[0]) - 1)
60 PSTR CommandLine, PortString, BaudString;
62 CHAR DbgStringBuffer[256];
66#if defined (DEBUG_ALL)
68#elif defined (DEBUG_WARN)
70#elif defined (DEBUG_ERR)
76#if defined (DEBUG_INIFILE)
78#elif defined (DEBUG_REACTOS)
81#elif defined (DEBUG_CUSTOM)
99 CommandLine = DbgStringBuffer;
105 PortString =
strstr(CommandLine,
"DEBUGPORT");
106 BaudString =
strstr(CommandLine,
"BAUDRATE");
116 while (*PortString ==
' ') ++PortString;
118 if (*PortString) ++PortString;
137 if (*PortString !=
':')
153 PortString =
strstr(PortString,
"DEBUGPORT");
161 while (*BaudString ==
' ') ++BaudString;
176 if (DebugPort & RS232)
185 if (Character ==
'\n')
186 DebugStartOfLine =
TRUE;
188 if (DebugPort & RS232)
190 if (Character ==
'\n')
195 if (DebugPort & BOCHS)
199 if (DebugPort & SCREEN)
229 DebugPrintChar(*
ptr++);
242 if (!(DbgChannels[
Mask] &
Level) && !(
Level & DBG_DEFAULT_LEVELS))
248 if (DebugStartOfLine)
268 DebugStartOfLine =
FALSE;
277 DebugPrintChar(*
ptr++);
288 if (!(DbgChannels[
Mask] & TRACE_LEVEL))
291 DebugStartOfLine =
FALSE;
298 DebugStartOfLine =
FALSE;
317 DebugPort &= ~SCREEN;
323 int iLevel, iChannel;
325 if (channel ==
NULL || *channel ==
'\0' ||
strlen(channel) == 0)
333 iLevel = FIXME_LEVEL;
337 iLevel = TRACE_LEVEL;
354 else if (
strcmp(channel,
"all" ) == 0)
361 DbgChannels[
i] |= iLevel;
363 DbgChannels[
i] &= ~iLevel;
371 DbgChannels[iChannel] |= iLevel;
373 DbgChannels[iChannel] &= ~iLevel;
401 DbgAddDebugChannel(
c,
str,
op);
443#undef DbgParseDebugChannels
495 "*** STOP: 0x%08lX (0x%p,0x%p,0x%p,0x%p)",
497 (
PVOID)BugCheckParameter1,
498 (
PVOID)BugCheckParameter2,
499 (
PVOID)BugCheckParameter3,
500 (
PVOID)BugCheckParameter4);
518 Format =
"Assertion \'%s\' failed at %s line %lu: %s\n";
521 (
PCHAR)FailedAssertion,
529 (
PCHAR)FailedAssertion,
536 Format =
"Assertion \'%s\' failed at %s line %lu\n";
539 (
PCHAR)FailedAssertion,
546 (
PCHAR)FailedAssertion,
557 "MISSING_HARDWARE_REQUIREMENTS",
558 "FREELDR_IMAGE_CORRUPTION",
559 "MEMORY_INIT_FAILURE",
562 "EXIT_BOOTSERVICES_FAILURE",
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
BOOLEAN Rs232PortInitialize(_In_ PUCHAR PortAddress, _In_ ULONG BaudRate)
DECLSPEC_NORETURN VOID FrLdrBugCheckWithMessage(ULONG BugCode, PCHAR File, ULONG Line, PCSTR Format,...)
VOID Rs232PortPutByte(UCHAR ByteToSend)
#define DbgParseDebugChannels(val)
#define DPRINT_FILESYSTEM
#define DebugInit(DebugString)
#define DBG_CHANNELS_COUNT
#define DebugDisableScreenPort()
#define MachConsPutChar(Ch)
VOID UiMessageBoxCritical(_In_ PCSTR MessageText)
VOID UiMessageBox(_In_ PCSTR Format,...)
ULONG_PTR BugCheckInfo[5]
VOID DbgPrint2(ULONG Mask, ULONG Level, const char *File, ULONG Line, char *Format,...)
DECLSPEC_NORETURN VOID NTAPI KeBugCheckEx(IN ULONG BugCheckCode, IN ULONG_PTR BugCheckParameter1, IN ULONG_PTR BugCheckParameter2, IN ULONG_PTR BugCheckParameter3, IN ULONG_PTR BugCheckParameter4)
ULONG MsgBoxPrint(const char *Format,...)
VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length)
VOID NTAPI RtlAssert(IN PVOID FailedAssertion, IN PVOID FileName, IN ULONG LineNumber, IN PCHAR Message OPTIONAL)
static CCHAR DebugString[256]
#define _strnicmp(_String1, _String2, _MaxCount)
static const WCHAR separator[]
#define DECLSPEC_NORETURN
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl vsprintf(char *, const char *, va_list) __WINE_CRT_PRINTF_ATTR(2
_ACRTIMP __msvcrt_long __cdecl atol(const char *)
_ACRTIMP __msvcrt_ulong __cdecl strtoul(const char *, char **, int)
_ACRTIMP char *__cdecl strchr(const char *, int)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP char *__cdecl strstr(const char *, const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
static const WCHAR Message[]
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define UNREFERENCED_PARAMETER(P)
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define WRITE_PORT_UCHAR(p, d)
#define CONST_STR_LEN(str)
PULONG MinorVersion OPTIONAL
#define DEFAULT_DEBUG_BAUD_RATE
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
NTSYSAPI void WINAPI DbgBreakPoint(void)
void int int ULONGLONG int va_list * ap
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level