2012-07-27 18:28:50 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
|
2012-08-07 00:14:56 +08:00
|
|
|
|
#include "dbgmem.h"
|
2012-08-07 19:15:23 +08:00
|
|
|
|
#include "variant.h"
|
2012-08-07 00:14:56 +08:00
|
|
|
|
|
2012-07-27 18:28:50 +08:00
|
|
|
|
namespace pykd {
|
|
|
|
|
|
|
|
|
|
// manage debug target
|
|
|
|
|
ULONG startProcess( const std::wstring &processName );
|
|
|
|
|
void detachProcess( ULONG processId = -1);
|
|
|
|
|
void terminateProcess( ULONG processId = -1);
|
|
|
|
|
|
|
|
|
|
void debugGo();
|
|
|
|
|
|
2012-07-31 23:53:49 +08:00
|
|
|
|
// system properties
|
|
|
|
|
ULONG ptrSize();
|
2012-08-07 19:15:23 +08:00
|
|
|
|
bool is64bitSystem();
|
2012-07-31 23:53:49 +08:00
|
|
|
|
|
2012-07-27 18:28:50 +08:00
|
|
|
|
//manage debug module
|
|
|
|
|
ULONG64 findModuleBase( const std::string &moduleName );
|
|
|
|
|
ULONG64 findModuleBase( ULONG64 offset );
|
2012-08-02 17:14:03 +08:00
|
|
|
|
ULONG64 findModuleBySymbol( const std::string &symbolName );
|
2012-07-27 18:28:50 +08:00
|
|
|
|
std::string getModuleName( ULONG64 baseOffset );
|
2012-08-01 00:47:26 +08:00
|
|
|
|
std::string getModuleImageName( ULONG64 baseOffset );
|
2012-07-31 21:40:05 +08:00
|
|
|
|
std::string getModuleSymbolFileName( ULONG64 baseOffset );
|
2012-08-01 00:47:26 +08:00
|
|
|
|
ULONG getModuleTimeStamp( ULONG64 baseOffset );
|
|
|
|
|
ULONG getModuleCheckSum( ULONG64 baseOffset );
|
2012-07-27 18:28:50 +08:00
|
|
|
|
|
2012-08-07 19:15:23 +08:00
|
|
|
|
// CPU registers
|
|
|
|
|
ULONG getRegIndexByName( const std::string ®Name );
|
|
|
|
|
std::string getRegNameByIndex( ULONG index );
|
|
|
|
|
BaseTypeVariant getRegVariantValue( ULONG index );
|
2012-08-07 19:43:38 +08:00
|
|
|
|
ULONG64 getRegInstructionPointer();
|
2012-08-07 19:15:23 +08:00
|
|
|
|
|
2012-08-07 00:14:56 +08:00
|
|
|
|
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!
|
2012-08-08 15:00:43 +08:00
|
|
|
|
//std::string getSymbolByOffset( ULONG64 offset );
|
2012-07-31 21:40:05 +08:00
|
|
|
|
|
2012-07-27 18:28:50 +08:00
|
|
|
|
};
|
|
|
|
|
|