win-pvdrivers

changeset 1024:53d89db72d24

Update debugprint macros
author James Harper <james.harper@bendigoit.com.au>
date Tue Feb 19 15:13:22 2013 +1100 (2013-02-19)
parents 1ce315b193d1
children aa2e51f67f7c
files common/include/xen_windows.h
line diff
     1.1 --- a/common/include/xen_windows.h	Tue Feb 19 15:12:35 2013 +1100
     1.2 +++ b/common/include/xen_windows.h	Tue Feb 19 15:13:22 2013 +1100
     1.3 @@ -172,10 +172,10 @@ the wrong width is used with the wrong d
     1.4  #define QEMU_UNPLUG_ALL_NICS 2
     1.5  #define QEMU_UNPLUG_AUX_IDE_DISKS 4
     1.6  
     1.7 -#define FUNCTION_ENTER()       KdPrint((__DRIVER_NAME " --> %s\n", __FUNCTION__))
     1.8 -#define FUNCTION_EXIT()        KdPrint((__DRIVER_NAME " <-- %s\n", __FUNCTION__))
     1.9 -#define FUNCTION_EXIT_STATUS(_status) KdPrint((__DRIVER_NAME " <-- %s, status = %08x\n", __FUNCTION__, _status))
    1.10 -#define FUNCTION_MSG(...) KdPrint((__DRIVER_NAME "     " __VA_ARGS__))
    1.11 +#define FUNCTION_ENTER()       XnDebugPrint(__DRIVER_NAME " --> %s\n", __FUNCTION__)
    1.12 +#define FUNCTION_EXIT()        XnDebugPrint(__DRIVER_NAME " <-- %s\n", __FUNCTION__)
    1.13 +#define FUNCTION_EXIT_STATUS(_status) XnDebugPrint(__DRIVER_NAME " <-- %s, status = %08x\n", __FUNCTION__, _status)
    1.14 +#define FUNCTION_MSG(...) XnDebugPrint(__DRIVER_NAME "     " __VA_ARGS__)
    1.15  
    1.16  #define INVALID_GRANT_REF 0xFFFFFFFF
    1.17  
    1.18 @@ -266,7 +266,24 @@ XnFreeMem(XN_HANDLE handle, PVOID Ptr) {
    1.19  }
    1.20  
    1.21  
    1.22 +//VOID
    1.23 +//XnDumpModeHookDebugPrint();
    1.24 +
    1.25 +
    1.26 +NTSTATUS
    1.27 +XnDebugPrint(PCHAR format, ...);
    1.28 +
    1.29  VOID
    1.30 -XnDumpModeHookDebugPrint();
    1.31 +XnPrintDump();
    1.32 +
    1.33 +#if DBG
    1.34 +#define XN_ASSERT(expr) \
    1.35 +if (!(expr)) { \
    1.36 +  XnDebugPrint("ASSERT(%s) %s:%d\n", #expr, __FILE__, __LINE__); \
    1.37 +  ASSERT(expr); \
    1.38 +}
    1.39 +#else
    1.40 +#define XN_ASSERT(expr)
    1.41 +#endif
    1.42  
    1.43  #endif
    1.44 \ No newline at end of file