llvm-project/lldb
Pavel Labath 52d9c62a50 Extract common PlatformPOSIX/Windows code into a separate class
Summary:
The two classes contained a lot of duplicated code, but there wasn't a
good place to factor it to. It couldn't be the base Platform class,
since we also have platforms which are only remote (such as
PlatformGDBRemoteServer), and so it did not make sense for those to have
an m_remote_platform member.

This patch creates a new class, RemoteAwarePlatform, which can serve as
a base class for platforms which can both serve as a host, and forward
actions to a remote system. It is motivated partly by D56232 (which was
about to add a bunch of additional duplicated methods), and partly by my
own need to modify a function which happens to be implemented in both
places identically.

The patch moves the methods which are trivially identical in the two
classes into the common base class, there were one or two more methods
which could probably be merged into one, but this wasn't completely
trivial, so I did not attempt to do that now.

Reviewers: jingham, zturner, clayborg, asmith

Subscribers: emaste, mgorny, Hui, lldb-commits

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

llvm-svn: 353812
2019-02-12 09:27:24 +00:00
..
cmake [CMake] Accept entitlements for code signing in add_lldb_library() 2019-01-30 15:13:16 +00:00
docs Add LLDB website and documentation in reStructuredText for Sphinx 2019-01-30 18:51:40 +00:00
examples Fix use of non-existing variable in crashlog.py 2019-01-31 17:33:17 +00:00
include/lldb Extract common PlatformPOSIX/Windows code into a separate class 2019-02-12 09:27:24 +00:00
lit [NativePDB] Process virtual bases in the correct order 2019-02-12 08:17:11 +00:00
lldb.xcodeproj Fix my mistake adding SBReproducer the Xcode project 2019-02-07 01:42:47 +00:00
lldb.xcworkspace Remove accidentally commited file in xcshareddata 2019-02-05 23:35:01 +00:00
packages/Python/lldbsuite [gdb-remote] Use lldb's portable Host::GetEnvironment() instead of getenv 2019-02-07 18:22:00 +00:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts use_lldb_suite.py: Fix potential infinite loop 2019-02-07 14:03:43 +00:00
source Extract common PlatformPOSIX/Windows code into a separate class 2019-02-12 09:27:24 +00:00
test [CMake] Fix lldb-test-depends target 2019-01-17 22:25:20 +00:00
third_party/Python/module [dotest] Consider unexpected passes as failures. 2018-12-20 20:44:23 +00:00
tools Use std::make_shared in LLDB (NFC) 2019-02-11 23:13:08 +00:00
unittests Remove redundant ::get() for smart pointer. (NFC) 2019-02-12 03:47:39 +00:00
utils Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
www Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
.arcconfig
.clang-format
.gitignore [dotest] Remove crashinfo hook 2018-01-10 10:18:47 +00:00
CMakeLists.txt Define _ENABLE_EXTENDED_ALIGNED_STORAGE on Windows. 2019-02-12 00:30:21 +00:00
CODE_OWNERS.txt Fix/unify the spelling of Objective-C. 2018-06-13 16:21:24 +00:00
INSTALL.txt Changed builld-llvm.py to use .json files 2017-02-23 02:21:34 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py