summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-01-29 00:56:52 +0000
committerEnrico Granata <egranata@apple.com>2016-01-29 00:56:52 +0000
commit6cc19988145918366bb739ddd287a50dea1667fb (patch)
treee353cb2a476841f0baa916fd6e9a40f765159100 /lldb/source/DataFormatters
parent2214ed8937a05b9457b167a84d6732a448fad27f (diff)
downloadbcm5719-llvm-6cc19988145918366bb739ddd287a50dea1667fb.tar.gz
bcm5719-llvm-6cc19988145918366bb739ddd287a50dea1667fb.zip
Fix a bug where LLDB would not print the name of the function that a scripted summary is bound to
rdar://24380076 llvm-svn: 259131
Diffstat (limited to 'lldb/source/DataFormatters')
-rw-r--r--lldb/source/DataFormatters/TypeSummary.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp
index 2806ba20c6a..1ef9ea6cccb 100644
--- a/lldb/source/DataFormatters/TypeSummary.cpp
+++ b/lldb/source/DataFormatters/TypeSummary.cpp
@@ -256,14 +256,28 @@ std::string
ScriptSummaryFormat::GetDescription ()
{
StreamString sstr;
- sstr.Printf ("%s%s%s%s%s%s%s\n%s", Cascades() ? "" : " (not cascading)",
+ sstr.Printf ("%s%s%s%s%s%s%s\n ", Cascades() ? "" : " (not cascading)",
!DoesPrintChildren(nullptr) ? "" : " (show children)",
!DoesPrintValue(nullptr) ? " (hide value)" : "",
IsOneLiner() ? " (one-line printout)" : "",
SkipsPointers() ? " (skip pointers)" : "",
SkipsReferences() ? " (skip references)" : "",
- HideNames(nullptr) ? " (hide member names)" : "",
- m_python_script.c_str());
+ HideNames(nullptr) ? " (hide member names)" : "");
+ if (m_function_name.empty())
+ {
+ if (m_python_script.empty())
+ {
+ sstr.PutCString("no backing script");
+ }
+ else
+ {
+ sstr.PutCString(m_python_script.c_str());
+ }
+ }
+ else
+ {
+ sstr.PutCString(m_function_name.c_str());
+ }
return sstr.GetString();
}
OpenPOWER on IntegriCloud