33#define DBG_DEFAULT_LEVELS (ERR_LEVEL|FIXME_LEVEL)
41#define BOCHS_OUTPUT_PORT 0xE9
43ULONG DebugPort = RS232;
46#if defined(SARCH_PC98)
49ULONG BaudRate = 115200;
64 PCHAR CommandLine, PortString, BaudString, IrqString;
70#if defined (DEBUG_ALL)
72#elif defined (DEBUG_WARN)
74#elif defined (DEBUG_ERR)
80#if defined (DEBUG_INIFILE)
82#elif defined (DEBUG_REACTOS)
85#elif defined (DEBUG_CUSTOM)
91 if (FrLdrSectionId == 0)
97 if (CommandLine ==
NULL)
118 PortString =
strstr(CommandLine,
"DEBUGPORT");
119 BaudString =
strstr(CommandLine,
"BAUDRATE");
120 IrqString =
strstr(CommandLine,
"IRQ");
129 PortString +=
strlen(
"DEBUGPORT");
132 while (*PortString ==
' ') PortString++;
136 if (
strncmp(PortString,
"SCREEN", 6) == 0)
141 else if (
strncmp(PortString,
"BOCHS", 5) == 0)
146 else if (
strncmp(PortString,
"COM", 3) == 0)
156 PortString =
strstr(PortString,
"DEBUGPORT");
163 BaudString +=
strlen(
"BAUDRATE");
166 while (*BaudString ==
' ') BaudString++;
181 IrqString +=
strlen(
"IRQ");
184 while (*IrqString ==
' ') IrqString++;
197 if (DebugPort & RS232)
206 if (Character ==
'\n')
207 DebugStartOfLine =
TRUE;
209 if (DebugPort & RS232)
211 if (Character ==
'\n')
216 if (DebugPort & BOCHS)
220 if (DebugPort & SCREEN)
250 DebugPrintChar(*
ptr++);
263 if (!(DbgChannels[
Mask] &
Level) && !(
Level & DBG_DEFAULT_LEVELS))
269 if (DebugStartOfLine)
289 DebugStartOfLine =
FALSE;
298 DebugPrintChar(*
ptr++);
309 if (!(DbgChannels[
Mask] & TRACE_LEVEL))
312 DebugStartOfLine =
FALSE;
319 DebugStartOfLine =
FALSE;
338 DebugPort &= ~SCREEN;
344 int iLevel, iChannel;
346 if (channel ==
NULL || *channel ==
'\0' ||
strlen(channel) == 0)
354 iLevel = FIXME_LEVEL;
358 iLevel = TRACE_LEVEL;
375 else if (
strcmp(channel,
"all" ) == 0)
382 DbgChannels[
i] |= iLevel;
384 DbgChannels[
i] &= ~iLevel;
392 DbgChannels[iChannel] |= iLevel;
394 DbgChannels[iChannel] &= ~iLevel;
422 DbgAddDebugChannel(
c,
str,
op);
482 "*** STOP: 0x%08lX (0x%p,0x%p,0x%p,0x%p)",
484 (
PVOID)BugCheckParameter1,
485 (
PVOID)BugCheckParameter2,
486 (
PVOID)BugCheckParameter3,
487 (
PVOID)BugCheckParameter4);
503 DbgPrint(
"Assertion \'%s\' failed at %s line %lu: %s\n",
504 (
PCHAR)FailedAssertion,
511 DbgPrint(
"Assertion \'%s\' failed at %s line %lu\n",
512 (
PCHAR)FailedAssertion,
523 "MISSING_HARDWARE_REQUIREMENTS",
524 "FREELDR_IMAGE_CORRUPTION",
525 "MEMORY_INIT_FAILURE",
527 "EXIT_BOOTSERVICES_FAILURE",
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
char * strchr(const char *String, int ch)
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 ULONG ComPort, IN ULONG BaudRate)
VOID Rs232PortPutByte(UCHAR ByteToSend)
#define DebugInit(FrLdrSectionId)
#define DbgParseDebugChannels(val)
#define DPRINT_FILESYSTEM
#define DBG_CHANNELS_COUNT
#define DebugDisableScreenPort()
#define MachConsPutChar(Ch)
ULONG_PTR BugCheckInfo[5]
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 NTAPI RtlAssert(IN PVOID FailedAssertion, IN PVOID FileName, IN ULONG LineNumber, IN PCHAR Message OPTIONAL)
PCSTR CmdLineGetDebugString(VOID)
static const WCHAR separator[]
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
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
_Check_return_ long __cdecl atol(_In_z_ const char *_Str)
NTSYSAPI void WINAPI DbgBreakPoint(void)
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
#define sprintf(buf, format,...)
#define DECLSPEC_NORETURN
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define WRITE_PORT_UCHAR(p, d)
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
PULONG MinorVersion OPTIONAL
VOID UiMessageBoxCritical(PCSTR MessageText)
VOID UiMessageBox(PCSTR Format,...)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
void int int ULONGLONG int va_list * ap
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level