35#ifdef WPP_EVENT_TRACING
36#include "ParaNdis-Debug.tmh"
104#if !defined(WPP_EVENT_TRACING) || defined(WPP_USE_BYPASS)
105#if defined(DPFLTR_MASK)
113#if defined(VIRTIO_DBG_USE_IOPORT)
143#pragma message("DebugPrint for Win2K")
185#ifdef OVERRIDE_DEBUG_BREAK
186static PUCHAR pDbgBreakPoint;
187static UCHAR DbgBreakPointChunk[5];
188static void AnotherDbgBreak()
190 DPrintf(0, (
"Somebody tried to break into the debugger!"));
219#ifdef OVERRIDE_DEBUG_BREAK
229 DPrintf(0, (
"Replacing original BP handler at %p", pDbgBreakPoint));
232 RtlCopyMemory(DbgBreakPointChunk, pDbgBreakPoint,
sizeof(DbgBreakPointChunk));
241#ifdef OVERRIDE_DEBUG_BREAK
242 if (
sizeof(
PVOID) ==
sizeof(
ULONG) && pDbgBreakPoint)
244 DPrintf(0, (
"Restoring original BP handler at %p", pDbgBreakPoint));
245 RtlCopyMemory(pDbgBreakPoint, DbgBreakPointChunk,
sizeof(DbgBreakPointChunk));
253#define MAX_CONTEXTS 4
254#if defined(ENABLE_HISTORY_LOG)
255#define MAX_HISTORY 0x40000
368#if defined(ENABLE_HISTORY_LOG)
387#if (PARANDIS_DEBUG_HISTORY_DATA_VERSION == 1)
#define PARANDIS_DEBUG_PER_NIC_DATA_VERSION
tBugCheckHistoryDataEntry_V1 tBugCheckHistoryDataEntry
static const GUID ParaNdis_CrashGuid
#define PARANDIS_DEBUG_HISTORY_DATA_VERSION
enum _etagHistoryLogOperation eHistoryLogOperation
#define PARANDIS_GET_LAST_INTERRUPT_TIMESTAMP(p)
#define PARANDIS_DEBUG_STATIC_DATA_VERSION
static tBugCheckData BugCheckData
DEBUGPRINTFUNC VirtioDebugPrintProc
void ParaNdis_DebugCleanup(PDRIVER_OBJECT pDriverObject)
BOOLEAN(NTAPI * KeDeregisterBugCheckReasonCallbackType)(__inout PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord)
BOOLEAN(NTAPI * KeRegisterBugCheckReasonCallbackType)(__out PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord, __in PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine, __in KBUGCHECK_CALLBACK_REASON Reason, __in PUCHAR Component)
struct _tagBugCheckData tBugCheckData
struct _tagBugCheckStaticData tBugCheckStaticData
static KeRegisterBugCheckReasonCallbackType BugCheckRegisterCallback
ULONG(NTAPI * vDbgPrintExType)(__in ULONG ComponentId, __in ULONG Level, __in PCCH Format, __in va_list arglist)
void ParaNdis_DebugInitialize(PVOID DriverObject, PVOID RegistryPath)
void _LogOutEntry(int level, const char *s)
defined(WPP_EVENT_TRACING) || defined(WPP_USE_BYPASS)
static UINT FillDataOnBugCheck()
VOID WppEnableCallback(__in LPCGUID Guid, __in __int64 Logger, __in BOOLEAN Enable, __in ULONG Flags, __in UCHAR Level)
BOOLEAN NTAPI KeDeregisterBugCheckReasonCallbackDummyProc(__inout PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord)
static NDIS_SPIN_LOCK CrashLock
void ParaNdis_DebugRegisterMiniport(PARANDIS_ADAPTER *pContext, BOOLEAN bRegister)
static ULONG NTAPI DummyPrintProcedure(__in ULONG ComponentId, __in ULONG Level, __in PCCH Format, __in va_list arglist)
static VOID ParaNdis_PrepareBugCheckData()
static KeDeregisterBugCheckReasonCallbackType BugCheckDeregisterCallback
void _LogOutString(int level, const char *s)
static vDbgPrintExType PrintProcedure
DEBUGPRINTFUNC pDebugPrint
void _LogOutExitValue(int level, const char *s, ULONG value)
static BOOLEAN NTAPI KeRegisterBugCheckReasonCallbackDummyProc(__out PKBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord, __in PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine, __in KBUGCHECK_CALLBACK_REASON Reason, __in PUCHAR Component)
static KBUGCHECK_REASON_CALLBACK_ROUTINE ParaNdis_OnBugCheck
KBUGCHECK_REASON_CALLBACK_RECORD CallbackRecord
unsigned long long UINT64
ACPI_SIZE strlen(const char *String)
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 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 ComponentId
#define InterlockedIncrement
#define WPP_INIT_TRACING(a, b)
#define DPrintf(Level, Fmt)
#define DPrintfBypass(Level, Fmt)
void(* DEBUGPRINTFUNC)(const char *fmt,...)
VOID EXPORT NdisInitUnicodeString(IN OUT PNDIS_STRING DestinationString, IN PCWSTR SourceString)
#define KeGetCurrentIrql()
_Must_inspect_result_ _In_ PFLT_GET_OPERATION_STATUS_CALLBACK CallbackRoutine
GLenum GLuint GLenum GLsizei const GLchar * buf
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
#define memcpy(s1, s2, n)
PVOID PVOID PWCHAR PVOID USHORT PULONG Reason
unsigned __int3264 UINT_PTR
#define RtlPointerToOffset(Base, Pointer)
void ParaNdis_CallOnBugCheck(PARANDIS_ADAPTER *pContext)
static void FORCEINLINE ParaNdis_DebugHistory(PARANDIS_ADAPTER *pContext, eHistoryLogOperation op, PVOID pParam1, ULONG lParam2, ULONG lParam3, ULONG lParam4)
#define NdisReleaseSpinLock(_SpinLock)
#define NdisAllocateSpinLock(_SpinLock)
#define NdisGetCurrentSystemTime
#define NdisRawWritePortUchar(Port, Data)
#define NdisAcquireSpinLock(_SpinLock)
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
NTSTRSAFEAPI RtlStringCbVPrintfA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat, _In_ va_list argList)
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
#define STATUS_BUFFER_OVERFLOW
_In_ ULONG InBufferLength
_Out_ ULONG OutBufferLength
tBugCheckDataLocation Location
tBugCheckStaticData StaticData
LARGE_INTEGER LastInterruptTimeStamp
LARGE_INTEGER LastTxCompletionTimeStamp
ULONG nofPacketsToComplete
tBugCheckStaticDataContent Data
tBugCheckHistoryDataEntry History[MAX_HISTORY]
tBugCheckPerNicDataContent PerNicData[MAX_CONTEXTS]
tBugCheckStaticDataHeader Header
PVOID NTAPI MmGetSystemRoutineAddress(IN PUNICODE_STRING SystemRoutineName)
#define RtlCopyMemory(Destination, Source, Length)
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
_Must_inspect_result_ _In_ ULONG Flags
#define KeInitializeCallbackRecord(CallbackRecord)
_In_ struct _KBUGCHECK_REASON_CALLBACK_RECORD _Inout_ PVOID _In_ ULONG ReasonSpecificDataLength
_In_ struct _KBUGCHECK_REASON_CALLBACK_RECORD _Inout_ PVOID ReasonSpecificData
_In_ struct _KBUGCHECK_REASON_CALLBACK_RECORD * Record
KBUGCHECK_CALLBACK_REASON
KBUGCHECK_REASON_CALLBACK_ROUTINE * PKBUGCHECK_REASON_CALLBACK_ROUTINE