mirror of
https://github.com/riverar/messageanalyzer-archive
synced 2026-06-08 17:10:57 +00:00
191 lines
7.5 KiB
Plaintext
191 lines
7.5 KiB
Plaintext
//
|
|
// Text configuraiton file for CheckSym log files.
|
|
//
|
|
|
|
// eg:
|
|
// sep=,
|
|
// CHECKSYM,(2.4:0.0)
|
|
// Created:,"October 29, 2013 11:48:32"
|
|
// Computer:,CBSD-DPM
|
|
message CheckSymSEP with
|
|
EntryInfo
|
|
{
|
|
Regex = @"sep=,", Priority = 1, Multiline = parseMultilineLines
|
|
}
|
|
: LogEntry
|
|
{
|
|
string VersionMajor;
|
|
string VersionMinor;
|
|
optional DateTime CreateDateTime;
|
|
string Computer;
|
|
bool parseMultilineLines(string line, LineContext context)
|
|
{
|
|
if (context.IsInitialLine)
|
|
{
|
|
return true;
|
|
}
|
|
if (line.StartWith("CHECKSYM,"))
|
|
{
|
|
int leftPos= line.IndexOf("(");
|
|
int midPos= line.IndexOf(":");
|
|
int rightPos= line.IndexOf(")");
|
|
VersionMajor = line.Segment(leftPos + 1, midPos- leftPos - 1);
|
|
VersionMinor = line.Segment(midPos + 1, rightPos- midPos - 1);
|
|
return true;
|
|
}
|
|
if (line.StartWith("Created:"))
|
|
{
|
|
int leftPos= line.IndexOf("\"");
|
|
int rightPos= line.LastIndexOf("\"");
|
|
CreateDateTime = (line.Segment(leftPos + 1, rightPos- leftPos - 1)).ToDateTime();
|
|
return true;
|
|
}
|
|
if (line.StartWith("Computer:"))
|
|
{
|
|
Computer = line.Segment(line.IndexOf(",") + 1);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
override string ToString()
|
|
{
|
|
string summary = "CheckSymVersion: " + VersionMajor + ":" + VersionMinor;
|
|
if (CreateDateTime != nothing)
|
|
{
|
|
summary += ", Created: " + CreateDateTime.ToString();
|
|
}
|
|
summary+= ", Computer: " + Computer;
|
|
return summary;
|
|
}
|
|
}
|
|
|
|
// eg: [FILESYSTEM MODULES]
|
|
message CheckSymOptions with
|
|
EntryInfo
|
|
{
|
|
Regex = @"\[(?<CollectionOptions>[^\]]*)\]", Priority = 1
|
|
}
|
|
: LogEntry
|
|
{
|
|
string CollectionOptions;
|
|
override string ToString()
|
|
{
|
|
return "CollectionOptions: " + CollectionOptions;
|
|
}
|
|
}
|
|
|
|
//,Process Name,Process ID,Module Path,Symbol Status,Checksum,Time/Date Stamp,Time/Date String,Size Of Image,DBG Pointer,PDB Pointer,PDB Signature,PDB Age,Product Version,File Version,Company Name,File Description,File Size,File Time/Date Stamp (High),File Time/Date Stamp (Low),File Time/Date String,Local DBG Status,Local DBG,Local PDB Status,Local PDB
|
|
message CheckSymFullHeadLine with
|
|
EntryInfo
|
|
{
|
|
Regex = @"(?<Headline>.*)", Priority = 1, Tag = FullEntryHeadline,
|
|
}
|
|
: LogEntry
|
|
{
|
|
string Headline;
|
|
override string ToString()
|
|
{
|
|
return Headline;
|
|
}
|
|
}
|
|
const string FullEntryHeadline = ",Process Name,";
|
|
|
|
//,,,Module Path,Symbol Status,Checksum,Time/Date Stamp,Time/Date String,Size Of Image,DBG Pointer,PDB Pointer,PDB Signature,PDB Age,Product Version,File Version,Company Name,File Description,File Size,File Time/Date Stamp (High),File Time/Date Stamp (Low),File Time/Date String,Local DBG Status,Local DBG,Local PDB Status,Local PDB
|
|
message CheckSymPartialHeadLine with
|
|
EntryInfo
|
|
{
|
|
Regex = @"(?<Headline>.*)", Priority = 1, Tag = PartialEntryHeadline,
|
|
}
|
|
: LogEntry
|
|
{
|
|
string Headline;
|
|
override string ToString()
|
|
{
|
|
return Headline;
|
|
}
|
|
}
|
|
const string PartialEntryHeadline = ",,,Module Path,";
|
|
|
|
//,SMSS.EXE,416,C:\WINDOWS\SYSTEM32\SMSS.EXE,SYMBOLS_NO,0,0,"December 31, 1969 19:00:00",0,,,,,(6.2:9200.16384),(6.2:9200.16384),Microsoft Corporation,Windows Session Manager,132096,30239471,1060766331,"July 26, 2012 1:26:45 AM",
|
|
message CheckSymFullEntry with
|
|
EntryInfo
|
|
{
|
|
Regex = @",(?<ProcessName>[^,]*),(?<ProcessID>[^,]*),(?<ModulePath>[^,]*),(?<SymbolStatus>[^,]*),(?<Checksum>[^,]*),(?<ts>[^,]*),(\x22(?<tsstr>[^\x22]*)\x22)?,(?<SizeOfImage>[^,]*),(?<DBGPointer>[^,]*),(?<PDBPointer>[^,]*),(?<PDBSignature>[^,]*),(?<PDBAge>[^,]*),((\((?<ProductVersionMajor>[\d]+)\.(?<ProductVersionMinor>[\d]+)\:(?<ProductVersionBuild>[\d]+)\.(?<ProductVersionSubBuild>[\d]+)\))|((?<ProductVersionMajor>[\d]+)\.(?<ProductVersionMinor>[\d]+)\.(?<ProductVersionBuild>[\d]+)\.(?<ProductVersionSubBuild>[\d]+)))?,((\((?<FileVersionMajor>[\d]+)\.(?<FileVersionMinor>[\d]+)\:(?<FileVersionBuild>[\d]+)\.(?<FileVersionSubBuild>[\d]+)\))|((?<FileVersionMajor>[\d]+)\.(?<FileVersionMinor>[\d]+)\.(?<FileVersionBuild>[\d]+)\.(?<FileVersionSubBuild>[\d]+)))?,(?<CompanyName>((\x22[^\x22]+\x22)|([^\x22,]+))?),(?<FileDescription>((\x22[^\x22]+\x22)|([^\x22,]+))?),(?<FileSize>[^,]*),(?<File_ts_high>[^,]*),(?<File_ts_low>[^,]*),\x22(?<FileDateString>[^\x22]*)\x22,"
|
|
, Priority = 1,
|
|
}
|
|
: LogEntry
|
|
{
|
|
// all fields defined as string, in case of some fields do not appeared
|
|
string ProcessName;
|
|
string ProcessID;
|
|
string ModulePath;
|
|
string SymbolStatus;
|
|
string Checksum;
|
|
string ts;
|
|
string tsstr;
|
|
string SizeOfImage;
|
|
string DBGPointer;
|
|
string PDBPointer;
|
|
string PDBSignature;
|
|
string PDBAge;
|
|
string ProductVersionMajor;
|
|
string ProductVersionMinor;
|
|
string ProductVersionBuild;
|
|
string ProductVersionSubBuild;
|
|
string FileVersionMajor;
|
|
string FileVersionMinor;
|
|
string FileVersionBuild;
|
|
string FileVersionSubBuild;
|
|
string CompanyName;
|
|
string FileDescription;
|
|
string FileSize;
|
|
string File_ts_high;
|
|
string File_ts_low;
|
|
string FileDateString;
|
|
}
|
|
|
|
//,,,C:\PROGRAM FILES\DELL\SYSMGT\OMSA\HAPI\DCDBAS64.SYS,SYMBOLS_PDB,93387,1376392341,"August 13, 2013 07:12:21",53248,,d:\cmake_openmanage\hapi\dchapi_source\hapi\devicedriver\dcdbas\winnt\wdm\objfre_wlh_amd64\amd64\dcdbas64.pdb,{89534ECF-C4B0-4201-B6D4-F6AD88C644EB},1,(7.4:0.3999),(7.4:0.3999),Dell Inc.,Dell BASE Device Driver,39480,30354153,867219712,"February 16, 2014 3:32:10 AM",
|
|
message CheckSymPartialEntry with
|
|
EntryInfo
|
|
{
|
|
Regex = @",,,(?<ModulePath>[^,]*),(?<SymbolStatus>[^,]*),(?<Checksum>[^,]*)?,(?<ts>[^,]*),(\x22(?<tsstr>[^\x22]*)\x22)?,(?<SizeOfImage>[^,]*),(?<DBGPointer>[^,]*),(?<PDBPointer>[^,]*),(?<PDBSignature>[^,]*),(?<PDBAge>[^,]*),((\((?<ProductVersionMajor>[\d]+)\.(?<ProductVersionMinor>[\d]+)\:(?<ProductVersionBuild>[\d]+)\.(?<ProductVersionSubBuild>[\d]+)\))|((?<ProductVersionMajor>[\d]+)\.(?<ProductVersionMinor>[\d]+)\.(?<ProductVersionBuild>[\d]+)\.(?<ProductVersionSubBuild>[\d]+)))?,((\((?<FileVersionMajor>[\d]+)\.(?<FileVersionMinor>[\d]+)\:(?<FileVersionBuild>[\d]+)\.(?<FileVersionSubBuild>[\d]+)\))|((?<FileVersionMajor>[\d]+)\.(?<FileVersionMinor>[\d]+)\.(?<FileVersionBuild>[\d]+)\.(?<FileVersionSubBuild>[\d]+)))?,(?<CompanyName>((\x22[^\x22]+\x22)|([^\x22,]+))?),(?<FileDescription>((\x22[^\x22]+\x22)|([^\x22,]+))?),(?<FileSize>[^,]*),(?<File_ts_high>[^,]*),(?<File_ts_low>[^,]*),\x22(?<FileDateString>[^\x22]*)\x22,"
|
|
, Priority = 1, Tag = PartialEntry,
|
|
}
|
|
: LogEntry
|
|
{
|
|
// all fields defined as string, in case of some fields do not appeared
|
|
//string ProcessName;
|
|
//string ProcessID;
|
|
string ModulePath;
|
|
string SymbolStatus;
|
|
string Checksum;
|
|
string ts;
|
|
string tsstr;
|
|
string SizeOfImage;
|
|
string DBGPointer;
|
|
string PDBPointer;
|
|
string PDBSignature;
|
|
string PDBAge;
|
|
string ProductVersionMajor;
|
|
string ProductVersionMinor;
|
|
string ProductVersionBuild;
|
|
string ProductVersionSubBuild;
|
|
string FileVersionMajor;
|
|
string FileVersionMinor;
|
|
string FileVersionBuild;
|
|
string FileVersionSubBuild;
|
|
string CompanyName;
|
|
string FileDescription;
|
|
string FileSize;
|
|
string File_ts_high;
|
|
string File_ts_low;
|
|
string FileDateString;
|
|
}
|
|
const string PartialEntry = ",,,";
|
|
|
|
// Is x started with y
|
|
bool StartWith(this string x, string y)
|
|
{
|
|
return x.Count >= y.Count && x.Segment(0, y.Count) == y;
|
|
}
|