Fix some classes and bytes values representation
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Mon, 10 Jul 2017 20:28:14 +0000 (23:28 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Mon, 13 Nov 2017 19:22:40 +0000 (22:22 +0300)
src/debug/debugger/valueprint.cpp

index 5009e660aabfddf7ffb4e1797a6bdf9a07a465f3..8052b74d41633b9277c3e518e255c4aac54ae7c9 100644 (file)
@@ -182,16 +182,12 @@ HRESULT PrintValue(ICorDebugValue *pInputValue, ICorDebugILFrame * pILFrame, std
 
     case ELEMENT_TYPE_VALUETYPE:
     case ELEMENT_TYPE_CLASS:
-        CORDB_ADDRESS addr;
-        if(SUCCEEDED(pValue->GetAddress(&addr)))
         {
-            ss << " @ 0x" << std::hex << addr;
+            std::string typeName;
+            TypePrinter::GetTypeOfValue(pValue, typeName);
+            ss << '{' << typeName << '}';
+            //ProcessFields(pValue, NULL, pILFrame, indent + 1, varToExpand, currentExpansion, currentExpansionSize, currentFrame);
         }
-        else
-        {
-            ss << "<failed to get address>";
-        }
-        //ProcessFields(pValue, NULL, pILFrame, indent + 1, varToExpand, currentExpansion, currentExpansionSize, currentFrame);
         break;
 
     case ELEMENT_TYPE_BOOLEAN:
@@ -210,11 +206,11 @@ HRESULT PrintValue(ICorDebugValue *pInputValue, ICorDebugILFrame * pILFrame, std
         break;
 
     case ELEMENT_TYPE_I1:
-        ss << *(char*) &(rgbValue[0]);
+        ss << (int) *(char*) &(rgbValue[0]);
         break;
 
     case ELEMENT_TYPE_U1:
-        ss << *(unsigned char*) &(rgbValue[0]);
+        ss << (unsigned int) *(unsigned char*) &(rgbValue[0]);
         break;
 
     case ELEMENT_TYPE_I2: