hanchenye-llvm-project/lldb/include/lldb
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 Added new API to SBStructuredData class 2017-05-29 08:25:46 +00:00
Breakpoint Move StructuredData from Core to Utility 2017-06-27 10:45:31 +00:00
Core Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
DataFormatters Move StructuredData from Core to Utility 2017-06-27 10:45:31 +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 *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Interpreter Move StructuredData from Core to Utility 2017-06-27 10:45:31 +00:00
Symbol [DWARFCallFrameInfo] Add Type enum to differentiate eh/debug_frame sections 2017-06-28 09:09:19 +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
lldb-defines.h Actually use = delete to mark constructors and operators we want to not exist. Just declaring them as private works, but it can confuse certain tools as it doesn't actually declare intent, and the C++11 way is more expressive anyway, so this is pure win 2016-10-26 18:12:52 +00:00
lldb-enumerations.h Upstream the 'eInstrumentationRuntimeTypeSwiftRuntimeReporting' value of the 'eInstrumentationRuntimeType' enum from the swift-lldb project (to avoid potential clashes). 2017-06-27 21:39:15 +00:00
lldb-forward.h Rename Error -> Status. 2017-05-12 04:51:55 +00:00
lldb-private-defines.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb-private-enumerations.h Add pretty-printer for wait(2) statuses and modernize the code handling them 2017-06-19 12:47:50 +00:00
lldb-private-forward.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb-private-interfaces.h Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
lldb-private-types.h Rename Error -> Status. 2017-05-12 04:51:55 +00:00
lldb-private.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb-public.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb-types.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb-versioning.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00