Skip to content

Commit 345e1a1

Browse files
author
Lifeng Lu
committed
Fix the dumpasync common to handle general ValueTasks.
1 parent 10969cc commit 345e1a1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/SosThreadingTools/DumpAsyncCommand.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,15 @@ private static void GetAllStateMachines(DebuggerContext context, ClrHeap heap, L
5656
break;
5757
}
5858

59-
asyncBuilder = asyncBuilder.TryGetValueClassField("m_builder");
59+
ClrValueType? nextAsyncBuilder = asyncBuilder.TryGetValueClassField("m_builder");
60+
if (nextAsyncBuilder == null)
61+
{
62+
asyncBuilder = asyncBuilder.TryGetValueClassField("_methodBuilder");
63+
}
64+
else
65+
{
66+
asyncBuilder = nextAsyncBuilder;
67+
}
6068
}
6169
}
6270
else

0 commit comments

Comments
 (0)