added getDumpType ( returns dump's type )

This commit is contained in:
ussrhero 2020-05-28 00:03:38 +03:00
parent cf27e9072d
commit 8167656e04
3 changed files with 20 additions and 1 deletions

View File

@ -147,6 +147,13 @@ void setOutputMask(const kdlib::OutputFlagsSet& outputMask)
kdlib::setOutputFlags(outputMask);
}
inline
kdlib::DumpType getDumpType()
{
AutoRestorePyState pystate;
return kdlib::getDumpType();
}
///////////////////////////////////////////////////////////////////////////////
// processes end threads

View File

@ -2,7 +2,7 @@
#define PYKD_VERSION_MAJOR 0
#define PYKD_VERSION_MINOR 3
#define PYKD_VERSION_SUBVERSION 4
#define PYKD_VERSION_BUILDNO 13
#define PYKD_VERSION_BUILDNO 14
#define __VER_STR2__(x) #x
#define __VER_STR1__(x) __VER_STR2__(x)

View File

@ -202,6 +202,8 @@ void pykd_init()
"Get output mask");
python::def("setOutputMask", pykd::setOutputMask,
"Set output mask");
python::def("getDumpType", pykd::getDumpType,
"Return type of dump");
python::def( "breakin", pykd::targetBreak,
"Break into debugger" );
@ -1532,6 +1534,16 @@ void pykd_init()
.value("All", kdlib::All)
;
python::enum_<kdlib::DumpType>("dumpType", "Dump type")
.value("Small", kdlib::Small)
.value("Default", kdlib::Default)
.value("Full", kdlib::Full)
.value("Image", kdlib::Image)
.value("KernelSmall", kdlib::KernelSmall)
.value("Kernel", kdlib::Kernel)
.value("KernelFull", kdlib::KernelFull)
;
// C++ exception translation to python
pykd::registerExceptions();
}