llvm-project/lldb/source/Plugins/Process/NetBSD
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
..
CMakeLists.txt Add support for tracing hello-world application on NetBSD 2017-03-28 22:43:17 +00:00
NativeProcessNetBSD.cpp Add a NativeProcessProtocol Factory class 2017-07-07 11:02:19 +00:00
NativeProcessNetBSD.h Add a NativeProcessProtocol Factory class 2017-07-07 11:02:19 +00:00
NativeRegisterContextNetBSD.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
NativeRegisterContextNetBSD.h Rename Error -> Status. 2017-05-12 04:51:55 +00:00
NativeRegisterContextNetBSD_x86_64.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
NativeRegisterContextNetBSD_x86_64.h Rename Error -> Status. 2017-05-12 04:51:55 +00:00
NativeThreadNetBSD.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
NativeThreadNetBSD.h Rename Error -> Status. 2017-05-12 04:51:55 +00:00