mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 20:10:50 +08:00
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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user