[0.3.x] added : CallException class

git-svn-id: https://pykd.svn.codeplex.com/svn@91127 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\ussrhero_cp 2017-01-23 21:56:01 +00:00 committed by Mikhail I. Izmestev
parent a8b33ddb2e
commit d97b2f08a3
4 changed files with 6 additions and 4 deletions

View File

@ -119,6 +119,8 @@ inline void registerExceptions()
pykd::exception<kdlib::MemoryException,kdlib::DbgException>( "MemoryException", "Target memory access exception class" );
pykd::exception<kdlib::SymbolException,kdlib::DbgException>( "SymbolException", "Symbol exception" );
pykd::exception<kdlib::TypeException,kdlib::SymbolException>( "TypeException", "type exception" );
pykd::exception<kdlib::CallException,kdlib::DbgException>( "CallException", "Function call exception");
pykd::exception<kdlib::CPUException,kdlib::DbgException>( "CPUException", "CPU exception");
python::register_exception_translator<kdlib::DbgException>( &dbgExceptionTranslate );
python::register_exception_translator<OverflowException>( &pykdExceptionTranslate );

View File

@ -2,7 +2,7 @@
#define PYKD_VERSION_MAJOR 0
#define PYKD_VERSION_MINOR 3
#define PYKD_VERSION_SUBVERSION 1
#define PYKD_VERSION_BUILDNO 9
#define PYKD_VERSION_BUILDNO 10
#define __VER_STR2__(x) #x
#define __VER_STR1__(x) __VER_STR2__(x)

View File

@ -27,11 +27,11 @@ param = pykd.stackAlloc(100)
pykd.writeCStr(param, "hello")
# call ctor for initalizing. std::string has some form of constructor so we need note prototype
# call ctor for initalizing. std::string has several forms of constructor so we need to note prototype
ctor = stringVar.method( stringClassName, "Void(__thiscall)(Char*)" )
ctor(param)
#check result:
print( pykd.loadCStr( stringVar.c_str() ) )
print( pykd.loadCStr( stringVar.c_str() ) )
pykd.stackFree(100)

View File

@ -86,7 +86,7 @@ class ModuleTest( unittest.TestCase ):
fileName = pykd.getSourceFile(target.module.CdeclFunc )
self.assertTrue( re.search('testfunc\\.cpp', fileName ) )
fileName, lineNo, displacement = pykd.getSourceLine( target.module.CdeclFunc + 2)
self.assertEqual( 27, lineNo )
self.assertEqual( 30, lineNo )
self.assertTrue( re.search('testfunc\\.cpp', fileName ) )
self.assertEqual( 2, displacement )
#fileName, lineNo, displacement = pykd.getSourceLine()