[Lldb-commits] [PATCH] D46580: Modernize and clean-up the Predicate class

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 8 06:33:59 PDT 2018


labath created this revision.
labath added reviewers: jingham, clayborg.
Herald added a subscriber: mgorny.

The comments on this class were out of date with the implementation, and
the implementation itself was inconsistent with our usage of the Timeout
class (I started converting everything to use this class back in https://reviews.llvm.org/D27136,
but I missed this one). I avoid duplicating the waiting logic by
introducing a templated WaitFor function, and make other functions
delegate to that. This function can be also used as a replacement for
the unused WaitForBitToBeSet functions I removed, if it turns out to be
necessary.

As this changes the meaning of a "zero" timeout, I tracked down all the
callers of these functions and updated them accordingly. Propagating the
changes to all the callers of RunShellCommand was a bit too much for
this patch, so I stopped there and will continue that in a follow-up
patch.

I also add some basic unittests for the functions I modified.


https://reviews.llvm.org/D46580

Files:
  include/lldb/Core/Event.h
  include/lldb/Host/Predicate.h
  include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
  include/lldb/Target/Process.h
  source/Commands/CommandObjectProcess.cpp
  source/Commands/CommandObjectThread.cpp
  source/Host/common/Host.cpp
  source/Host/posix/ConnectionFileDescriptorPosix.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
  source/Target/Process.cpp
  unittests/Host/CMakeLists.txt
  unittests/Host/PredicateTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46580.145682.patch
Type: text/x-patch
Size: 15252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180508/9dcd7c32/attachment-0001.bin>


More information about the lldb-commits mailing list