Skip to content

Instantly share code, notes, and snippets.

@kevingosse
Last active March 13, 2019 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevingosse/13210de7fbba1a0035270a95a3627c10 to your computer and use it in GitHub Desktop.
Save kevingosse/13210de7fbba1a0035270a95a3627c10 to your computer and use it in GitHub Desktop.
[DllExport("helloworld")]
public static void HelloWorld(IntPtr client, [MarshalAs(UnmanagedType.LPStr)] string args)
{
DebuggingContext.Execute(client, args, HelloWorld);
}
private static void HelloWorld(ClrRuntime runtime, string args)
{
Console.WriteLine("The first 10 types on the heap are: ");
foreach (var type in runtime.Heap.EnumerateTypes().Take(10))
{
Console.WriteLine(type);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment