Add a GetDisplayName() API to SBFrame, SBFunction and SBSymbol

This API is currently a no-op (in the sense that it has the same behavior as the already existing GetName()), but is meant long-term to provide a best-for-visualization version of the name of a function

It is still not hooked up to the command line 'bt' command, nor to the 'gui' mode, but I do have ideas on how to make that work going forward

rdar://21203242

llvm-svn: 241482
This commit is contained in:
Enrico Granata
2015-07-06 18:28:46 +00:00
parent 95dd08e4c9
commit c1f705c229
15 changed files with 156 additions and 0 deletions

View File

@@ -75,6 +75,26 @@ SBFunction::GetName() const
return cstr;
}
const char *
SBFunction::GetDisplayName() const
{
const char *cstr = NULL;
if (m_opaque_ptr)
cstr = m_opaque_ptr->GetMangled().GetDisplayDemangledName().AsCString();
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
{
if (cstr)
log->Printf ("SBFunction(%p)::GetDisplayName () => \"%s\"",
static_cast<void*>(m_opaque_ptr), cstr);
else
log->Printf ("SBFunction(%p)::GetDisplayName () => NULL",
static_cast<void*>(m_opaque_ptr));
}
return cstr;
}
const char *
SBFunction::GetMangledName () const
{