summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBFunction.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-07-06 18:28:46 +0000
committerEnrico Granata <egranata@apple.com>2015-07-06 18:28:46 +0000
commitc1f705c2298d64edd5d54ca59816332cce34869b (patch)
tree20efb79aae596fcc8f988114ee9d861a50c78477 /lldb/source/API/SBFunction.cpp
parent95dd08e4c928d17464e9974ed98493f9ab87f257 (diff)
downloadbcm5719-llvm-c1f705c2298d64edd5d54ca59816332cce34869b.tar.gz
bcm5719-llvm-c1f705c2298d64edd5d54ca59816332cce34869b.zip
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
Diffstat (limited to 'lldb/source/API/SBFunction.cpp')
-rw-r--r--lldb/source/API/SBFunction.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index bf5e9180a43..d57307add03 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -76,6 +76,26 @@ SBFunction::GetName() const
}
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
{
const char *cstr = NULL;
OpenPOWER on IntegriCloud