crashanalysercmd/Libraries/File Formats/Plugins/CrashInfoFilePlugin/FileFormat/CCrashInfoDataBlock.cs
changeset 3 045ade241ef5
parent 2 0c91f0baec58
--- a/crashanalysercmd/Libraries/File Formats/Plugins/CrashInfoFilePlugin/FileFormat/CCrashInfoDataBlock.cs	Wed Apr 21 09:51:02 2010 +0300
+++ b/crashanalysercmd/Libraries/File Formats/Plugins/CrashInfoFilePlugin/FileFormat/CCrashInfoDataBlock.cs	Fri Aug 27 12:21:46 2010 +0300
@@ -344,7 +344,16 @@
                     try //CCrashInfoHashBuilder.New throws an exception if there's not enough data for hash creation
                     {
                         MobileCrashHashBuilder builder = MobileCrashHashBuilder.New(config, primarySummary);
-                        iHash = builder.GetHash();
+
+                        if (builder != null)
+                            iHash = builder.GetHash();
+
+                        // Get detailed hash
+                        config = MobileCrashHashBuilder.TConfiguration.EDetailed;
+                        builder = MobileCrashHashBuilder.New(config, primarySummary, MobileCrashHashBuilder.KDetailedNumberOfStackEntriesToCheckForSymbols);
+                        
+                        if (builder != null)
+                            iDetailedHash = builder.GetHash();
                     }
                     catch (Exception e)
                     {
@@ -716,6 +725,15 @@
                 aOutput.Write( CCrashInfoFileUtilities.MakeOutputTags( iHash, CrashInfoConsts.Kcrash_hash ) );
             }
         }
+        
+        internal void WriteDetailedCrashHash(System.IO.StreamWriter aOutput)
+        {
+            if (string.IsNullOrEmpty(iDetailedHash) == false)
+            {
+                aOutput.Write(CCrashInfoFileUtilities.MakeOutputTags(iDetailedHash, CrashInfoConsts.Kcrash_detailedhash));
+            }
+        }
+
         internal void WriteMMCInfo(System.IO.StreamWriter aOutput)
         {
             //Dummy value needs to be written for dbmover
@@ -901,6 +919,7 @@
         private uint? iReportParamValue3 = null;
         private string iReportComments = string.Empty;
         private string iHash = string.Empty;
+        private string iDetailedHash = string.Empty;
 
         private List<CCrashInfoCallStack> iCallStacks = new List<CCrashInfoCallStack>(); //Call stacks