[Lldb-commits] [lldb] r166950 - /lldb/trunk/source/Core/Event.cpp
Greg Clayton
gclayton at apple.com
Mon Oct 29 11:08:18 PDT 2012
Author: gclayton
Date: Mon Oct 29 13:08:18 2012
New Revision: 166950
URL: http://llvm.org/viewvc/llvm-project?rev=166950&view=rev
Log:
Improve the broadcast event dumping.
Modified:
lldb/trunk/source/Core/Event.cpp
Modified: lldb/trunk/source/Core/Event.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Event.cpp?rev=166950&r1=166949&r2=166950&view=diff
==============================================================================
--- lldb/trunk/source/Core/Event.cpp (original)
+++ lldb/trunk/source/Core/Event.cpp Mon Oct 29 13:08:18 2012
@@ -52,7 +52,25 @@
void
Event::Dump (Stream *s) const
{
- s->Printf("%p Event: broadcaster = %p, type = 0x%8.8x, data = ", this, m_broadcaster, m_type);
+ if (m_broadcaster)
+ {
+ StreamString event_name;
+ if (m_broadcaster->GetEventNames (event_name, m_type, false))
+ s->Printf("%p Event: broadcaster = %p (%s), type = 0x%8.8x (%s), data = ",
+ this,
+ m_broadcaster,
+ m_broadcaster->GetBroadcasterName().GetCString(),
+ m_type,
+ event_name.GetString().c_str());
+ else
+ s->Printf("%p Event: broadcaster = %p (%s), type = 0x%8.8x, data = ",
+ this,
+ m_broadcaster,
+ m_broadcaster->GetBroadcasterName().GetCString(),
+ m_type);
+ }
+ else
+ s->Printf("%p Event: broadcaster = NULL, type = 0x%8.8x, data = ", this, m_type);
if (m_data_ap.get() == NULL)
s->Printf ("<NULL>");
More information about the lldb-commits
mailing list