コード例 #1
0
 public void AddEntry(LibEntry entry)
 {
     AddLine(entry.CrashLine);
     _lines.Add(LibLineSeparator);
     _lines.Add($"{entry.LibLine}\nfrom\n{entry.FuncHeader}");
     _lines.Add(LibLineSeparator);
 }
コード例 #2
0
        public bool Analyze(CrashDumpLine line, Output output)
        {
            Console.WriteLine($"Start analyze line '{line.Number}'");
            var normalizedAddress = NormalizeAddress(line.Address);

            Console.WriteLine($"Address: '{line.Address}' => '{normalizedAddress}'");
            var libLineIndex = FindLineWithAddress(normalizedAddress);

            if (libLineIndex >= 0)
            {
                var libLine         = _contents[libLineIndex];
                var funcHeaderIndex = FindFuncHeaderIndex(libLineIndex);
                if (funcHeaderIndex >= 0)
                {
                    var funcHeader = _contents[funcHeaderIndex];
                    Console.WriteLine($"Line analyzed: '{line.Number}'");
                    var libEntry = new LibEntry(line, libLine, funcHeader);
                    output.AddEntry(libEntry);
                    return(true);
                }
            }
            Console.WriteLine($"Line didn't analyzed: '{line.Number}'");
            return(false);
        }