summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core')
-rw-r--r--lldb/source/Core/ValueObject.cpp19
-rw-r--r--lldb/source/Core/ValueObjectDynamicValue.cpp2
2 files changed, 12 insertions, 9 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index b742d0b0da1..c9310753d96 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -93,7 +93,7 @@ ValueObject::ValueObject (ValueObject &parent) :
m_is_bitfield_for_scalar(false),
m_is_expression_path_child(false),
m_is_child_at_offset(false),
- m_is_expression_result(false),
+ m_is_expression_result(parent.m_is_expression_result),
m_dump_printable_counter(0)
{
m_manager->ManageObject(this);
@@ -240,7 +240,7 @@ ValueObject::UpdateFormatsIfNeeded(lldb::DynamicValueType use_dynamic)
m_synthetic_value = NULL;
- Debugger::Formatting::ValueFormats::Get(*this, use_dynamic, m_last_value_format);
+ Debugger::Formatting::ValueFormats::Get(*this, lldb::eNoDynamicValues, m_last_value_format);
Debugger::Formatting::GetSummaryFormat(*this, use_dynamic, m_last_summary_format);
Debugger::Formatting::GetSyntheticFilter(*this, use_dynamic, m_last_synthetic_filter);
@@ -2599,23 +2599,26 @@ ValueObject::DumpValueObject
// Always show the type for the top level items.
if (show_types || (curr_depth == 0 && !flat_output))
{
- s.Printf("(%s", valobj->GetTypeName().AsCString("<invalid type>"));
- if (use_dynamic != lldb::eNoDynamicValues &&
- strcmp(valobj->GetTypeName().AsCString("NULL"), "id") == 0)
+ const char* typeName = valobj->GetTypeName().AsCString("<invalid type>");
+ s.Printf("(%s", typeName);
+ // only show dynamic types if the user really wants to see types
+ if (show_types && use_dynamic != lldb::eNoDynamicValues &&
+ (/*strstr(typeName, "id") == typeName ||*/
+ ClangASTType::GetMinimumLanguage(valobj->GetClangAST(), valobj->GetClangType()) == lldb::eLanguageTypeObjC))
{
Process* process = valobj->GetUpdatePoint().GetProcessSP().get();
if (process == NULL)
- s.Printf(") ");
+ s.Printf(", dynamic type: unknown) ");
else
{
ObjCLanguageRuntime *runtime = process->GetObjCLanguageRuntime();
if (runtime == NULL)
- s.Printf(") ");
+ s.Printf(", dynamic type: unknown) ");
else
{
ObjCLanguageRuntime::ObjCISA isa = runtime->GetISA(*valobj);
if (!runtime->IsValidISA(isa))
- s.Printf(") ");
+ s.Printf(", dynamic type: unknown) ");
else
s.Printf(", dynamic type: %s) ",
runtime->GetActualTypeName(isa).GetCString());
diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp
index f48bebd7d7e..3dd360d9876 100644
--- a/lldb/source/Core/ValueObjectDynamicValue.cpp
+++ b/lldb/source/Core/ValueObjectDynamicValue.cpp
@@ -160,7 +160,7 @@ ValueObjectDynamicValue::UpdateValue ()
{
LanguageRuntime *objc_runtime = process->GetLanguageRuntime (lldb::eLanguageTypeObjC);
if (objc_runtime)
- found_dynamic_type = cpp_runtime->GetDynamicTypeAndAddress (*m_parent, m_use_dynamic, class_type_or_name, dynamic_address);
+ found_dynamic_type = objc_runtime->GetDynamicTypeAndAddress (*m_parent, m_use_dynamic, class_type_or_name, dynamic_address);
}
}
OpenPOWER on IntegriCloud