"Fossies" - the Fresh Open Source Software Archive

Member "src/Boot/Windows/BootDebug.h" (10 Oct 2018, 1889 Bytes) of package /windows/misc/VeraCrypt_1.23-Hotfix-2_Source.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "BootDebug.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  Derived from source code of TrueCrypt 7.1a, which is
    3  Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
    4  by the TrueCrypt License 3.0.
    5 
    6  Modifications and additions to the original source code (contained in this file)
    7  and all other portions of this file are Copyright (c) 2013-2017 IDRIX
    8  and are governed by the Apache License 2.0 the full text of which is
    9  contained in the file License.txt included in VeraCrypt binary and source
   10  code distribution packages.
   11 */
   12 
   13 #ifndef TC_HEADER_Boot_BootDebug
   14 #define TC_HEADER_Boot_BootDebug
   15 
   16 #include "Platform.h"
   17 #include "BootConsoleIo.h"
   18 
   19 #if 0
   20 #   define TC_BOOT_DEBUG_ENABLED
   21 #endif
   22 
   23 #if 0 || defined (TC_BOOT_DEBUG_ENABLED)
   24 #   define TC_BOOT_STACK_CHECKING_ENABLED
   25     extern "C" void CheckStack ();
   26 #else
   27 #   define CheckStack()
   28 #endif
   29 
   30 #if 0
   31 #   define TC_BOOT_TRACING_ENABLED
   32 #   if 1
   33 #       define TC_TRACE_INT13
   34 #   endif
   35 #   if 0
   36 #       define TC_TRACE_INT15
   37 #   endif
   38 #endif
   39 
   40 #ifdef TC_BOOT_DEBUG_ENABLED
   41 #   define trace_point do { Print(__FILE__); PrintChar (':'); Print (TC_TO_STRING (__LINE__)); PrintEndl(); } while (false)
   42 #   define trace_val(VAL) PrintVal (#VAL, VAL);
   43 #   define trace_hex(VAL) do { Print (#VAL), PrintChar (':'); PrintHex (VAL); PrintEndl(); } while (false)
   44 #   define assert(COND) do { if (!(COND)) { trace_point; __asm jmp $ } } while (false)
   45 #else
   46 #   define trace_point
   47 #   define trace_val(VAL)
   48 #   define trace_hex(VAL)
   49 #   define assert(COND)
   50 #endif
   51 
   52 void InitDebugPort ();
   53 void InitStackChecker ();
   54 void WriteDebugPort (byte dataByte);
   55 void PrintHexDump (byte *mem, size_t size, uint16 *memSegment = nullptr);
   56 void PrintHexDump (uint16 memSegment, uint16 memOffset, size_t size);
   57 void PrintVal (const char *message, const uint32 value, bool newLine = true, bool hex = false);
   58 void PrintVal (const char *message, const uint64 &value, bool newLine = true, bool hex = false);
   59 
   60 #endif // TC_HEADER_Boot_BootDebug