Add support for collectible types to SOS (#19842)
authorJan Vorlicek <janvorli@microsoft.com>
Thu, 6 Sep 2018 08:15:21 +0000 (10:15 +0200)
committerGitHub <noreply@github.com>
Thu, 6 Sep 2018 08:15:21 +0000 (10:15 +0200)
commit2a236b31a65614f5318cad794a5f38f4e566674e
tree255aa82fc7e3dd8275f93cd845684607bd42d3a1
parent045915424f7c4a3e6647cf35d6fca8a7fe48ea16
Add support for collectible types to SOS (#19842)

* Add support for collectible types to SOS

Collectible types indirectly reference managed LoaderAllocator via
pointer to native AssemblyLoaderAllocator stored in their MethodTable.
GC uses this relation when scanning object graph to determine which
objects are rooted and which ones are not.
The gcroot command in SOS doesn't understand this relation and so it
is unable to find all roots for LoaderAllocator.
This change fixes it.

* PR feedback

Make the failure to get the collectible info non-fatal to make it
compatible with older runtimes.
12 files changed:
src/ToolBox/SOS/Strike/eeheap.cpp
src/ToolBox/SOS/Strike/gcroot.cpp
src/ToolBox/SOS/Strike/sos.cpp
src/ToolBox/SOS/Strike/sos.h
src/ToolBox/SOS/Strike/util.h
src/debug/daccess/daccess.cpp
src/debug/daccess/dacimpl.h
src/debug/daccess/request.cpp
src/inc/dacprivate.h
src/inc/sospriv.idl
src/pal/prebuilt/idl/sospriv_i.cpp
src/pal/prebuilt/inc/sospriv.h