1
Vote

Get-DbgObject fails on a "Socket"

description

Example output from 'dumpobj -raw':
 
Address: 0000000003aafc70
Name: System.Net.Sockets.Socket
MethodTable: 0000064281182c00
EEClass: 0000064281166930
Size: 120(0x78) bytes
(C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll)
Fields:
          MT    Field   Offset                 Type VT     Attr            Value Name
0000064278435ed8 40029ef 8 System.Object 0 instance 0000000000000000 m_AcceptQueueOrConnectResult
00000642811854a0 40029f0 10 ...t.SafeCloseSocket 0 instance 0000000003aafd08 m_Handle
000006428112e938 40029f1 18 System.Net.EndPoint 0 instance 0000000003a58ec0 m_RightEndPoint
000006428112e938 40029f2 20 System.Net.EndPoint 0 instance 0000000003d00e68 m_RemoteEndPoint
00000642784357b8 40029f3 68 System.Boolean 1 instance 1 m_IsConnected
00000642784357b8 40029f4 69 System.Boolean 1 instance 0 m_IsDisconnected
00000642784357b8 40029f5 6a System.Boolean 1 instance 1 willBlock
00000642784357b8 40029f6 6b System.Boolean 1 instance 1 willBlockInternal
00000642784357b8 40029f7 6c System.Boolean 1 instance 0 isListening
...
000006428118bc78 40029fd 30 ...s.Socket+CacheSet 0 instance 0000000003d00ee8 m_Caches
...
 
Current $dumpobjRegex (build 6.10.10.22) doesn't like that "Socket+CacheSet" above and throws a "Regex failing on '$line'" exception.
 
I've changed line 1446:
\s+(?<Type>[ .\w,-_[]`]{0,24})? # Type is 20 chars, 4 extra w/sp in .net 4, optional
into:
\s+(?<Type>[ .\w+,-_[]`]{0,24})? # Type is 20 chars, 4 extra w/sp in .net 4, optional
and it seems, like that helped.

comments