Reimplement DacStackReferenceWalker and DacHandleWalker (#83836)
authorLee Culver <leculver@microsoft.com>
Tue, 28 Mar 2023 16:36:21 +0000 (09:36 -0700)
committerGitHub <noreply@github.com>
Tue, 28 Mar 2023 16:36:21 +0000 (09:36 -0700)
commit49ae58ace038dbbd3d53147e08c9ac95b24a789f
treed214caa3b26cc7cdd93177750fdc4851acaf1aa9
parent531bf3c02c07e82682a84dcf64214782dc971fc7
Reimplement DacStackReferenceWalker and DacHandleWalker (#83836)

* Refactor DacStackReferenceWalker

Added a flag to not resolve interior pointers to the start of the object. This allows the debugger to shoulder that burden instead of the dac doing this work. This greatly speeds up stack root walking.

Greatly simplified the logic. There's a memory error in this code lurking somewhere because it used some complicated pointer arithmetic that wasn't correct. Since copying references isn't time critical code, I made this as dead simple as possible so it's easy to validate.

* Clean up and simplify DacHandleWalker

* Minor fixes

* Only produce SOS style reference lists

* Fix build warnings

* Fix handle walking issue

* Fix minor handle walking issue
src/coreclr/debug/daccess/daccess.cpp
src/coreclr/debug/daccess/dacdbiimpl.cpp
src/coreclr/debug/daccess/dacdbiimpl.h
src/coreclr/debug/daccess/dacimpl.h
src/coreclr/debug/daccess/request.cpp