[Lldb-commits] [lldb] r125269 - /lldb/trunk/source/Core/Broadcaster.cpp
Greg Clayton
gclayton at apple.com
Wed Feb 9 22:51:22 PST 2011
Author: gclayton
Date: Thu Feb 10 00:51:22 2011
New Revision: 125269
URL: http://llvm.org/viewvc/llvm-project?rev=125269&view=rev
Log:
Fixed a crasher when enabling logging that is due to the new hijack listener stack changes.
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=125269&r1=125268&r2=125269&view=diff
==============================================================================
--- lldb/trunk/source/Core/Broadcaster.cpp (original)
+++ lldb/trunk/source/Core/Broadcaster.cpp Thu Feb 10 00:51:22 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