mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13: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)
|
if (S_OK == hres)
|
||||||
sstream << ", Length: 0x" << std::hex << ullValue;
|
sstream << ", Length: 0x" << std::hex << ullValue;
|
||||||
|
|
||||||
|
hres = _symbol->get_targetSection(&dwValue);
|
||||||
|
if (S_OK == hres)
|
||||||
|
sstream << ", Section: " << std::dec << ullValue;
|
||||||
|
|
||||||
bValue = false;
|
bValue = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -195,6 +195,13 @@ ULONG Symbol::getVirtualBaseDispSize()
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
ULONG Symbol::getSection()
|
||||||
|
{
|
||||||
|
return callSymbol(get_targetSection);
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Symbol::getValueImpl(IDiaSymbol *_symbol, VARIANT &vtValue)
|
void Symbol::getValueImpl(IDiaSymbol *_symbol, VARIANT &vtValue)
|
||||||
{
|
{
|
||||||
HRESULT hres = _symbol->get_value(&vtValue);
|
HRESULT hres = _symbol->get_value(&vtValue);
|
||||||
|
@ -166,6 +166,8 @@ public:
|
|||||||
|
|
||||||
ULONG getVirtualBaseDispSize();
|
ULONG getVirtualBaseDispSize();
|
||||||
|
|
||||||
|
ULONG getSection();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef std::pair<ULONG, const char *> ValueNameEntry;
|
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)")
|
"CV_REG_XXX (for IMAGE_FILE_MACHINE_I386) or CV_AMD64_XXX (for IMAGE_FILE_MACHINE_AMD64)")
|
||||||
.def("machineType", &pyDia::Symbol::getMachineType,
|
.def("machineType", &pyDia::Symbol::getMachineType,
|
||||||
"Retrieves the type of the target CPU: IMAGE_FILE_MACHINE_XXX")
|
"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( "__str__", &pyDia::Symbol::print)
|
||||||
.def("__getitem__", &pyDia::Symbol::getChildByName)
|
.def("__getitem__", &pyDia::Symbol::getChildByName)
|
||||||
.def("__len__", &pyDia::Symbol::getChildCount )
|
.def("__len__", &pyDia::Symbol::getChildCount )
|
||||||
|
Loading…
Reference in New Issue
Block a user