For iterating over native objects, i can store it in windbg variable and then do linq
queries on fields in windbg to filter on intereting objects.
> dx @$usedSessions = (*((FabricRuntime!std::unordered_map<unsigned __int64,std::shared_ptr<Store::EseLocalStore::EsePoolItem>,std::hash<unsigned __int64>,std::equal_to<unsigned __int64>,std::allocator<std::pair<unsigned __int64 const ,std::shared_ptr<Store::EseLocalStore::EsePoolItem> > > > *)0x1dfff35f1a8))
> dx @$usedSessions.Take(2).Select(s => s.second->session_->sessionId_)
but dx
windbg command fails for sos
commands:
0:045> dx @$Txs = !dumpheap -live -type System.Fabric.Transaction
Error: Unexpected token at 'System.Fabric.Transaction'
Can i iterate over managed objects using Linq in windbg ?