summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObject.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-02-12 00:34:25 +0000
committerGreg Clayton <gclayton@apple.com>2015-02-12 00:34:25 +0000
commit526ae040bab73b5c9ae273d499a1ab8cb5fb0381 (patch)
tree6230dad5200ab6945fe18d81874c463dcfd0bd1c /lldb/source/Core/ValueObject.cpp
parent36f807c8603b170ad71e0f15ec0279aa1c40384c (diff)
downloadbcm5719-llvm-526ae040bab73b5c9ae273d499a1ab8cb5fb0381.tar.gz
bcm5719-llvm-526ae040bab73b5c9ae273d499a1ab8cb5fb0381.zip
Make a more complete fix for always supplying an execution context when getting byte sizes from types.
There was a test in the test suite that was triggering the backtrace logging output that requested that the client pass an execution context. Sometimes we need the process for Objective C types because our static notion of the type might not align with the reality when being run in a live runtime. Switched from an "ExecutionContext *" to an "ExecutionContextScope *" for greater ease of use. llvm-svn: 228892
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r--lldb/source/Core/ValueObject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index ebbcb8ec408..231f4972c27 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -973,7 +973,7 @@ ValueObject::GetPointeeData (DataExtractor& data,
ExecutionContext exe_ctx (GetExecutionContextRef());
- const uint64_t item_type_size = pointee_or_element_clang_type.GetByteSize(&exe_ctx);
+ const uint64_t item_type_size = pointee_or_element_clang_type.GetByteSize(exe_ctx.GetBestExecutionContextScope());
const uint64_t bytes = item_count * item_type_size;
const uint64_t offset = item_idx * item_type_size;
@@ -1049,7 +1049,7 @@ ValueObject::GetPointeeData (DataExtractor& data,
break;
case eAddressTypeHost:
{
- const uint64_t max_bytes = GetClangType().GetByteSize(&exe_ctx);
+ const uint64_t max_bytes = GetClangType().GetByteSize(exe_ctx.GetBestExecutionContextScope());
if (max_bytes > offset)
{
size_t bytes_read = std::min<uint64_t>(max_bytes - offset, bytes);
@@ -2244,7 +2244,7 @@ ValueObject::GetSyntheticChildAtOffset(uint32_t offset, const ClangASTType& type
ValueObjectChild *synthetic_child = new ValueObjectChild(*this,
type,
name_const_str,
- type.GetByteSize(&exe_ctx),
+ type.GetByteSize(exe_ctx.GetBestExecutionContextScope()),
offset,
0,
0,
@@ -2287,7 +2287,7 @@ ValueObject::GetSyntheticBase (uint32_t offset, const ClangASTType& type, bool c
ValueObjectChild *synthetic_child = new ValueObjectChild(*this,
type,
name_const_str,
- type.GetByteSize(&exe_ctx),
+ type.GetByteSize(exe_ctx.GetBestExecutionContextScope()),
offset,
0,
0,
OpenPOWER on IntegriCloud