Windows: More useful AFSDumpFile exception info

Modify AFSExceptionFilter to accept the __FUNCTION__ name
where the exception occurred.

Generate the trace dump file after the exception has been
handled so that it is possible to see where it happened
in the trace output.

Change-Id: Icddafc1066dd85b63d8d97c40c0f76c54d181ebe
Reviewed-on: http://gerrit.openafs.org/7308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
Jeffrey Altman 2012-04-30 06:22:41 -04:00 committed by Jeffrey Altman
parent f70a12adef
commit ad5916d19f
45 changed files with 194 additions and 69 deletions

View File

@ -202,7 +202,6 @@ static inline void AFS_ASSERT() {
//#define AFS_VALIDATE_EXTENTS 0
static inline void AFSBreakPoint() {
AFSDumpTraceFilesFnc();
#if !defined(KD_DEBUGGER_ENABLED)
#define KD_DEBUGGER_ENABLED DBG
#endif // KD_DEBUGGER_ENABLED
@ -222,7 +221,7 @@ static inline void AFSBreakPoint() {
#else
static inline void AFSBreakPoint() {
AFSDumpTraceFilesFnc();
NOTHING;
}
#define AFSPrint

View File

@ -102,12 +102,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSCleanup\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -76,12 +76,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSClose\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -356,9 +356,11 @@ try_exit:
FALSE);
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()))
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()))
{
AFSDumpTraceFilesFnc();
if( bReleasePool)
{
@ -783,10 +785,12 @@ AFSProcessControlRequest( IN PIRP Irp)
//try_exit:
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()))
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()))
{
ntStatus = STATUS_UNSUCCESSFUL;
AFSDumpTraceFilesFnc();
}
if( bCompleteRequest)

View File

