[Lldb-commits] [lldb] r125301 - /lldb/branches/apple/calcite/lldb/source/Core/Broadcaster.cpp
Greg Clayton
gclayton at apple.com
Thu Feb 10 11:32:08 PST 2011
Author: gclayton
Date: Thu Feb 10 13:32:08 2011
New Revision: 125301
URL: http://llvm.org/viewvc/llvm-project?rev=125301&view=rev
Log:
Fixed a crasher when enabling logging for events.
Modified:
lldb/branches/apple/calcite/lldb/source/Core/Broadcaster.cpp
Modified: lldb/branches/apple/calcite/lldb/source/Core/Broadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/calcite/lldb/source/Core/Broadcaster.cpp?rev=125301&r1=125300&r2=125301&view=diff
==============================================================================
--- lldb/branches/apple/calcite/lldb/source/Core/Broadcaster.cpp (original)
+++ lldb/branches/apple/calcite/lldb/source/Core/Broadcaster.cpp Thu Feb 10 13:32:08 2011
@@ -214,6 +214,16 @@
const uint32_t event_type = event_sp->GetType();
Mutex::Locker event_types_locker(m_listeners_mutex);
+
+ Listener *hijacking_listener = NULL;
+ if (!m_hijacking_listeners.empty())
+ {
+ assert (!m_hijacking_masks.empty());
+ hijacking_listener = m_hijacking_listeners.back();
+ if ((event_type & m_hijacking_masks.back()) == 0)
+ hijacking_listener = NULL;
+ }
+
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EVENTS));
if (log)
{
@@ -224,12 +234,11 @@
m_broadcaster_name.AsCString(""),
event_description.GetData(),
unique,
- m_hijacking_listeners.back());
+ hijacking_listener);
}
- if (m_hijacking_listeners.size() > 0 && m_hijacking_masks.back() & event_type)
+ if (hijacking_listener)
{
- Listener *hijacking_listener = m_hijacking_listeners.back();
// FIXME: REMOVE THIS EXTRA LOGGING
LogSP log_process(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log_process)
More information about the lldb-commits
mailing list