summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-05-10 13:46:25 +0000
committerPavel Labath <labath@google.com>2016-05-10 13:46:25 +0000
commit7189b0fdb2d06b4107185428aee8c31157ee9c9c (patch)
treeb88b8e41bec921c3c6c1e5a77b3f88db1f1cc5ec
parentd86bc2af27a9aac510ee2e147b40f59396073660 (diff)
downloadbcm5719-llvm-7189b0fdb2d06b4107185428aee8c31157ee9c9c.tar.gz
bcm5719-llvm-7189b0fdb2d06b4107185428aee8c31157ee9c9c.zip
Fix logging in Listener.cpp
Clear() log message was claiming it was the destructor, which had me very confused when looking at the log messages. Fix the message, and add a log message to the real destructor. Also noticed that the destructor was needlessly locking the broadcaster mutex (as Clear was locking it again anyway), so remove that as well. llvm-svn: 269058
-rw-r--r--lldb/source/Core/Listener.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/source/Core/Listener.cpp b/lldb/source/Core/Listener.cpp
index 79040190fea..e8cf39e0676 100644
--- a/lldb/source/Core/Listener.cpp
+++ b/lldb/source/Core/Listener.cpp
@@ -56,9 +56,12 @@ Listener::Listener(const char *name) :
Listener::~Listener()
{
- Mutex::Locker locker (m_broadcasters_mutex);
+ Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
Clear();
+
+ if (log)
+ log->Printf("%p Listener::%s('%s')", this, __FUNCTION__, m_name.c_str());
}
void
@@ -87,9 +90,8 @@ Listener::Clear()
manager_sp->RemoveListener(this);
}
- if (log != nullptr)
- log->Printf ("%p Listener::~Listener('%s')",
- static_cast<void*>(this), m_name.c_str());
+ if (log)
+ log->Printf("%p Listener::%s('%s')", this, __FUNCTION__, m_name.c_str());
}
uint32_t
OpenPOWER on IntegriCloud