summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-06-29 13:58:27 +0000
committerPavel Labath <labath@google.com>2016-06-29 13:58:27 +0000
commitf17635375a0d1a4ac1f67f9098a376c2667220d1 (patch)
treebee7efb451b8ebe161cee1654392051cdc87ecdf /lldb/source/Plugins/Process/gdb-remote
parent851019175b90ed7e471e234a367bc301e282626c (diff)
downloadbcm5719-llvm-f17635375a0d1a4ac1f67f9098a376c2667220d1.tar.gz
bcm5719-llvm-f17635375a0d1a4ac1f67f9098a376c2667220d1.zip
Remove platform plugins from lldb-server
Summary: This removes the last usage of Platform plugins in lldb-server -- it was used for launching child processes, where it can be trivially replaced by Host::LaunchProces (as lldb-server is always running on the host). Removing platform plugins enables us to remove a lot of other unused code, which was pulled in as a transitive dependency, and it reduces lldb-server size by 4%--9% (depending on build type and architecture). Reviewers: clayborg Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D20440 llvm-svn: 274125
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp6
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h3
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp3
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h1
4 files changed, 3 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 66e300a519f..fc6b31ec088 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -39,7 +39,6 @@
#include "lldb/Host/TimeValue.h"
#include "lldb/Target/FileAction.h"
#include "lldb/Target/MemoryRegionInfo.h"
-#include "lldb/Target/Platform.h"
#include "lldb/Host/common/NativeRegisterContext.h"
#include "lldb/Host/common/NativeProcessProtocol.h"
#include "lldb/Host/common/NativeThreadProtocol.h"
@@ -76,10 +75,8 @@ namespace
//----------------------------------------------------------------------
// GDBRemoteCommunicationServerLLGS constructor
//----------------------------------------------------------------------
-GDBRemoteCommunicationServerLLGS::GDBRemoteCommunicationServerLLGS(const lldb::PlatformSP &platform_sp,
- MainLoop &mainloop)
+GDBRemoteCommunicationServerLLGS::GDBRemoteCommunicationServerLLGS(MainLoop &mainloop)
: GDBRemoteCommunicationServerCommon("gdb-remote.server", "gdb-remote.server.rx_packet"),
- m_platform_sp(platform_sp),
m_mainloop(mainloop),
m_current_tid(LLDB_INVALID_THREAD_ID),
m_continue_tid(LLDB_INVALID_THREAD_ID),
@@ -93,7 +90,6 @@ GDBRemoteCommunicationServerLLGS::GDBRemoteCommunicationServerLLGS(const lldb::P
m_next_saved_registers_id(1),
m_handshake_completed(false)
{
- assert(platform_sp);
RegisterPacketHandlers();
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
index 066e4985062..caf6eb319e6 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
@@ -40,7 +40,7 @@ public:
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
- GDBRemoteCommunicationServerLLGS(const lldb::PlatformSP& platform_sp, MainLoop &mainloop);
+ GDBRemoteCommunicationServerLLGS(MainLoop &mainloop);
//------------------------------------------------------------------
/// Specify the program to launch and its arguments.
@@ -114,7 +114,6 @@ public:
InitializeConnection (std::unique_ptr<Connection> &&connection);
protected:
- lldb::PlatformSP m_platform_sp;
MainLoop &m_mainloop;
MainLoop::ReadHandleUP m_network_handle_up;
lldb::tid_t m_current_tid;
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
index eba237c17c9..d6900c27293 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
@@ -53,7 +53,6 @@ GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform(const
m_socket_protocol(socket_protocol),
m_socket_scheme(socket_scheme),
m_spawned_pids_mutex(),
- m_platform_sp(Platform::GetHostPlatform()),
m_port_map(),
m_port_offset(0)
{
@@ -463,7 +462,7 @@ GDBRemoteCommunicationServerPlatform::LaunchProcess ()
std::bind(&GDBRemoteCommunicationServerPlatform::DebugserverProcessReaped, this, std::placeholders::_1),
false);
- Error error = m_platform_sp->LaunchProcess (m_process_launch_info);
+ Error error = Host::LaunchProcess(m_process_launch_info);
if (!error.Success ())
{
fprintf (stderr, "%s: failed to launch executable %s", __FUNCTION__, m_process_launch_info.GetArguments ().GetArgumentAtIndex (0));
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
index 646d267dcb9..1f4d08c64e0 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
@@ -85,7 +85,6 @@ protected:
const std::string m_socket_scheme;
std::recursive_mutex m_spawned_pids_mutex;
std::set<lldb::pid_t> m_spawned_pids;
- lldb::PlatformSP m_platform_sp;
PortMap m_port_map;
uint16_t m_port_offset;
OpenPOWER on IntegriCloud