NTSD로 !dumpheap의 type 스위치 쓰기

iamgun(46)
Published in
#it
Words
140
Reading
1 min
9y
Listen to this post
~1 min

ntsd로 디버깅을 걸로 application 을 실행시킵니다.



그리고 loadby sos.dll mscorwks로 호출해서



sos extension을 사용해 현재 사용되고 있는



memory heap의 덤프를 봅니다.



여기서 스위치를 -type으로 해서 원하는 type을 스위치 파라미터로 넣어줍니다.



!dumpheap -type AAA.BBB.Mobile



위와같이 하면 그 타입에 대한 메모리 정보를 알수 있습니다.



끝... 


!dumpheap의 스위치로서는 아래를 참조해 주세요




 스위치  설명
-stat Limits output to managed heap statistics
-strings
Limits output to strings stored on the managed
heap
-short
Limits output to just the address of the objects
on the managed heap
-min
Filters based on the minimum object size
specified
-max
Filters based on the maximum object size
specified
-thinlock Outputs objects with associated thinlocks
-startAtLowerBound
 Begin walking the heap at a lower bound
-mt Limit output to the specified method table
-mt  Limit output to the specified method table
-type
Limit output to the specified type name
(substring match)