llvm-project/lldb/source
Pavel Labath 96e600fcf5 Add a NativeProcessProtocol Factory class
Summary:
This replaces the static functions used for creating
NativeProcessProtocol instances with a factory pattern, and modernizes
the interface of the new class in the process -- I use llvm::Expected
instead of the Status+value combo. I also move some of the common code
(like the Delegate registration into the base class). The new
arrangement has multiple benefits:
- it removes the NativeProcess*** dependency from Process/gdb-remote
  (which for example means that liblldb no longer pulls in this code).
- it enables unit testing of the GDBRemoteCommunicationServerLLGS class
  (by providing a mock Native Process).
- serves as another example on how to use the llvm::Expected class (I
  couldn't get rid of the Initialize-type functions completely here
  because of the use of shared_from_this, but that's the next thing on
  my list here)

Tests still pass on Linux and I've made sure NetBSD compiles after this.

Reviewers: zturner, eugene, krytarowski

Subscribers: srhines, lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D33778

llvm-svn: 307390
2017-07-07 11:02:19 +00:00
..
API Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
Breakpoint Fix error string set in AddName to take a StringRef. 2017-05-17 17:48:55 +00:00
Commands Fix assorted compiler warnings (mismatched signedness and printf specifiers) 2017-07-05 14:54:46 +00:00
Core Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
DataFormatters Use exact equality for category language matching, for all languages, except those specifically mentioned. 2017-06-06 20:40:24 +00:00
Expression Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Host Add a NativeProcessProtocol Factory class 2017-07-07 11:02:19 +00:00
Initialization Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
Interpreter Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
Plugins Add a NativeProcessProtocol Factory class 2017-07-07 11:02:19 +00:00
Symbol Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
Target Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
Utility Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
CMakeLists.txt Remove Plugins/Process/POSIX from include_directories 2017-04-11 12:26:25 +00:00
lldb.cpp One more cleanup to lldb version printing 2016-11-14 22:43:08 +00:00