evgeny777 added inline comments.

================
Comment at: tools/lldb-mi/MICmnLLDBUtilSBValue.cpp:126
@@ -125,12 +125,3 @@
     {
-        if (m_bHandleCharType && IsCharType())
-        {
-            vwrValue = GetSimpleValueChar();
-            return MIstatus::success;
-        }
-        else
-        {
-            const char *pValue = m_rValue.GetValue();
-            vwrValue = pValue != nullptr ? pValue : m_pUnkwn;
-            return MIstatus::success;
-        }
+        vwrValue = GetValueSummary(!m_bHandleCharType && IsCharType(), 
m_pUnkwn);
+        return MIstatus::success;
----------------
abidh wrote:
> As the condition is changed, can you explain a little bit in which scenario, 
> you want to pass true/false here for first parameter.
This is "get summary whenever possible, unless explicitly told otherwise". 
For example this change of condition allows getting summary for function 
pointers (currently only hexadecimal pointer value is printed).

So false is only passed when character type is evaluated and m_bHandleCharType 
is false. I do not fully understand why this boolean flag exists - may be 
performance reasons?

================
Comment at: tools/lldb-mi/MICmnLLDBUtilSBValue.cpp:131
@@ -139,12 +130,3 @@
     {
-        if (m_bHandleCharType && IsPointeeCharType())
-        {
-            vwrValue = GetSimpleValueCStringPointer();
-            return MIstatus::success;
-        }
-        else
-        {
-            const char *pValue = m_rValue.GetValue();
-            vwrValue = pValue != nullptr ? pValue : m_pUnkwn;
-            return MIstatus::success;
-        }
+        vwrValue = GetValueSummary(!m_bHandleCharType && IsPointeeCharType(), 
m_pUnkwn);
+        return MIstatus::success;
----------------
abidh wrote:
> Same as above.
In case one day someone create summary provider for some pointer type which is 
not char*, wchar_t* and related, it will be handled by MI correctly. The only 
exception is if we have char pointer and explicitly told not to handle char 
type 



http://reviews.llvm.org/D13799



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to