diff options
author | Jim Ingham <jingham@apple.com> | 2011-05-04 03:43:18 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-05-04 03:43:18 +0000 |
commit | 2837b766f594f6aa0ec17c96bc8d257e2569d65e (patch) | |
tree | 3333316451bc06a2e495379451073b94abe38f9e /lldb/source/Core/ValueObjectDynamicValue.cpp | |
parent | 3d57441e56104b2bd93d85b4d19af1f5f40dbf82 (diff) | |
download | bcm5719-llvm-2837b766f594f6aa0ec17c96bc8d257e2569d65e.tar.gz bcm5719-llvm-2837b766f594f6aa0ec17c96bc8d257e2569d65e.zip |
Change "frame var" over to using OptionGroups (and thus the OptionGroupVariableObjectDisplay).
Change the boolean "use_dynamic" over to a tri-state, no-dynamic, dynamic-w/o running target,
and dynamic with running target.
llvm-svn: 130832
Diffstat (limited to 'lldb/source/Core/ValueObjectDynamicValue.cpp')
-rw-r--r-- | lldb/source/Core/ValueObjectDynamicValue.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp index b43c6519baf..ee50d45433f 100644 --- a/lldb/source/Core/ValueObjectDynamicValue.cpp +++ b/lldb/source/Core/ValueObjectDynamicValue.cpp @@ -34,10 +34,11 @@ using namespace lldb_private; -ValueObjectDynamicValue::ValueObjectDynamicValue (ValueObject &parent) : +ValueObjectDynamicValue::ValueObjectDynamicValue (ValueObject &parent, lldb::DynamicValueType use_dynamic) : ValueObject(parent), m_address (), - m_type_sp() + m_type_sp(), + m_use_dynamic (use_dynamic) { SetName (parent.GetName().AsCString()); } @@ -122,6 +123,14 @@ ValueObjectDynamicValue::UpdateValue () return false; } + // Setting our type_sp to NULL will route everything back through our + // parent which is equivalent to not using dynamic values. + if (m_use_dynamic == lldb::eNoDynamicValues) + { + m_type_sp.reset(); + return true; + } + ExecutionContext exe_ctx (GetExecutionContextScope()); if (exe_ctx.target) @@ -144,19 +153,19 @@ ValueObjectDynamicValue::UpdateValue () { LanguageRuntime *runtime = process->GetLanguageRuntime (known_type); if (runtime) - found_dynamic_type = runtime->GetDynamicTypeAndAddress (*m_parent, class_type_or_name, dynamic_address); + found_dynamic_type = runtime->GetDynamicTypeAndAddress (*m_parent, m_use_dynamic, class_type_or_name, dynamic_address); } else { LanguageRuntime *cpp_runtime = process->GetLanguageRuntime (lldb::eLanguageTypeC_plus_plus); if (cpp_runtime) - found_dynamic_type = cpp_runtime->GetDynamicTypeAndAddress (*m_parent, class_type_or_name, dynamic_address); + found_dynamic_type = cpp_runtime->GetDynamicTypeAndAddress (*m_parent, m_use_dynamic, class_type_or_name, dynamic_address); if (!found_dynamic_type) { LanguageRuntime *objc_runtime = process->GetLanguageRuntime (lldb::eLanguageTypeObjC); if (objc_runtime) - found_dynamic_type = cpp_runtime->GetDynamicTypeAndAddress (*m_parent, class_type_or_name, dynamic_address); + found_dynamic_type = cpp_runtime->GetDynamicTypeAndAddress (*m_parent, m_use_dynamic, class_type_or_name, dynamic_address); } } |