[Lldb-commits] [lldb] r182330 - <rdar://problem/13925626>
Enrico Granata
egranata at apple.com
Mon May 20 15:58:36 PDT 2013
Author: enrico
Date: Mon May 20 17:58:35 2013
New Revision: 182330
URL: http://llvm.org/viewvc/llvm-project?rev=182330&view=rev
Log:
<rdar://problem/13925626>
Correctly handle the case of a ValueObjectVariable backed by a Vector
Modified:
lldb/trunk/source/Core/Value.cpp
lldb/trunk/source/Core/ValueObjectVariable.cpp
Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=182330&r1=182329&r2=182330&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Mon May 20 17:58:35 2013
@@ -342,6 +342,18 @@ Value::GetValueAsData (ExecutionContext
default:
error.SetErrorStringWithFormat("invalid value type %i", m_value_type);
break;
+
+ case eValueTypeVector:
+ if (m_context_type == eContextTypeClangType && ast_context)
+ {
+ ClangASTType ptr_type (ast_context, ClangASTContext::GetVoidPtrType(ast_context, false));
+ uint64_t ptr_byte_size = ptr_type.GetClangTypeByteSize();
+ data.SetAddressByteSize (ptr_byte_size);
+ }
+ else
+ data.SetAddressByteSize(sizeof(void *));
+ data.SetData(m_vector.bytes, m_vector.length, m_vector.byte_order);
+ break;
case eValueTypeScalar:
data.SetByteOrder (lldb::endian::InlHostByteOrder());
Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=182330&r1=182329&r2=182330&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectVariable.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectVariable.cpp Mon May 20 17:58:35 2013
@@ -189,7 +189,9 @@ ValueObjectVariable::UpdateValue ()
default:
m_error.SetErrorStringWithFormat("Variable %s has an expression result value %d which is currently unhandled",variable->GetName().GetCString(),value_type);
break;
-
+
+ case Value::eValueTypeVector:
+ // fall through
case Value::eValueTypeScalar:
// The variable value is in the Scalar value inside the m_value.
// We can point our m_data right to it.
More information about the lldb-commits
mailing list