From ff0d434b295447ebe244d6b7e30828e7a30f83fe Mon Sep 17 00:00:00 2001 From: "SND\\EreTIk_cp" Date: Tue, 12 Jan 2016 15:25:35 +0000 Subject: [PATCH] [0.3.x] fix: workitem 13815, printing type of variadic function git-svn-id: https://pykd.svn.codeplex.com/svn@90906 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/pymod.cpp | 10 ++++++---- pykd/pytypeinfo.h | 8 +++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pykd/pymod.cpp b/pykd/pymod.cpp index 7285ca0..664c84d 100644 --- a/pykd/pymod.cpp +++ b/pykd/pymod.cpp @@ -755,7 +755,9 @@ BOOST_PYTHON_MODULE( pykd ) "Return flag: type is function" ) .def( "isConstant", TypeInfoAdapter::isConstant, "Return flag: type is constant" ) - .def("isVtbl", TypeInfoAdapter::isVtbl, + .def( "isVtbl", TypeInfoAdapter::isVtbl, + "Return true if no type is specified" ) + .def( "isNoType", TypeInfoAdapter::isNoType, "Return true if type is virtual table" ) .def( "getCallingConvention", TypeInfoAdapter::getCallingConvention, "Returns an indicator of a methods calling convention: callingConvention" ) @@ -764,9 +766,9 @@ BOOST_PYTHON_MODULE( pykd ) .def( "__str__", TypeInfoAdapter::str, "Return type as a printable string" ) .def( "__getattr__", TypeInfoAdapter::getElementByName ) - .def("__len__", TypeInfoAdapter::getElementCount ) - .def("__getitem__", TypeInfoAdapter::getElementByIndex ) - .def("__dir__", TypeInfoAdapter::getElementDir) + .def( "__len__", TypeInfoAdapter::getElementCount ) + .def( "__getitem__", TypeInfoAdapter::getElementByIndex ) + .def( "__dir__", TypeInfoAdapter::getElementDir ) ; python::class_, boost::noncopyable >("typedVar", diff --git a/pykd/pytypeinfo.h b/pykd/pytypeinfo.h index 9786671..d8fc91b 100644 --- a/pykd/pytypeinfo.h +++ b/pykd/pytypeinfo.h @@ -193,7 +193,13 @@ struct TypeInfoAdapter : public kdlib::TypeInfo { AutoRestorePyState pystate; return typeInfo.isVtbl(); } - + + static bool isNoType(kdlib::TypeInfo &typeInfo) + { + AutoRestorePyState pystate; + return typeInfo.isNoType(); + } + static void appendField( kdlib::TypeInfo &typeInfo, const std::wstring &fieldName, kdlib::TypeInfoPtr &fieldType ) { AutoRestorePyState pystate;