]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: More useful AFSDumpFile exception info
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 30 Apr 2012 10:22:41 +0000 (06:22 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 4 May 2012 17:24:00 +0000 (10:24 -0700)
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>
45 files changed:
src/WINNT/afsrdr/common/AFSRedirCommonDefines.h
src/WINNT/afsrdr/kernel/fs/AFSCleanup.cpp
src/WINNT/afsrdr/kernel/fs/AFSClose.cpp
src/WINNT/afsrdr/kernel/fs/AFSCommSupport.cpp
src/WINNT/afsrdr/kernel/fs/AFSCreate.cpp
src/WINNT/afsrdr/kernel/fs/AFSDevControl.cpp
src/WINNT/afsrdr/kernel/fs/AFSDirControl.cpp
src/WINNT/afsrdr/kernel/fs/AFSEa.cpp
src/WINNT/afsrdr/kernel/fs/AFSFSControl.cpp
src/WINNT/afsrdr/kernel/fs/AFSFileInfo.cpp
src/WINNT/afsrdr/kernel/fs/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/fs/AFSInit.cpp
src/WINNT/afsrdr/kernel/fs/AFSInternalDevControl.cpp
src/WINNT/afsrdr/kernel/fs/AFSLockControl.cpp
src/WINNT/afsrdr/kernel/fs/AFSQuota.cpp
src/WINNT/afsrdr/kernel/fs/AFSRDRSupport.cpp
src/WINNT/afsrdr/kernel/fs/AFSRead.cpp
src/WINNT/afsrdr/kernel/fs/AFSSecurity.cpp
src/WINNT/afsrdr/kernel/fs/AFSShutdown.cpp
src/WINNT/afsrdr/kernel/fs/AFSSystemControl.cpp
src/WINNT/afsrdr/kernel/fs/AFSVolumeInfo.cpp
src/WINNT/afsrdr/kernel/fs/AFSWrite.cpp
src/WINNT/afsrdr/kernel/fs/Include/AFSCommon.h
src/WINNT/afsrdr/kernel/lib/AFSCleanup.cpp
src/WINNT/afsrdr/kernel/lib/AFSClose.cpp
src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp
src/WINNT/afsrdr/kernel/lib/AFSDevControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSDirControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSEa.cpp
src/WINNT/afsrdr/kernel/lib/AFSExtentsSupport.cpp
src/WINNT/afsrdr/kernel/lib/AFSFSControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp
src/WINNT/afsrdr/kernel/lib/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/lib/AFSInit.cpp
src/WINNT/afsrdr/kernel/lib/AFSInternalDevControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSLockControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSQuota.cpp
src/WINNT/afsrdr/kernel/lib/AFSRead.cpp
src/WINNT/afsrdr/kernel/lib/AFSSecurity.cpp
src/WINNT/afsrdr/kernel/lib/AFSShutdown.cpp
src/WINNT/afsrdr/kernel/lib/AFSSystemControl.cpp
src/WINNT/afsrdr/kernel/lib/AFSVolumeInfo.cpp
src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp
src/WINNT/afsrdr/kernel/lib/AFSWrite.cpp
src/WINNT/afsrdr/kernel/lib/Include/AFSCommon.h

index 26035a598188abf8817e4570a0647d59762179c1..4772fad5739d631e27c9111bb3b780771f3b0f64 100644 (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
index 0402dacd44461e2d345734baff5c0be18dd0d5e6..96e7502bca2b19b9f4bd25a1e7ccaad925e84b30 100644 (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;
index 93ae387ea161eb4a5c830c92f489ca3280824fab..64e8168df3516f8843a1c93f8c4a2ceed5812d6d 100644 (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;
index 0baab2223781ca37d820e2e8997791c47af099ef..b049a00b9bc21fa92e9aefbb1f5b9a2929b7dafc 100644 (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)
index 547c58be286f23f5d5f956e416bc55e047864d1a..fde3259ec4d2361ba01d581862e99a85bdb7cc1b 100644 (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;
index 31c29572fa9e415ebba94375dd7204be66cc41d9..3c764d9260f309ebc92c5ac74be97b8c4b7d8611 100644 (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;
index c4e2ff6dc3593dea1360bbbeda2abfbbca319e67..0f9f9529a24099658552beb6892567fdbd9d357c 100644 (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;
index adf90666caee972d46928896db3fd15d26cb679b..4c5a3770532a54c42147bd5c48c0c36b57fa4c44 100644 (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;
index d2a486800ec418739987c02078a190eb997c0603..f00eec0575abd743398dcdd3a663f3efe3560e44 100644 (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;
index cc3c950fda413721f5d714a3557b298de6c475a7..9d3d921f36331a36950920cc9385cbb9a1ffbb91 100644 (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;
index b92444f3897532a8c070d4da949e9b07145c7caf..e5260775e5c0d016a25c0b864e8300e49073a832 100644 (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");
 
index 5ad3ba09856fec872cc9b746b6e808e90078881e..83e22f79f73584d62dfe5dc60f6045a48b3cc60f 100644 (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;
index 1853912e5bdc27ebede06fc3f423dea5a0e3493c..d966f256062c632848fa83d53022cda051ca7fcd 100644 (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;
index c4a61842892237d3c4e91e9f48dcb679a42dd3ce..3de4fae28e2b7b9155537598fedda3490219f849 100644 (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);
     }
index 423f200b60badbd67b85504a3296fb9de38bdacf..7d139c50fe24238749825f1bd0a37454ac6497eb 100644 (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;
index 31d1e3442fbc87c89fe7ec92d06cfb414fbb49aa..45ad910bd0b7269d87f156363c232ffd569bd69d 100644 (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;
                 }
index 877813eb10a3eb94b0358e391a1c2c37f387989a..6e987b48680d78ce5338488d083e1321163954c4 100644 (file)
@@ -101,9 +101,11 @@ try_exit:
 
         NOTHING;
     }
-    __except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
+    __except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
     {
 
+        AFSDumpTraceFilesFnc();
+
         ntStatus = STATUS_INSUFFICIENT_RESOURCES;
     }
 
index b4a33e3103508a691ff110f7782bf527a981fa56..d531aa92979e522e64188b1a97ea08ef2231c107 100644 (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;
index 4fb66bf781668744046cf54c2c9ce164a20403d4..5e6fd9e77a208ae55f327b97b5848aa4fd6d9256 100644 (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;
index b80c2adc128a4645f893ba7b4e43f4309d3371b9..63817f3e9415e0cfcf01f6a06e98e3923d7bff1c 100644 (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;
index 9abf890ce2c2cf379b435a79c08ee8eb79eee580..485713d3cb6b715a4f3a2acc1c9d7617d829e21d 100644 (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;
index d2cfeadb921c0fcc9eb7b1e239d48f50cb2c8917..342058765cefc593637557245d0c4b698e429066 100644 (file)
@@ -105,10 +105,12 @@ try_exit:
 
         NOTHING;
     }
-    __except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
+    __except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
     {
 
         ntStatus = STATUS_INSUFFICIENT_RESOURCES;
+
+        AFSDumpTraceFilesFnc();
     }
 
     return ntStatus;
index 75300b54b657fcfea54363cd6c9119c25c8e21c1..5ae8604f8bc39910e3c5d42305a91d5935165d5b 100644 (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
index 612e49946480e5137b21e52e9e89e5f4051e0b38..342c338ca72936a3982e3674c5b82adb0a78280a 100644 (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;
index 469ba515492aa14340e604bf346627598adb8208..62bcb21258b518afa64bafeac97e0fed456a8412 100644 (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;
index 388495c9c0b578cc3813f409d0b49ec585e2f37f..3bb9e5f2fc4db9a202e8922ab76d5f3d3161587b 100644 (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();
     }
 
     //
index 3464552c204dcea28208d6de42dc3cabc55c1b79..627195eb44404dc1e6412af4ba79b0f094797755 100644 (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;
index cb8995840aa0ea2e3f8d780f927308a929ca3585..e7346f29400017bd839539369facb12b4de201a7 100644 (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)
index 94fa398c20917556e1946da1bc10e42303321911..49ff0cc3e124d738ad03b0bedd55b9aef0841fd1 100644 (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;
index b4823780f41dcad9c7f7597a7101c68bce683e2f..05610d39fb1e761b40d2274847766d8b05f6ef39 100644 (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 );
index b5768a9bd3699364c09b4ccea4719fea677ef596..6715c95589d7ce3f6c288a2fa8f04bcba74b29a1 100644 (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;
index 6311a9dd1d526ac6d6868b13c0690c3bcf6d6a79..4a53c502a79677a706faaf4dfdbb23ec82aa7b8a 100644 (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)
index 0dca9fdd60900758d88a61194605846fd62885f9..e25dc985e95a31569637aba1a02bdd0df41e93f9 100644 (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;
index 98a59411f5c3afb4fdc92cca9effa94bca798be0..d8f3aff8fce4841d570b78ac28ff61e863094dd2 100644 (file)
@@ -286,10 +286,12 @@ try_exit:
             }
         }
     }
-    __except( AFSExceptionFilter( GetExceptionCode(), GetExceptionInformation()) )
+    __except( AFSExceptionFilter( __FUNCTION__, GetExceptionCode(), GetExceptionInformation()) )
     {
 
         AFSPrint( "EXCEPTION - AFS DriverEntry\n");
+
+        AFSDumpTraceFilesFnc();
     }
 
     return ntStatus;
index 64e5e9c013cf3a6dd4218bde3b8adb545fb38cb6..363216de7d6f741fe7dc012a86a766c0d4e098fe 100644 (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;
index e54cb0014d8ce6e9375220be04757ce9dbe3070c..15459670b4d22c6a54282b05210614ab6bb0c8ac 100644 (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
         //
index ab8a0ddb47341fe145ee34ea6693495fb1cfab26..7816de6a7ad0008ed635b33aa3466341685b0664 100644 (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;
index 660e90fccb8af7c87fb1d0dfa3de64995f0922f2..e0ac614d8e0588b0bccd62f3c1727f9a52b12f49 100644 (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;
index 5b178b643b3d46d321f366baf82802380978af6e..c15d32b8e88efe2a041885bc744dd51a23f648a2 100644 (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,
index 9bf6f67f5c73a792aeeb43cc2bd845b334ede60b..230f8afa509b5a01c50185a61e3243a2bdcdaea4 100644 (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;
index 109e065a4e60f3d0723b0a296757455ddfa122f7..6afcd95088d86bd95ba9a976ab85ab670000c819 100644 (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;
index 33e174bfee01c5f73eb552551afec5ad84830916..6d6343faea2dc54b25d18437e11d105222e8fcca 100644 (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;
index ac83818463805f3c6b85562a3c9cde02318d2f17..64b9adaa93d7ca28a558b383fdcb6b59a1134df6 100644 (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;
index e4db03a8691eadf8118de31c91cb05b3adc58322..177c6cf1f09b5e965550035366d89d33de4ab91d 100644 (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;
index f98494e2f7dfd1e03d8c7a74558d9f451146f655..39cb790c37983403deeeb1097aaa54e9b8db477a 100644 (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