From f7b1a34e47cee07082261a549ea574f57bcece46 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 23 Jan 2013 01:17:27 +0000 Subject: Extending ValueObjectDynamicValue so that it stores a TypeAndOrName instead of a TypeSP. This change allows us to reflect the notion that a ValueObject can have a dynamic type for which we have no debug information. Previously, we would coalesce that to the static type of the object, potentially losing relevant information or even getting it wrong. This fix ensures we can correctly report the class name for Cocoa objects whose types are hidden classes that we know nothing about (e.g. __NSArrayI for immutable arrays). As a side effect, our --show-types argument to frame variable no longer needs to append custom dynamic type information. llvm-svn: 173216 --- lldb/source/Core/ValueObject.cpp | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'lldb/source/Core/ValueObject.cpp') diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 449e49c0720..92d2c36415e 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -3336,38 +3336,7 @@ DumpValueObject_Impl (Stream &s, show_type = options.m_show_types || (curr_depth == 0 && !options.m_flat_output); if (show_type) - { - const char* typeName = valobj->GetQualifiedTypeName().AsCString(""); - //const char* typeName = valobj->GetTypeName().AsCString(""); - s.Printf("(%s", typeName); - // only show dynamic types if the user really wants to see types - if (options.m_show_types && options.m_use_dynamic != eNoDynamicValues && - (/*strstr(typeName, "id") == typeName ||*/ - ClangASTType::GetMinimumLanguage(valobj->GetClangAST(), valobj->GetClangType()) == eLanguageTypeObjC)) - { - ExecutionContext exe_ctx (valobj->GetExecutionContextRef()); - Process *process = exe_ctx.GetProcessPtr(); - if (process == NULL) - s.Printf(", dynamic type: unknown) "); - else - { - ObjCLanguageRuntime *runtime = process->GetObjCLanguageRuntime(); - if (runtime == NULL) - s.Printf(", dynamic type: unknown) "); - else - { - ObjCLanguageRuntime::ClassDescriptorSP objc_class_sp (runtime->GetNonKVOClassDescriptor(*valobj)); - if (objc_class_sp) - s.Printf(", dynamic type: %s) ", objc_class_sp->GetClassName().GetCString()); - else - s.Printf(", dynamic type: unknown) "); - } - } - } - else - s.Printf(") "); - } - + s.Printf("(%s) ", valobj->GetQualifiedTypeName().AsCString("")); if (options.m_flat_output) { -- cgit v1.2.3