diff --git a/src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj b/src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj index b55b2ad..440ed6b 100644 --- a/src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj +++ b/src/BUTR.CrashReport.Bannerlord.Parser/BUTR.CrashReport.Bannerlord.Parser.csproj @@ -32,7 +32,7 @@ - + diff --git a/src/BUTR.CrashReport.Bannerlord.Source/CrashReportHtmlRenderer.cs b/src/BUTR.CrashReport.Bannerlord.Source/CrashReportHtmlRenderer.cs index 231275d..18f8bac 100644 --- a/src/BUTR.CrashReport.Bannerlord.Source/CrashReportHtmlRenderer.cs +++ b/src/BUTR.CrashReport.Bannerlord.Source/CrashReportHtmlRenderer.cs @@ -521,13 +521,13 @@ private static string GetEnhancedStacktraceHtml(CrashReportModel crashReport) .Append("Approximate IL Offset: ").Append(stacktrace.ILOffset is not null ? $"{stacktrace.ILOffset:X4}" : "UNKNOWN").Append("
") .Append("Native Offset: ").Append(stacktrace.NativeOffset is not null ? $"{stacktrace.NativeOffset:X4}" : "UNKNOWN") .Append($"
+ IL:
")
-                    .AppendJoin(Environment.NewLine, stacktrace.ExecutingMethod.ILInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(stacktrace.ExecutingMethod.ILInstructions.Count > 0, Environment.NewLine, stacktrace.ExecutingMethod.ILInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append($"
+ IL with C#:
")
-                    .AppendJoin(Environment.NewLine, stacktrace.ExecutingMethod.CSharpILMixedInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(stacktrace.ExecutingMethod.CSharpILMixedInstructions.Count > 0, Environment.NewLine, stacktrace.ExecutingMethod.CSharpILMixedInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append($"
+ C#:
")
-                    .AppendJoin(Environment.NewLine, stacktrace.ExecutingMethod.CSharpInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(stacktrace.ExecutingMethod.CSharpInstructions.Count > 0, Environment.NewLine, stacktrace.ExecutingMethod.CSharpInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append($"
+ Native:
")
-                    .AppendJoin(Environment.NewLine, stacktrace.ExecutingMethod.NativeInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(stacktrace.ExecutingMethod.NativeInstructions.Count > 0, Environment.NewLine, stacktrace.ExecutingMethod.NativeInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append("") .Append(""); @@ -546,11 +546,11 @@ private static string GetEnhancedStacktraceHtml(CrashReportModel crashReport) .AppendIf(moduleId != "UNKNOWN", sb => sb.Append("Module Id: ").Append("").Append(moduleId).Append("").Append("
")) .Append("Method: ").Append(method.MethodFullDescription.EscapeGenerics()).Append("
") .Append($"
+ IL:
")
-                            .AppendJoin(Environment.NewLine, method.ILInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(method.ILInstructions.Count > 0, Environment.NewLine, method.ILInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append($"
+ IL with C#:
")
-                            .AppendJoin(Environment.NewLine, method.CSharpILMixedInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(method.CSharpILMixedInstructions.Count > 0, Environment.NewLine, method.CSharpILMixedInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append($"
+ C#:
")
-                            .AppendJoin(Environment.NewLine, method.CSharpInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(method.CSharpInstructions.Count > 0, Environment.NewLine, method.CSharpInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append(""); } sb.Append(""); @@ -568,11 +568,11 @@ private static string GetEnhancedStacktraceHtml(CrashReportModel crashReport) .AppendIf(moduleId2 != "UNKNOWN", sb => sb.Append("Module Id: ").Append("").Append(moduleId2).Append("").Append("
")) .Append("Method: ").Append(stacktrace.OriginalMethod.MethodFullDescription.EscapeGenerics()).Append("
") .Append($"
+ IL:
")
-                        .AppendJoin(Environment.NewLine, stacktrace.OriginalMethod.ILInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(stacktrace.OriginalMethod.ILInstructions.Count > 0, Environment.NewLine, stacktrace.OriginalMethod.ILInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append($"
+ IL with C#:
")
-                        .AppendJoin(Environment.NewLine, stacktrace.OriginalMethod.CSharpILMixedInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(stacktrace.OriginalMethod.CSharpILMixedInstructions.Count > 0, Environment.NewLine, stacktrace.OriginalMethod.CSharpILMixedInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append($"
+ C#:
")
-                        .AppendJoin(Environment.NewLine, stacktrace.OriginalMethod.CSharpInstructions.Select(x => x.EscapeGenerics())).Append("
") + .AppendJoinIf(stacktrace.OriginalMethod.CSharpInstructions.Count > 0, Environment.NewLine, stacktrace.OriginalMethod.CSharpInstructions.Select(x => x.EscapeGenerics()).ToArray()).Append("") .Append("") .Append(""); }