如果数组包含100000000个项目,它太长了,不能输出所有的项目,所以我可以知道,如果我想用windbg输出数组的10个项目,比如!da top 10地址,如何处理?
sos !da
命令接受-start
和-length
参数:
-start <startIndex>: optional, only supported for single dimension array.
Specify from which index the command shows the elements.
-length <length>: optional, only supported for single dimension array.
Specify how many elements to show.
在sosex中,您可以使用!mdt
与-start:
和-count:
参数:
!sosex.mdt [typename | paramname | localname | MT] [ADDR]
[-r[:level]] [-e[:level]] [-start:index] [-count:n]
或者您可以使用NetExt。!wdo
命令适用于数组,并具有/start
和/end
参数来限制索引:
!wdo [/forcearray] [/shownull] [/noheader] [/noindex] [/mt <expr>]
[/start <expr>] [/end <expr>] <expr>
/mt <expr> - mt,Method table for value objects (space-delimited)
<expr> - Address,Object Address
/start <expr> - Starting index to show in an array (space-delimited)
/end <expr> - Ending index to show in an array (space-delimited)
/forcearray - For Byte[] and Char[] arrays show items not the string
/shownull - For arrays will show items that are null
/noheader - Display only object address and field and values
/noindex - For arrays it will show values without the index
/tokens - show class and type tokens for fields