diff options
author | Greg Clayton <gclayton@apple.com> | 2012-10-30 18:18:43 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-10-30 18:18:43 +0000 |
commit | 0665a0f09e6597937766c32e606346baf055a495 (patch) | |
tree | 5a66d2a020dfaab582cb9ced2080a31eb01014c4 /lldb/source/Expression/IRInterpreter.cpp | |
parent | b3e8e688da4e71a77399f21318f89e4010094324 (diff) | |
download | bcm5719-llvm-0665a0f09e6597937766c32e606346baf055a495.tar.gz bcm5719-llvm-0665a0f09e6597937766c32e606346baf055a495.zip |
Path from Ashok Thirumurthi:
The attached patch adds eValueTypeVector to lldb_private::Value. The nested struct Vector is patterned after RegisterValue::m_data.buffer. This change to Value allows ClangExpressionDeclMap::LookupDecl to return vector register data for consumption by InterpreterStackFrame::ResolveValue. Note that ResolveValue was tweaked slightly to allocate enough memory for vector registers.
An immediate result of this patch is that "expr $xmm0" generates the same results on Linux as on the Mac, which is good enough for TestRegisters.py. In addition, the log of m_memory.PrintData(data_region.m_base, data_region.m_extent) shows that the register content has been resolved successfully. On the other hand, the output is glaringly empty:
runCmd: expr $xmm0
output: (unsigned char __attribute__((ext_vector_type(16)))) $0 = {}
Expecting sub string: vector_type
Matched
llvm-svn: 167033
Diffstat (limited to 'lldb/source/Expression/IRInterpreter.cpp')
-rw-r--r-- | lldb/source/Expression/IRInterpreter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 421b4f9921a..4211c876bc6 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -676,7 +676,11 @@ public: if (bare_register) indirect_variable = false; - Memory::Region data_region = m_memory.Malloc(value->getType()); + lldb_private::RegisterInfo *reg_info = resolved_value.GetRegisterInfo(); + Memory::Region data_region = (reg_info->encoding == lldb::eEncodingVector) ? + m_memory.Malloc(reg_info->byte_size, m_target_data.getPrefTypeAlignment(value->getType())) : + m_memory.Malloc(value->getType()); + data_region.m_allocation->m_origin = resolved_value; Memory::Region ref_region = m_memory.Malloc(value->getType()); Memory::Region pointer_region; |