diff options
| author | Enrico Granata <egranata@apple.com> | 2016-03-10 00:14:29 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2016-03-10 00:14:29 +0000 |
| commit | 391075c38ec9e9a8da8b95fb9565e983eb456608 (patch) | |
| tree | 0a7b5e8e3e3956a43c92cceacdd671b7a1d8a771 /lldb/source/Core/Value.cpp | |
| parent | 7e8c7bea796a72e9cf8cd05d39a5df9e84505a0c (diff) | |
| download | bcm5719-llvm-391075c38ec9e9a8da8b95fb9565e983eb456608.tar.gz bcm5719-llvm-391075c38ec9e9a8da8b95fb9565e983eb456608.zip | |
Certain hardware architectures have registers of 256 bits in size
This patch extends Scalar such that it can support data living in such registers (e.g. float values living in the XMM registers)
llvm-svn: 263079
Diffstat (limited to 'lldb/source/Core/Value.cpp')
| -rw-r--r-- | lldb/source/Core/Value.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp index a5c48e823ac..eb250eb77e4 100644 --- a/lldb/source/Core/Value.cpp +++ b/lldb/source/Core/Value.cpp @@ -428,17 +428,16 @@ Value::GetValueAsData (ExecutionContext *exe_ctx, uint32_t limit_byte_size = UINT32_MAX; - if (ast_type.IsValid() && ast_type.IsScalarType()) + if (ast_type.IsValid()) { - uint64_t type_encoding_count = 0; - lldb::Encoding type_encoding = ast_type.GetEncoding(type_encoding_count); - - if (type_encoding == eEncodingUint || type_encoding == eEncodingSint) - limit_byte_size = ast_type.GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr); + limit_byte_size = ast_type.GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr); } - if (m_value.GetData (data, limit_byte_size)) - return error; // Success; + if (limit_byte_size <= m_value.GetByteSize()) + { + if (m_value.GetData (data, limit_byte_size)) + return error; // Success; + } error.SetErrorStringWithFormat("extracting data from value failed"); break; |

