23 #if DBG && !defined(_M_ARM) 33 #define DBG_DEFAULT_LEVELS (ERR_LEVEL|FIXME_LEVEL) 41 #define BOCHS_OUTPUT_PORT 0xE9 43 ULONG DebugPort = RS232;
46 #if defined(SARCH_PC98) 47 ULONG BaudRate = 9600;
49 ULONG BaudRate = 115200;
59 PCHAR CommandLine, PortString, BaudString, IrqString;
65 #if defined (DEBUG_ALL) 67 #elif defined (DEBUG_WARN) 69 #elif defined (DEBUG_ERR) 75 #if defined (DEBUG_INIFILE) 77 #elif defined (DEBUG_REACTOS) 80 #elif defined (DEBUG_CUSTOM) 86 if (FrLdrSectionId == 0)
92 if (CommandLine ==
NULL)
113 PortString =
strstr(CommandLine,
"DEBUGPORT");
114 BaudString =
strstr(CommandLine,
"BAUDRATE");
115 IrqString =
strstr(CommandLine,
"IRQ");
124 PortString +=
strlen(
"DEBUGPORT");
127 while (*PortString ==
' ') PortString++;
131 if (
strncmp(PortString,
"SCREEN", 6) == 0)
136 else if (
strncmp(PortString,
"BOCHS", 5) == 0)
141 else if (
strncmp(PortString,
"COM", 3) == 0)
151 PortString =
strstr(PortString,
"DEBUGPORT");
158 BaudString +=
strlen(
"BAUDRATE");
161 while (*BaudString ==
' ') BaudString++;
176 IrqString +=
strlen(
"IRQ");
179 while (*IrqString ==
' ') IrqString++;
192 if (DebugPort & RS232)
201 if (Character ==
'\n')
202 DebugStartOfLine =
TRUE;
204 if (DebugPort & RS232)
206 if (Character ==
'\n')
211 if (DebugPort & BOCHS)
215 if (DebugPort & SCREEN)
245 DebugPrintChar(*
ptr++);
258 if (!(DbgChannels[
Mask] &
Level) && !(
Level & DBG_DEFAULT_LEVELS))
264 if (DebugStartOfLine)
284 DebugStartOfLine =
FALSE;
293 DebugPrintChar(*
ptr++);
304 if (!(DbgChannels[
Mask] & TRACE_LEVEL))
307 DebugStartOfLine =
FALSE;
314 DebugStartOfLine =
FALSE;
333 DebugPort &= ~SCREEN;
339 int iLevel, iChannel;
341 if (channel ==
NULL || *channel ==
'\0' ||
strlen(channel) == 0)
349 iLevel = FIXME_LEVEL;
353 iLevel = TRACE_LEVEL;
370 else if (
strcmp(channel,
"all" ) == 0)
377 DbgChannels[
i] |= iLevel;
379 DbgChannels[
i] &= ~iLevel;
387 DbgChannels[iChannel] |= iLevel;
389 DbgChannels[iChannel] &= ~iLevel;
417 DbgAddDebugChannel(
c,
str,
op);
477 "*** STOP: 0x%08lX (0x%p,0x%p,0x%p,0x%p)",
479 (
PVOID)BugCheckParameter1,
480 (
PVOID)BugCheckParameter2,
481 (
PVOID)BugCheckParameter3,
482 (
PVOID)BugCheckParameter4);
498 DbgPrint(
"Assertion \'%s\' failed at %s line %lu: %s\n",
499 (
PCHAR)FailedAssertion,
506 DbgPrint(
"Assertion \'%s\' failed at %s line %lu\n",
507 (
PCHAR)FailedAssertion,
518 "MISSING_HARDWARE_REQUIREMENTS",
519 "FREELDR_IMAGE_CORRUPTION",
520 "MEMORY_INIT_FAILURE",
ULONG DbgPrint(PCCH Format,...)
PCSTR CmdLineGetDebugString(VOID)
_In_ ULONG _In_ ULONG _In_ ULONG Length
static const WCHAR separator[]
#define DbgParseDebugChannels(val)
ACPI_SIZE strlen(const char *String)
IN BOOLEAN OUT PSTR Buffer
char * strstr(char *String1, char *String2)
#define DebugInit(FrLdrSectionId)
BOOLEAN Rs232PortInitialize(ULONG ComPort, ULONG BaudRate)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
VOID Rs232PortPutByte(UCHAR ByteToSend)
VOID NTAPI RtlAssert(IN PVOID FailedAssertion, IN PVOID FileName, IN ULONG LineNumber, IN PCHAR Message OPTIONAL)
#define DECLSPEC_NORETURN
#define sprintf(buf, format,...)
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
VOID NTAPI DbgBreakPoint(VOID)
VOID UiMessageBox(PCSTR Format,...)
ULONG_PTR BugCheckInfo[5]
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define MachConsPutChar(Ch)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
#define DPRINT_FILESYSTEM
_Check_return_ long __cdecl atol(_In_z_ const char *_Str)
#define WRITE_PORT_UCHAR(p, d)
_In_ ULONG _In_ ULONG Offset
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
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
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)
DECLSPEC_NORETURN VOID NTAPI KeBugCheckEx(IN ULONG BugCheckCode, IN ULONG_PTR BugCheckParameter1, IN ULONG_PTR BugCheckParameter2, IN ULONG_PTR BugCheckParameter3, IN ULONG_PTR BugCheckParameter4)
char * strchr(const char *String, int ch)
void int int ULONGLONG int va_list * ap
char * strcpy(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
#define DebugDisableScreenPort()
ULONG MsgBoxPrint(const char *Format,...)
VOID UiMessageBoxCritical(PCSTR MessageText)
#define DBG_CHANNELS_COUNT
PULONG MinorVersion OPTIONAL