mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 19:53:22 +08:00
[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:
parent
cb23933f77
commit
1c20123492
@ -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
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -166,6 +166,8 @@ public:
|
||||
|
||||
ULONG getVirtualBaseDispSize();
|
||||
|
||||
ULONG getSection();
|
||||
|
||||
public:
|
||||
typedef std::pair<ULONG, const char *> ValueNameEntry;
|
||||
|
||||
|
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user