diff --git a/pykd/dbgmem.cpp b/pykd/dbgmem.cpp index e05ad05..0bb911b 100644 --- a/pykd/dbgmem.cpp +++ b/pykd/dbgmem.cpp @@ -209,6 +209,22 @@ loadSignMWord( ULONG64 address ) /////////////////////////////////////////////////////////////////////////////////// +template<> +boost::python::object +loadByPtr( ULONG64 address ) +{ + char value; + + if ( loadMemory( address, &value, sizeof(char) ) ) + { + return boost::python::object( (int)value ); + } + + return boost::python::object(); +} + +/////////////////////////////////////////////////////////////////////////////////// + boost::python::object loadUnicodeStr( ULONG64 address ) { diff --git a/pykd/dbgmem.h b/pykd/dbgmem.h index 0d617ce..268d84f 100644 --- a/pykd/dbgmem.h +++ b/pykd/dbgmem.h @@ -42,6 +42,7 @@ loadArray( ULONG64 address, ULONG number, BOOLEAN phyAddr = FALSE ) return boost::python::object(); } + template boost::python::object loadByPtr( ULONG64 address ) @@ -56,6 +57,10 @@ loadByPtr( ULONG64 address ) return boost::python::object(); } +template<> +boost::python::object +loadByPtr( ULONG64 address ); + boost::python::object loadPtrArray( ULONG64 address, ULONG number );