Author: Adrian Prantl Date: 2019-11-05T12:36:14-08:00 New Revision: de5417f81d4e0ca732810e3b5565253b73b9e339
URL: https://github.com/llvm/llvm-project/commit/de5417f81d4e0ca732810e3b5565253b73b9e339 DIFF: https://github.com/llvm/llvm-project/commit/de5417f81d4e0ca732810e3b5565253b73b9e339.diff LOG: [ValueObject] Upstream initialization from swift-lldb. This is a non-Swift-specific change in swift-lldb that seems to be useful for remote debugging. If does in fact turn out to be redundant we can remove it from llvm.org and then it will disappear in swift-lldb, too. Added: Modified: lldb/source/Core/ValueObject.cpp Removed: ################################################################################ diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 7b4034c06400..ecb5a41ea8a0 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -100,6 +100,8 @@ ValueObject::ValueObject(ValueObject &parent) m_did_calculate_complete_objc_class_type(false), m_is_synthetic_children_generated( parent.m_is_synthetic_children_generated) { + m_data.SetByteOrder(parent.GetDataExtractor().GetByteOrder()); + m_data.SetAddressByteSize(parent.GetDataExtractor().GetAddressByteSize()); m_manager->ManageObject(this); } @@ -126,6 +128,14 @@ ValueObject::ValueObject(ExecutionContextScope *exe_scope, m_is_getting_summary(false), m_did_calculate_complete_objc_class_type(false), m_is_synthetic_children_generated(false) { + if (exe_scope) { + TargetSP target_sp(exe_scope->CalculateTarget()); + if (target_sp) { + const ArchSpec &arch = target_sp->GetArchitecture(); + m_data.SetByteOrder(arch.GetByteOrder()); + m_data.SetAddressByteSize(arch.GetAddressByteSize()); + } + } m_manager = new ValueObjectManager(); m_manager->ManageObject(this); } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits