summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/API/SBCommandInterpreter.cpp2
-rw-r--r--lldb/source/API/SBListener.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index f6a95f9ac91..cb2dd7497a2 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -87,6 +87,8 @@ SBCommandInterpreter::HandleCommand (const char *command_line, SBCommandReturnOb
result->SetStatus (eReturnStatusFailed);
}
+ // We need to get the value again, in case the command disabled the log!
+ log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
{
SBStream sstr;
diff --git a/lldb/source/API/SBListener.cpp b/lldb/source/API/SBListener.cpp
index 0062746901e..bc118e575bc 100644
--- a/lldb/source/API/SBListener.cpp
+++ b/lldb/source/API/SBListener.cpp
@@ -119,7 +119,6 @@ SBListener::StopListeningForEvents (const SBBroadcaster& broadcaster, uint32_t e
bool
SBListener::WaitForEvent (uint32_t num_seconds, SBEvent &event)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
//if (log)
//{
@@ -141,6 +140,7 @@ SBListener::WaitForEvent (uint32_t num_seconds, SBEvent &event)
if (m_opaque_ptr->WaitForEvent (time_value.IsValid() ? &time_value : NULL, event_sp))
{
event.reset (event_sp);
+ Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
log->Printf ("SBListener::WaitForEvent (this.obj=%p, num_seconds=%d, event.sp=%p) => 'true'",
m_opaque_ptr, num_seconds, event.get());
@@ -148,6 +148,7 @@ SBListener::WaitForEvent (uint32_t num_seconds, SBEvent &event)
}
}
+ Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
log->Printf ("SBListener::WaitForEvent (this.obj=%p, num_seconds=%d, event.sp=%p) => 'false'",
m_opaque_ptr, num_seconds, event.get());
OpenPOWER on IntegriCloud