hanchenye-llvm-project/lldb/tools/lldb-server
Pavel Labath 82abefa4b1 Remove shared pointer from NativeProcessProtocol
Summary:
The usage of shared_from_this forces us to separate construction and
initialization phases, because shared_from_this() is not available in
the constructor (or destructor). The shared semantics are not necessary,
as we always have a clear owner of the native process class
(GDBRemoteCommunicationServerLLDB object). Even if we need shared
semantics in the future (which I think we should strongly avoid),
reverting this will not be necessary -- the owners can still easily
store the native process object in a shared pointer if they really want
to -- this just prevents the knowledge of that from leaking into the
class implementation.

After this a NativeThread object will hold a reference to the parent
process (instead of a weak_ptr) -- having a process instance always
available allows us to simplify some logic in this class (some of it was
already simplified because we were asserting that the process is
available, but this makes it obvious).

Reviewers: krytarowski, eugene, zturner

Subscribers: lldb-commits

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

llvm-svn: 308282
2017-07-18 09:24:48 +00:00
..
Darwin/resources
Acceptor.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Acceptor.h Move Connection and IOObject interfaces to Utility module 2017-06-27 10:33:14 +00:00
CMakeLists.txt Add a NativeProcessProtocol Factory class 2017-07-07 11:02:19 +00:00
LLDBServerUtilities.cpp Remove lldb streams from the Log class completely 2017-03-15 09:06:58 +00:00
LLDBServerUtilities.h *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb-gdbserver.cpp Remove shared pointer from NativeProcessProtocol 2017-07-18 09:24:48 +00:00
lldb-platform.cpp Fix a copy-paste error in r307161 2017-07-06 11:43:25 +00:00
lldb-server.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb-server.exports