@ -77,7 +77,7 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
@ -85,6 +85,8 @@ try_exit:
"EXCEPTION - AFSCreate\n");
ntStatus = STATUS_ACCESS_DENIED;
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -78,12 +78,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSDevControl\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -107,12 +107,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSDirControl\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -103,12 +103,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueryEA\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -179,12 +181,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetEA\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -96,12 +96,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSFSControl\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -124,7 +124,7 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
@ -132,6 +132,8 @@ try_exit:
"EXCEPTION - AFSQueryFileInfo\n");
ntStatus = STATUS_UNSUCCESSFUL;
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -225,7 +227,7 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
@ -233,6 +235,8 @@ try_exit:
"EXCEPTION - AFSSetFileInfo\n");
ntStatus = STATUS_UNSUCCESSFUL;
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -51,7 +51,8 @@
//
ULONG
AFSExceptionFilter( IN ULONG Code,
AFSExceptionFilter( IN CHAR *FunctionString,
IN ULONG Code,
IN PEXCEPTION_POINTERS ExceptPtrs)
{
@ -67,11 +68,13 @@ AFSExceptionFilter( IN ULONG Code,
AFSDbgLogMsg( 0,
0,
"AFSExceptionFilter (Framework) - EXR %p CXR %p Code %08lX Address %p\n",
"AFSExceptionFilter (Framework) - EXR %p CXR %p Function %s Code %08lX Address %p Routine %p\n",
ExceptRec,
Context,
FunctionString,
ExceptRec->ExceptionCode,
ExceptRec->ExceptionAddress);
ExceptRec->ExceptionAddress,
(void *)AFSExceptionFilter);
DbgPrint("**** Exception Caught in AFS Redirector ****\n");

View File

@ -520,12 +520,14 @@ try_exit:
ExDeleteResourceLite( &AFSDbgLogLock);
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSRedirFs DriverEntry\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -55,12 +55,14 @@ AFSInternalDevControl( IN PDEVICE_OBJECT DeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSInternalDevControl\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -93,13 +93,15 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( (ntStatus = GetExceptionCode()), GetExceptionInformation()))
__except( AFSExceptionFilter( __FUNCTION__, (ntStatus = GetExceptionCode()), GetExceptionInformation()))
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSLockControl\n");
AFSDumpTraceFilesFnc();
AFSCompleteRequest( Irp,
ntStatus);
}

View File

@ -60,12 +60,14 @@ AFSQueryQuota( IN PDEVICE_OBJECT DeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueryQuota\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -92,12 +94,14 @@ AFSSetQuota( IN PDEVICE_OBJECT DeviceObject,
AFSCompleteRequest( Irp,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetQuota\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -532,8 +532,11 @@ AFSInitializeRedirector( IN AFSRedirectorInitInfo *RedirInitInfo)
pDevExt->Specific.RDR.CacheBaseAddress = MmGetSystemAddressForMdlSafe( pDevExt->Specific.RDR.CacheMdl,
NormalPagePriority);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDumpTraceFilesFnc();
IoFreeMdl( pDevExt->Specific.RDR.CacheMdl);
pDevExt->Specific.RDR.CacheMdl = NULL;
}

View File

@ -101,9 +101,11 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDumpTraceFilesFnc();
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
}

View File

@ -120,12 +120,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetSecurity\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -213,12 +215,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQuerySecurity\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -78,12 +78,14 @@ AFSShutdown( IN PDEVICE_OBJECT DeviceObject,
AFSCompleteRequest( Irp,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSShutdown\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -60,12 +60,14 @@ AFSSystemControl( IN PDEVICE_OBJECT DeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSystemControl\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -97,12 +97,14 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueryVolumeInfo\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -129,12 +131,14 @@ AFSSetVolumeInfo( IN PDEVICE_OBJECT DeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetVolumeInfo\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -105,10 +105,12 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -400,7 +400,8 @@ AFSSetQuota( IN PDEVICE_OBJECT DeviceObject,
//
ULONG
AFSExceptionFilter( IN ULONG Code,
AFSExceptionFilter( IN CHAR *FunctionString,
IN ULONG Code,
IN PEXCEPTION_POINTERS ExceptPtrs);
BOOLEAN

View File

@ -1351,12 +1351,14 @@ try_exit:
AFSCompleteRequest( Irp, ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSCleanup\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -686,12 +686,14 @@ try_exit:
AFSCompleteRequest( Irp,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSClose\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -99,7 +99,7 @@ try_exit:
NOTHING;
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
@ -107,6 +107,8 @@ try_exit:
"EXCEPTION - AFSCreate\n");
ntStatus = STATUS_ACCESS_DENIED;
AFSDumpTraceFilesFnc();
}
//

View File

@ -427,10 +427,12 @@ AFSDevControl( IN PDEVICE_OBJECT LibDeviceObject,
//try_exit:
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()))
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()))
{
ntStatus = STATUS_UNSUCCESSFUL;
AFSDumpTraceFilesFnc();
}
Irp->IoStatus.Status = ntStatus;

View File

@ -89,12 +89,14 @@ AFSDirControl( IN PDEVICE_OBJECT LibDeviceObject,
break;
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSDirControl\n");
AFSDumpTraceFilesFnc();
}
if( ntStatus != STATUS_PENDING)

View File

@ -71,12 +71,14 @@ AFSQueryEA( IN PDEVICE_OBJECT LibDeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueryEA\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -115,12 +117,14 @@ AFSSetEA( IN PDEVICE_OBJECT LibDeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetEA\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -668,12 +668,14 @@ BOOLEAN AFSDoExtentsMapRegion(IN AFSFcb *Fcb,
entry = newEntry;
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSDoExtentsMapRegion\n");
AFSDumpTraceFilesFnc();
}
try_exit:
@ -3604,12 +3606,14 @@ AFSMarkDirty( IN AFSFcb *Fcb,
ulCount++;
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSMarkDirty\n");
AFSDumpTraceFilesFnc();
}
AFSReleaseResource( &pNPFcb->Specific.File.DirtyExtentsListLock);
@ -4382,12 +4386,14 @@ AFSSetupMD5Hash( IN AFSFcb *Fcb,
PsGetCurrentThread());
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetupMD5Hash\n");
AFSDumpTraceFilesFnc();
}
AFSReleaseResource( &Fcb->NPFcb->Specific.File.ExtentsResource );

View File

@ -77,12 +77,14 @@ AFSFSControl( IN PDEVICE_OBJECT LibDeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSFSControl\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -441,13 +441,15 @@ try_exit:
}
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueryFileInfo\n");
AFSDumpTraceFilesFnc();
ntStatus = STATUS_UNSUCCESSFUL;
if( bReleaseMain)
@ -739,13 +741,15 @@ try_exit:
}
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetFileInfo\n");
AFSDumpTraceFilesFnc();
ntStatus = STATUS_UNSUCCESSFUL;
if( bReleaseMain)

View File

@ -51,7 +51,8 @@
//
ULONG
AFSExceptionFilter( IN ULONG Code,
AFSExceptionFilter( IN CHAR *FunctionString,
IN ULONG Code,
IN PEXCEPTION_POINTERS ExceptPtrs)
{
@ -67,9 +68,10 @@ AFSExceptionFilter( IN ULONG Code,
AFSDbgLogMsg( 0,
0,
"AFSExceptionFilter (Library) - EXR %p CXR %p Code %08lX Address %p Routine %p\n",
"AFSExceptionFilter (Library) - EXR %p CXR %p Function %s Code %08lX Address %p Routine %p\n",
ExceptRec,
Context,
FunctionString,
ExceptRec->ExceptionCode,
ExceptRec->ExceptionAddress,
(void *)AFSExceptionFilter);
@ -403,9 +405,11 @@ AFSLockSystemBuffer( IN PIRP Irp,
pAddress = MmGetSystemAddressForMdlSafe( Irp->MdlAddress, NormalPagePriority );
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDumpTraceFilesFnc();
IoFreeMdl( Irp->MdlAddress );
Irp->MdlAddress = NULL;
pAddress = NULL;
@ -455,9 +459,11 @@ AFSLockUserBuffer( IN void *UserBuffer,
pAddress = MmGetSystemAddressForMdlSafe( pMdl,
NormalPagePriority);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDumpTraceFilesFnc();
IoFreeMdl( pMdl);
pMdl = NULL;
pAddress = NULL;

View File

@ -286,10 +286,12 @@ try_exit:
}
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSPrint( "EXCEPTION - AFS DriverEntry\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -55,12 +55,14 @@ AFSInternalDevControl( IN PDEVICE_OBJECT LibDeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSInternalDevControl\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -299,13 +299,15 @@ try_exit:
ntStatus);
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()))
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()))
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSLockControl\n");
AFSDumpTraceFilesFnc();
//
// Again, there is little point in failing this request but pass back some type of failure status
//

View File

@ -60,12 +60,14 @@ AFSQueryQuota( IN PDEVICE_OBJECT LibDeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueryQuota\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -92,12 +94,14 @@ AFSSetQuota( IN PDEVICE_OBJECT DeviceObject,
AFSCompleteRequest( Irp,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetQuota\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -785,10 +785,12 @@ AFSRead( IN PDEVICE_OBJECT LibDeviceObject,
ntStatus = AFSCommonRead( AFSRDRDeviceObject, Irp, NULL);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -59,12 +59,14 @@ AFSSetSecurity( IN PDEVICE_OBJECT LibDeviceObject,
AFSCompleteRequest( Irp,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetSecurity\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -144,12 +146,14 @@ try_exit:
IoFreeMdl( pUserBufferMdl);
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQuerySecurity\n");
AFSDumpTraceFilesFnc();
}
AFSCompleteRequest( Irp,

View File

@ -62,12 +62,14 @@ AFSShutdown( IN PDEVICE_OBJECT LibDeviceObject,
AFSCompleteRequest( Irp,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSShutdown\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -60,12 +60,14 @@ AFSSystemControl( IN PDEVICE_OBJECT LibDeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSystemControl\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -203,12 +203,14 @@ try_exit:
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueryVolumeInfo\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -235,12 +237,14 @@ AFSSetVolumeInfo( IN PDEVICE_OBJECT DeviceObject,
ntStatus);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSSetVolumeInfo\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -2249,12 +2249,14 @@ try_exit:
"AFSQueueFlushExtents Failed to queue request Status %08lX\n", ntStatus);
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueueFlushExtents\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -2333,12 +2335,14 @@ try_exit:
"AFSQueueAsyncRead Failed to queue request Status %08lX\n", ntStatus);
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueueAsyncRead\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -2417,12 +2421,14 @@ try_exit:
"AFSQueueAsyncWrite Failed to queue request Status %08lX\n", ntStatus);
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueueAsyncWrite\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -2487,12 +2493,14 @@ try_exit:
ntStatus);
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueueGlobalRootEnumeration\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -2591,12 +2599,14 @@ try_exit:
}
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueueStartIos\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;
@ -2665,12 +2675,14 @@ try_exit:
ntStatus);
}
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
AFSDbgLogMsg( 0,
0,
"EXCEPTION - AFSQueueInvalidateObject\n");
AFSDumpTraceFilesFnc();
}
return ntStatus;

View File

@ -81,7 +81,7 @@ AFSWrite( IN PDEVICE_OBJECT LibDeviceObject,
ntStatus = AFSCommonWrite( AFSRDRDeviceObject, Irp, NULL);
}
__except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
__except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
{
ntStatus = STATUS_INSUFFICIENT_RESOURCES;

View File

@ -1043,7 +1043,8 @@ AFSSetQuota( IN PDEVICE_OBJECT DeviceObject,
//
ULONG
AFSExceptionFilter( IN ULONG Code,
AFSExceptionFilter( IN CHAR *FunctionString,
IN ULONG Code,
IN PEXCEPTION_POINTERS ExceptPtrs);
BOOLEAN