[Lldb-commits] [PATCH] D29615: Convert Log class to llvm streams

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 6 18:06:53 PST 2017


labath created this revision.
Herald added subscribers: mgorny, emaste.

This converts LLDB's logging to use llvm streams instead of
lldb_private::Stream and friends. The changes are mostly
straight-forward and amount to s/lldb_private::Stream/llvm::raw_ostream.

The part worth calling out is the rewrite of the StreamCallback class.
Previously this class contained a per-thread buffer of data written. I
assume this had something to do with it trying to make sure each log
line is delivered as a single event, instead of multiple (possibly
interleaved) events. However, this is no longer relevant as the Log
class already writes things to a temporary buffer and then delivers the
message as a single "write", so I have just removed the code in
question.


https://reviews.llvm.org/D29615

Files:
  include/lldb/Core/Debugger.h
  include/lldb/Core/Log.h
  include/lldb/Core/Logging.h
  include/lldb/Core/StreamCallback.h
  source/Core/Debugger.cpp
  source/Core/Log.cpp
  source/Core/Logging.cpp
  source/Core/StreamCallback.cpp
  source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
  source/Plugins/Process/POSIX/ProcessPOSIXLog.h
  source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
  source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h
  source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
  source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
  tools/lldb-server/LLDBServerUtilities.cpp
  unittests/Core/CMakeLists.txt
  unittests/Core/LogTest.cpp
  unittests/Core/StreamCallbackTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29615.87349.patch
Type: text/x-patch
Size: 22014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170207/1b014640/attachment-0001.bin>


More information about the lldb-commits mailing list