From e9923606b382683249fc2bb3af96ea2f509ec9c0 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Fri, 27 Sep 2013 08:13:19 +0000 Subject: [PATCH] [0.2.x] fixed : findSymbol return empty string git-svn-id: https://pykd.svn.codeplex.com/svn@85394 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/module.cpp | 12 ++++++++++-- pykd/pykdver.h | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pykd/module.cpp b/pykd/module.cpp index 69fe906..c984496 100644 --- a/pykd/module.cpp +++ b/pykd/module.cpp @@ -337,9 +337,17 @@ void Module::getSymbolAndDispByVa( ULONG64 offset, std::string &symbolName, LONG { offset = prepareVa(offset); - SymbolPtr sym = getSymSession()->findByRva( (ULONG)(offset - m_base ), SymTagNull, &displacement ); + symbolName.clear(); - symbolName = sym->getName(); + while ( symbolName.empty() ) + { + SymbolPtr sym = getSymSession()->findByRva( (ULONG)(offset - m_base ), SymTagNull, &displacement ); + symbolName = sym->getName(); + if ( !symbolName.empty() ) + break; + + offset = offset - displacement - 1; + } } /////////////////////////////////////////////////////////////////////////////////// diff --git a/pykd/pykdver.h b/pykd/pykdver.h index 44b84b5..9d1240e 100644 --- a/pykd/pykdver.h +++ b/pykd/pykdver.h @@ -2,7 +2,7 @@ #define PYKD_VERSION_MAJOR 0 #define PYKD_VERSION_MINOR 2 #define PYKD_VERSION_SUBVERSION 0 -#define PYKD_VERSION_BUILDNO 22 +#define PYKD_VERSION_BUILDNO 24 #define __VER_STR2__(x) #x