Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

assert.c File Reference

#include <nt.h>
#include <ntrtl.h>
#include <zwapi.h>

Go to the source code of this file.

Defines

#define RTL_ASSERT_ALWAYS_ENABLED   1

Functions

VOID RtlAssert (IN PVOID FailedAssertion, IN PVOID FileName, IN ULONG LineNumber, IN PCHAR Message OPTIONAL)


Define Documentation

#define RTL_ASSERT_ALWAYS_ENABLED   1
 

Definition at line 33 of file assert.c.


Function Documentation

VOID RtlAssert (  IN PVOID  FailedAssertion,
IN PVOID  FileName,
IN ULONG  LineNumber,
IN PCHAR Message  OPTIONAL
) 
 

Definition at line 36 of file assert.c.

References DbgPrint, DbgPrompt(), FileName, and TRUE.

Referenced by IovpCompleteRequestApc().

00042 { 00043 #if DBG || RTL_ASSERT_ALWAYS_ENABLED 00044 char Response[ 2 ]; 00045 CONTEXT Context; 00046 00047 #ifndef BLDR_KERNEL_RUNTIME 00048 RtlCaptureContext( &Context ); 00049 #endif 00050 00051 while (TRUE) { 00052 DbgPrint( "\n*** Assertion failed: %s%s\n*** Source File: %s, line %ld\n\n", 00053 Message ? Message : "", 00054 FailedAssertion, 00055 FileName, 00056 LineNumber 00057 ); 00058 00059 DbgPrompt( "Break, Ignore, Terminate Process or Terminate Thread (bipt)? ", 00060 Response, 00061 sizeof( Response ) 00062 ); 00063 switch (Response[0]) { 00064 case 'B': 00065 case 'b': 00066 DbgPrint( "Execute '!cxr %p' to dump context\n", &Context); 00067 DbgBreakPoint(); 00068 break; 00069 00070 case 'I': 00071 case 'i': 00072 return; 00073 00074 case 'P': 00075 case 'p': 00076 ZwTerminateProcess( NtCurrentProcess(), STATUS_UNSUCCESSFUL ); 00077 break; 00078 00079 case 'T': 00080 case 't': 00081 ZwTerminateThread( NtCurrentThread(), STATUS_UNSUCCESSFUL ); 00082 break; 00083 } 00084 } 00085 00086 DbgBreakPoint(); 00087 ZwTerminateProcess( NtCurrentProcess(), STATUS_UNSUCCESSFUL ); 00088 #endif 00089 }


Generated on Sat May 15 19:42:56 2004 for test by doxygen 1.3.7