--- truecrypt/boot/windows/bootdebug.h 2018/04/24 16:49:04 1.1.1.1 +++ truecrypt/boot/windows/bootdebug.h 2018/04/24 16:52:05 1.1.1.2 @@ -12,14 +12,19 @@ #include "Platform.h" #include "BootConsoleIo.h" +#if 0 +# define TC_BOOT_DEBUG_ENABLED +#endif -#ifndef DEBUG -# if 0 -# define TC_TRACING_ENABLED -# endif +#if 0 || defined (TC_BOOT_DEBUG_ENABLED) +# define TC_BOOT_STACK_CHECKING_ENABLED + extern "C" void CheckStack (); +#else +# define CheckStack() #endif -#ifdef TC_TRACING_ENABLED +#if 0 +# define TC_BOOT_TRACING_ENABLED # if 1 # define TC_TRACE_INT13 # endif @@ -34,13 +39,12 @@ #define trace_hex(VAL) do { Print (#VAL), PrintChar (':'); PrintHex (VAL); PrintEndl(); } while (false) #define assert(COND) do { if (!(COND)) { trace_point; __asm jmp $ } } while (false) - void InitDebugPort (); +void InitStackChecker (); void WriteDebugPort (byte dataByte); -void PrintAddress (void *addr); void PrintHexDump (byte *mem, size_t size, uint16 *memSegment = nullptr); void PrintHexDump (uint16 memSegment, uint16 memOffset, size_t size); void PrintVal (const char *message, const uint32 value, bool newLine = true, bool hex = false); void PrintVal (const char *message, const uint64 &value, bool newLine = true, bool hex = false); -#endif TC_HEADER_Boot_BootDebug +#endif // TC_HEADER_Boot_BootDebug