/** Return the parameter string enclosed in crashinfofile identifier tags */
        public static string MakeOutputTags(string aContent, string aTagText)
        {
            string output = CCrashInfoFileUtilities.BlockStartMarker(aTagText);

            output += aContent;
            output += CCrashInfoFileUtilities.BlockEndMarker(aTagText);
            return(output);
        }
 //This is the phone number
 internal void WriteReporter(System.IO.StreamWriter aOutput)
 {
     //Dummy value needs to be written for first part
     aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Kreporter));
     aOutput.Write("NotFound");
     aOutput.Write(CrashInfoConsts.KSeparator);
     aOutput.Write(iPhoneNumber);
     aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Kreporter));
 }
 internal void WriteOstTraces(System.IO.StreamWriter aOutput)
 {
     if (iOstTraces.Count > 0)
     {
         aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Ktrace_data));
         foreach (string line in iOstTraces)
         {
             aOutput.Write(line + CrashInfoConsts.KEOL);
         }
         aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Ktrace_data));
     }
 }
 internal void WriteEventlog(System.IO.StreamWriter aOutput)
 {
     if (iEventlog.Count > 0)
     {
         aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Keventlog));
         foreach (string line in iEventlog)
         {
             aOutput.Write(line + CrashInfoConsts.KEOL);
         }
         aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Keventlog));
     }
 }
        internal void WriteProgramCounter(System.IO.StreamWriter aOutput)
        {
            aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Kprogram_counter));
            aOutput.Write(iProgramCounter.Value);
            aOutput.Write(CrashInfoConsts.KSeparator);
            if (iProgramCounter.Symbol != string.Empty)
            {
                aOutput.Write(iProgramCounter.Symbol);
            }
            else
            {
                aOutput.Write("-"); //missing pc symbol is marked with - in ci file.
            }


            aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Kprogram_counter));
        }
 internal void WriteOtherRegisters(System.IO.StreamWriter aOutput)
 {
     if (iOtherRegLists.Count > 0)
     {
         aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Kregister_extra));
         foreach (CCrashInfoRegisterList regList in iOtherRegLists)
         {
             aOutput.Write(regList.Name);
             aOutput.Write(CrashInfoConsts.KEOL);
             foreach (CCrasInfoRegisterItem reg in regList.Registers)
             {
                 aOutput.Write(reg.Name + " 0x" + reg.Value.ToString("X8"));
                 if (reg.Symbol != string.Empty)
                 {
                     aOutput.Write(" " + reg.Symbol);
                 }
                 aOutput.Write(CrashInfoConsts.KEOL);
             }
             aOutput.Write(CrashInfoConsts.KEOL);
         }
         aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Kregister_extra));
     }
 }
        internal void WriteLoadedDLLs(System.IO.StreamWriter aOutput)
        {
            aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Kcrashtime_loaded_dlls));
            bool first = true;

            foreach (CCrashInfoCodeSegItem codeseg in iCodeSegs)
            {
                if (first) //all but first item start with separator - special handling needed
                {
                    first = false;
                }
                else
                {
                    aOutput.Write(CrashInfoConsts.KSeparator);
                }
                aOutput.Write(codeseg.Start);
                aOutput.Write(CrashInfoConsts.KSeparator);
                aOutput.Write(codeseg.End);
                aOutput.Write(CrashInfoConsts.KSeparator);
                aOutput.Write(codeseg.Name);
            }
            aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Kcrashtime_loaded_dlls));
        }
 public void WriteBasicRegisters(System.IO.StreamWriter aOutput)
 {
     aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Kregister));
     if (iBasicRegs.Registers.Count == 0)
     {
         aOutput.Write("NotFound|");
     }
     else
     {
         aOutput.Write(iBasicRegs.Name);
         foreach (CCrasInfoRegisterItem reg in iBasicRegs.Registers)
         {
             aOutput.Write(CrashInfoConsts.KSeparator);
             aOutput.Write(reg.Name);
             aOutput.Write(CrashInfoConsts.KSeparator);
             aOutput.Write(reg.Value);
             if (reg.Symbol != string.Empty)
             {
                 aOutput.Write(":" + reg.Symbol);
             }
         }
     }
     aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Kregister));
 }
        /** Writes datablock contents to stream in CrashInfoFile format. Makes a complete .ci file */
        public void WriteToStream(StreamWriter aOutput)
        {
            aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Kversion));
            aOutput.Write(CrashInfoConsts.KVersionNumber.ToString().PadLeft(8, '0'));
            aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Kversion));

            aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Knum_datablocks));
            aOutput.Write(iDatablocks.Count.ToString().PadLeft(8, '0'));
            aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Knum_datablocks));

            foreach (CCrashInfoDataBlock datablock in iDatablocks)
            {
                datablock.WriteTimeStamp(aOutput);
                datablock.WriteRomID(aOutput);
                datablock.WriteSWVersion(aOutput);
                datablock.WriteVariantID(aOutput);
                datablock.WriteHWVersion(aOutput);
                datablock.WritePanicID(aOutput);
                datablock.WritePanicCategory(aOutput);
                datablock.WritePanicDescription(aOutput);
                datablock.WriteLanguage(aOutput);
                datablock.WritePanicedProcess(aOutput);
                datablock.WriteProgramCounter(aOutput);
                datablock.WriteModuleName(aOutput);
                datablock.WriteRegisterList(aOutput);
                datablock.WriteLoadedDLLs(aOutput);
                datablock.WriteAvailableMemory(aOutput);
                datablock.WriteUserComment(aOutput);
                datablock.WriteMemoryInfo(aOutput);
                datablock.WriteMiscInfo(aOutput);
                datablock.WriteReporter(aOutput);
                datablock.WriteArchive(aOutput);
                datablock.WriteProductType(aOutput);
                datablock.WriteCrashSource(aOutput);
                datablock.WriteProductionMode(aOutput);
                datablock.WriteImei(aOutput);
                datablock.WriteResetreason(aOutput);
                datablock.WriteUptime(aOutput);
                datablock.WriteTestset(aOutput);
                datablock.WriteIMSI(aOutput);
                datablock.WriteNetworkCountry(aOutput);
                datablock.WriteNetworkIdentity(aOutput);
                datablock.WriteLocInfo(aOutput);
                datablock.WriteNetworkCell(aOutput);
                datablock.WriteSerialNumber(aOutput);
                datablock.WriteS60Version(aOutput);
                datablock.WriteProductCode(aOutput);
                datablock.WriteVariantVersion(aOutput);
                datablock.WriteMMCInfo(aOutput);
                datablock.WriteUID(aOutput);
                datablock.WriteDiskInfo(aOutput);
                datablock.WriteFileType(aOutput);

                datablock.WriteReportType(aOutput);
                datablock.WriteReportCategory(aOutput);
                datablock.WriteReportOK(aOutput);
                datablock.WriteReportFail(aOutput);
                datablock.WriteReportParam1(aOutput);
                datablock.WriteReportParam2(aOutput);
                datablock.WriteReportParam3(aOutput);
                datablock.WriteReportComments(aOutput);

                datablock.WriteRegisterExtraList(aOutput);

                datablock.WriteCrashHash(aOutput);
                datablock.WriteDetailedCrashHash(aOutput);

                datablock.WriteBinFileName(aOutput);
                datablock.WriteSymbolFileNames(aOutput);

                datablock.WriteCallstacks(aOutput);
                datablock.WriteEventlog(aOutput);

                datablock.WriteOstTraces(aOutput);
            }
        }
Ejemplo n.º 10
0
 internal void WriteMemoryInfo(System.IO.StreamWriter aOutput)
 {
     //Dummy value needs to be written for dbmover - for memory info just the tags
     aOutput.Write(CCrashInfoFileUtilities.BlockStartMarker(CrashInfoConsts.Kmemory_info));
     aOutput.Write(CCrashInfoFileUtilities.BlockEndMarker(CrashInfoConsts.Kmemory_info));
 }