diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /source/Core/Value.cpp | |
parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) |
Notes
Diffstat (limited to 'source/Core/Value.cpp')
-rw-r--r-- | source/Core/Value.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/Core/Value.cpp b/source/Core/Value.cpp index a5c48e823ace..eb250eb77e46 100644 --- a/source/Core/Value.cpp +++ b/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; |