How to list the whole object in the GC completion list?

I have a crash in my program, this is a visualizer for VS, so it is very difficult to debug, I tried to dump and use WinDbg to study it, but it was unsuccessful.

So now I am trying to use this list programmatically, but I do not know how to do it. Thank.

+4
source share
2 answers

I don’t think there is a way to get into the finalization queue through the .NET Framework Framework Class Library (FCL). I suspect that if you want to do this programmatically instead of debugging with WinDbg , you (like WinDbg and similar tools) will need to use the CLF unmanaged APIs for debugging and profiling for this purpose.

ICORDebugGCReferenceEnum COM-. ICorDebugProcess5::EnumerateGCReferences:

" , ."

" COR_GC_REFERENCE , [a ICorDebugGCReferenceEnum::Next ] :

  • . , , .

  • . (HNDTYPE_STRONG HNDTYPE_REFCOUNT) .

  • . .

( .)

, , type. , CorGCReferenceType.CorReferenceFinalizer.

+2

, , WinDBG, , dumpheap -stat . , , !FinalizeQueue, , , . - , - f- .

:

0: 003 > ! FinalizeQueue

SyncBlocks : 0 MTA : 0 STA- : 0

0 370
(0000000000d29030- > 0000000000d29bc0)

1 4
(0000000000d29010- > 0000000000d29030)

2 8
(0000000000d28fd0- > 0000000000d29010)

571
(0000000000d29bc0- > 0000000000d2ad98)

, .

+3

Source: https://habr.com/ru/post/1588971/


All Articles