Add windows kernel module discovery.

This commit is contained in:
Bartosz Taudul 2021-06-15 21:08:09 +02:00
parent 8fa9860764
commit 2d5f6a411c
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -256,7 +256,18 @@ const char* DecodeCallstackPtrFast( uint64_t ptr )
static const char* GetModuleName( uint64_t addr )
{
if( ( addr >> 63 ) != 0 ) return "<kernel>";
if( ( addr >> 63 ) != 0 )
{
if( s_krnlCache )
{
auto it = std::lower_bound( s_krnlCache, s_krnlCache + s_krnlCacheCnt, addr, []( const KernelDriver& lhs, const uint64_t& rhs ) { return lhs.addr > rhs; } );
if( it != s_krnlCache + s_krnlCacheCnt )
{
return it->mod;
}
}
return "<kernel>";
}
#ifndef __CYGWIN__
for( auto& v : *s_modCache )