From a3560b2b776a2c8b18ac4763e13c1861454692d4 Mon Sep 17 00:00:00 2001
From: "SND\\kernelnet_cp"
 <SND\kernelnet_cp@9b283d60-5439-405e-af05-b73fd8c4d996>
Date: Mon, 17 Jan 2011 07:46:20 +0000
Subject: [PATCH] [~] updated : __str__ method for typedVar class

git-svn-id: https://pykd.svn.codeplex.com/svn@60264 9b283d60-5439-405e-af05-b73fd8c4d996
---
 pykd/dbgtype.cpp | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/pykd/dbgtype.cpp b/pykd/dbgtype.cpp
index 6b2db4e..d00dc88 100644
--- a/pykd/dbgtype.cpp
+++ b/pykd/dbgtype.cpp
@@ -435,10 +435,10 @@ typedVarClass::print() const
            sstr << field->type.name();
         else       
         {
+            boost::python::object     attr = m_pyobj.attr( field->name.c_str() );
+        
             if ( field->size == field->type.size() )
             {
-                boost::python::object     attr = m_pyobj.attr( field->name.c_str() );
-            
                 if ( attr.ptr() == Py_None )
                 {
                     sstr << "memory error";
@@ -449,7 +449,16 @@ typedVarClass::print() const
                 
                     sstr << hex << "0x" << val << dec << " ( " << val << " )";
                 }                    
-            }             
+            }      
+            else
+            {
+                for ( size_t i = 0; i <  field->size/field->type.size(); ++i )
+                {
+                    unsigned __int64  val = boost::python::extract<unsigned __int64>( attr[i] );
+                
+                    sstr << "\n\t\t\t[" << i << "]  " << hex << "0x" << val << dec << " ( " << val << " )";
+                }
+            }       
         }
                
         sstr << std::endl;