diff options
-rw-r--r-- | lldb/source/Core/Log.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Core/Log.cpp b/lldb/source/Core/Log.cpp index 6acd50eec76..5a3f3744c68 100644 --- a/lldb/source/Core/Log.cpp +++ b/lldb/source/Core/Log.cpp @@ -449,7 +449,7 @@ Log::DisableAllLogChannels (Stream *feedback_strm) { 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); diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index b4afe624697..b237339c124 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -560,8 +560,11 @@ NativeProcessLinux::Launch(LaunchArgs *args, Error &error) // Child process. if (pid == 0) { + // First, make sure we disable all logging. If we are logging to stdout, our logs can be + // mistaken for inferior output. + Log::DisableAllLogChannels(nullptr); // FIXME consider opening a pipe between parent/child and have this forked child - // send log info to parent re: launch status, in place of the log lines removed here. + // send log info to parent re: launch status. // Start tracing this child that is about to exec. error = PtraceWrapper(PTRACE_TRACEME, 0); |