summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLog.cpp')
-rw-r--r--lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLog.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLog.cpp b/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLog.cpp
index 55c35bccbce..090ab84c90a 100644
--- a/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLog.cpp
+++ b/lldb/source/Plugins/Process/Windows/Live/ProcessWindowsLog.cpp
@@ -96,26 +96,32 @@ ProcessWindowsLog::DisableLog(const char **args, Stream *feedback_strm)
{
uint32_t flag_bits = 0;
- flag_bits = log->GetMask().Get();
- for (; args[0]; args++)
+ if (args[0] != nullptr)
{
- const char *arg = args[0];
- uint32_t bits = GetFlagBits(arg);
-
- if (bits)
- {
- flag_bits &= ~bits;
- }
- else
+ flag_bits = log->GetMask().Get();
+ for (; args[0]; args++)
{
- feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
- ListLogCategories(feedback_strm);
+ const char *arg = args[0];
+ uint32_t bits = GetFlagBits(arg);
+
+ if (bits)
+ {
+ flag_bits &= ~bits;
+ }
+ else
+ {
+ feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
+ ListLogCategories(feedback_strm);
+ }
}
}
log->GetMask().Reset(flag_bits);
if (flag_bits == 0)
+ {
g_log_enabled = false;
+ log->SetStream(lldb::StreamSP());
+ }
}
return;
OpenPOWER on IntegriCloud