[LLGS] Avoid misrepresenting log lines as inferior output
Summary:
in case we are logging to stdout, any log lines from the forked child can be misconstrued to be
inferior output. To avoid this, we disable all logging immediately after forking.
I also fix the implementatoion of DisableAllLogChannels, which was a no-op before this commit.
Reviewers: clayborg, ovyalov
Subscribers: dean, lldb-commits
Differential Revision: http://reviews.llvm.org/D12083
llvm-svn: 245272
diff --git a/lldb/source/Core/Log.cpp b/lldb/source/Core/Log.cpp
index 6acd50e..5a3f374 100644
--- a/lldb/source/Core/Log.cpp
+++ b/lldb/source/Core/Log.cpp
@@ -449,7 +449,7 @@
{
CallbackMap &callback_map = GetCallbackMap ();
CallbackMapIter pos, end = callback_map.end();
- const char *categories[1] = {NULL};
+ const char *categories[] = {"all", nullptr};
for (pos = callback_map.begin(); pos != end; ++pos)
pos->second.disable (categories, feedback_strm);