diff options
Diffstat (limited to 'source/Core/ValueObjectVariable.cpp')
| -rw-r--r-- | source/Core/ValueObjectVariable.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/source/Core/ValueObjectVariable.cpp b/source/Core/ValueObjectVariable.cpp index bfe5c3de7fbf..4d401c56249c 100644 --- a/source/Core/ValueObjectVariable.cpp +++ b/source/Core/ValueObjectVariable.cpp @@ -9,14 +9,12 @@ #include "lldb/Core/ValueObjectVariable.h" -#include "lldb/Core/Address.h" // for Address -#include "lldb/Core/AddressRange.h" // for AddressRange +#include "lldb/Core/Address.h" +#include "lldb/Core/AddressRange.h" #include "lldb/Core/Module.h" -#include "lldb/Core/RegisterValue.h" -#include "lldb/Core/Scalar.h" // for Scalar, operator!= #include "lldb/Core/Value.h" -#include "lldb/Expression/DWARFExpression.h" // for DWARFExpression -#include "lldb/Symbol/Declaration.h" // for Declaration +#include "lldb/Expression/DWARFExpression.h" +#include "lldb/Symbol/Declaration.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolContext.h" @@ -27,15 +25,17 @@ #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" -#include "lldb/Utility/DataExtractor.h" // for DataExtractor -#include "lldb/Utility/Status.h" // for Status -#include "lldb/lldb-private-enumerations.h" // for AddressType::eAddressTy... -#include "lldb/lldb-types.h" // for addr_t +#include "lldb/Utility/DataExtractor.h" +#include "lldb/Utility/RegisterValue.h" +#include "lldb/Utility/Scalar.h" +#include "lldb/Utility/Status.h" +#include "lldb/lldb-private-enumerations.h" +#include "lldb/lldb-types.h" -#include "llvm/ADT/StringRef.h" // for StringRef +#include "llvm/ADT/StringRef.h" -#include <assert.h> // for assert -#include <memory> // for shared_ptr +#include <assert.h> +#include <memory> namespace lldb_private { class ExecutionContextScope; @@ -98,8 +98,9 @@ size_t ValueObjectVariable::CalculateNumChildren(uint32_t max) { if (!type.IsValid()) return 0; + ExecutionContext exe_ctx(GetExecutionContextRef()); const bool omit_empty_base_classes = true; - auto child_count = type.GetNumChildren(omit_empty_base_classes); + auto child_count = type.GetNumChildren(omit_empty_base_classes, &exe_ctx); return child_count <= max ? child_count : max; } @@ -111,7 +112,7 @@ uint64_t ValueObjectVariable::GetByteSize() { if (!type.IsValid()) return 0; - return type.GetByteSize(exe_ctx.GetBestExecutionContextScope()); + return type.GetByteSize(exe_ctx.GetBestExecutionContextScope()).getValueOr(0); } lldb::ValueType ValueObjectVariable::GetValueType() const { |
