From 122ec5deeafc9ba5a1ea44e41467cd00f94af29c Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Tue, 25 Jan 2011 15:32:01 +0000 Subject: [PATCH] [!] fixed : issue #8239 ( ptrSignByte returns str value ) git-svn-id: https://pykd.svn.codeplex.com/svn@60688 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/dbgmem.cpp | 16 ++++++++++++++++ pykd/dbgmem.h | 5 +++++ 2 files changed, 21 insertions(+) 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 );