Skip to content

Commit

Permalink
Show alternative message if no GC Info is found
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardo-vp committed Sep 6, 2023
1 parent 3e6fe40 commit 2b8bf81
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions ILSpy.ReadyToRun/ReadyToRunDisassembler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,20 @@ public void Disassemble(PEFile currentFile, int bitness, ulong address, bool sho
ReadyToRunMethod readyToRunMethod = runtimeFunction.Method;
WriteCommentLine(readyToRunMethod.SignatureString);

if (ReadyToRunOptions.GetIsShowGCInfo(null) && readyToRunMethod.GcInfo != null)
if (ReadyToRunOptions.GetIsShowGCInfo(null))
{
string[] lines = readyToRunMethod.GcInfo.ToString().Split(Environment.NewLine);
WriteCommentLine("GC info:");
foreach (string line in lines)
if (readyToRunMethod.GcInfo != null)
{
WriteCommentLine(line);
string[] lines = readyToRunMethod.GcInfo.ToString().Split(Environment.NewLine);
WriteCommentLine("GC info:");
foreach (string line in lines)
{
WriteCommentLine(line);
}
}
else
{
WriteCommentLine("GC Info is not available for this method");
}
}

Expand Down

0 comments on commit 2b8bf81

Please sign in to comment.