[0.1.x] + DiaSymbol.section method

git-svn-id: https://pykd.svn.codeplex.com/svn@78038 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2012-07-13 09:23:13 +00:00 committed by Mikhail I. Izmestev
parent cb23933f77
commit 1c20123492
4 changed files with 15 additions and 0 deletions

View File

@ -241,6 +241,10 @@ std::string Symbol::printImpl(
if (S_OK == hres)
sstream << ", Length: 0x" << std::hex << ullValue;
hres = _symbol->get_targetSection(&dwValue);
if (S_OK == hres)
sstream << ", Section: " << std::dec << ullValue;
bValue = false;
try
{

View File

@ -195,6 +195,13 @@ ULONG Symbol::getVirtualBaseDispSize()
////////////////////////////////////////////////////////////////////////////////
ULONG Symbol::getSection()
{
return callSymbol(get_targetSection);
}
////////////////////////////////////////////////////////////////////////////////
void Symbol::getValueImpl(IDiaSymbol *_symbol, VARIANT &vtValue)
{
HRESULT hres = _symbol->get_value(&vtValue);

View File

@ -166,6 +166,8 @@ public:
ULONG getVirtualBaseDispSize();
ULONG getSection();
public:
typedef std::pair<ULONG, const char *> ValueNameEntry;

View File

@ -782,6 +782,8 @@ BOOST_PYTHON_MODULE( pykd )
"CV_REG_XXX (for IMAGE_FILE_MACHINE_I386) or CV_AMD64_XXX (for IMAGE_FILE_MACHINE_AMD64)")
.def("machineType", &pyDia::Symbol::getMachineType,
"Retrieves the type of the target CPU: IMAGE_FILE_MACHINE_XXX")
.def("section", &pyDia::Symbol::getSection,
"Retrieves the address section of a thunk target")
.def( "__str__", &pyDia::Symbol::print)
.def("__getitem__", &pyDia::Symbol::getChildByName)
.def("__len__", &pyDia::Symbol::getChildCount )