diff options
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBType.cpp | 8 | ||||
| -rw-r--r-- | lldb/source/API/SBValue.cpp | 25 |
2 files changed, 33 insertions, 0 deletions
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp index 5ca7ddf3d81..1e04841bfad 100644 --- a/lldb/source/API/SBType.cpp +++ b/lldb/source/API/SBType.cpp @@ -414,6 +414,14 @@ SBType::GetName() return m_opaque_sp->GetName().GetCString(); } +const char * +SBType::GetDisplayTypeName () +{ + if (!IsValid()) + return ""; + return m_opaque_sp->GetDisplayTypeName().GetCString(); +} + lldb::TypeClass SBType::GetTypeClass () { diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index f171d239913..3a9621b1e3b 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -378,6 +378,31 @@ SBValue::GetTypeName () return name; } +const char * +SBValue::GetDisplayTypeName () +{ + Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + const char *name = NULL; + ValueLocker locker; + lldb::ValueObjectSP value_sp(GetSP(locker)); + if (value_sp) + { + name = value_sp->GetDisplayTypeName().GetCString(); + } + + if (log) + { + if (name) + log->Printf ("SBValue(%p)::GetTypeName () => \"%s\"", + static_cast<void*>(value_sp.get()), name); + else + log->Printf ("SBValue(%p)::GetTypeName () => NULL", + static_cast<void*>(value_sp.get())); + } + + return name; +} + size_t SBValue::GetByteSize () { |

