summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObject.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-01-23 01:17:27 +0000
committerEnrico Granata <egranata@apple.com>2013-01-23 01:17:27 +0000
commitf7b1a34e47cee07082261a549ea574f57bcece46 (patch)
treef46e09df4028f147c39c676f5d646b3c97272bd4 /lldb/source/Core/ValueObject.cpp
parent582b2ab0dd9a81d4f91ff096320c2b46750f4b3a (diff)
downloadbcm5719-llvm-f7b1a34e47cee07082261a549ea574f57bcece46.tar.gz
bcm5719-llvm-f7b1a34e47cee07082261a549ea574f57bcece46.zip
<rdar://problem/12711206>
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
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r--lldb/source/Core/ValueObject.cpp33
1 files changed, 1 insertions, 32 deletions
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("<invalid type>");
- //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 (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("<invalid type>"));
if (options.m_flat_output)
{
OpenPOWER on IntegriCloud