[Lldb-commits] [lldb] r153683 - /lldb/trunk/source/Core/Broadcaster.cpp
Johnny Chen
johnny.chen at apple.com
Thu Mar 29 13:02:33 PDT 2012
Author: johnny
Date: Thu Mar 29 15:02:33 2012
New Revision: 153683
URL: http://llvm.org/viewvc/llvm-project?rev=153683&view=rev
Log:
Add log entries for HijackBroadcaster() as well as RestoreBroadcaster().
Modified:
lldb/trunk/source/Core/Broadcaster.cpp
Modified: lldb/trunk/source/Core/Broadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Broadcaster.cpp?rev=153683&r1=153682&r2=153683&view=diff
==============================================================================
--- lldb/trunk/source/Core/Broadcaster.cpp (original)
+++ lldb/trunk/source/Core/Broadcaster.cpp Thu Mar 29 15:02:33 2012
@@ -294,6 +294,15 @@
{
Mutex::Locker event_types_locker(m_listeners_mutex);
+ LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS));
+ if (log)
+ {
+ log->Printf ("%p Broadcaster(\"%s\")::HijackBroadcaster (listener(\"%s\")=%p)",
+ this,
+ m_broadcaster_name.AsCString(""),
+ listener->m_name.c_str(),
+ listener);
+ }
m_hijacking_listeners.push_back(listener);
m_hijacking_masks.push_back(event_mask);
return true;
@@ -303,6 +312,17 @@
Broadcaster::RestoreBroadcaster ()
{
Mutex::Locker event_types_locker(m_listeners_mutex);
+
+ LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS));
+ if (log)
+ {
+ Listener *listener = m_hijacking_listeners.back();
+ log->Printf ("%p Broadcaster(\"%s\")::RestoreBroadcaster (about to pop listener(\"%s\")=%p)",
+ this,
+ m_broadcaster_name.AsCString(""),
+ listener->m_name.c_str(),
+ listener);
+ }
m_hijacking_listeners.pop_back();
m_hijacking_masks.pop_back();
}
More information about the lldb-commits
mailing list