[Lldb-commits] [PATCH] D12083: [LLGS] Avoid misrepresenting log lines as inferior output

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 18 01:24:34 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL245272: [LLGS] Avoid misrepresenting log lines as inferior output (authored by labath).

Changed prior to commit:
  http://reviews.llvm.org/D12083?vs=32298&id=32383#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12083

Files:
  lldb/trunk/source/Core/Log.cpp
  lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp

Index: lldb/trunk/source/Core/Log.cpp
===================================================================
--- lldb/trunk/source/Core/Log.cpp
+++ lldb/trunk/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);
Index: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -560,8 +560,11 @@
     // 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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12083.32383.patch
Type: text/x-patch
Size: 1392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150818/178731eb/attachment.bin>


More information about the lldb-commits mailing list