summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2015-07-08 16:33:46 +0000
committerSean Callanan <scallanan@apple.com>2015-07-08 16:33:46 +0000
commitc307c2703533ec47659693d38ff05613e470ff76 (patch)
treecf48867062c7ad6402a4b238ebca4accbf6e45af /lldb/source/Plugins/Process/Linux
parent8e131f8cbcf9098a40111ae50f434483a7a29ae1 (diff)
downloadbcm5719-llvm-c307c2703533ec47659693d38ff05613e470ff76.tar.gz
bcm5719-llvm-c307c2703533ec47659693d38ff05613e470ff76.zip
Revert r241672, which breaks the OS X build by introducing a dependency on
platform-specific symbols that are not implemented on OS X. The build error that caused this is Undefined symbols for architecture x86_64: "lldb_private::NativeProcessProtocol::Attach(unsigned long long, lldb_private::NativeProcessProtocol::NativeDelegate&, std::__1::shared_ptr<lldb_private::NativeProcessProtocol>&)", referenced from: lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AttachToProcess(unsigned long long) in liblldb-core.a(GDBRemoteCommunicationServerLLGS.o) "lldb_private::NativeProcessProtocol::Launch(lldb_private::ProcessLaunchInfo&, lldb_private::NativeProcessProtocol::NativeDelegate&, std::__1::shared_ptr<lldb_private::NativeProcessProtocol>&)", referenced from: lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess() in liblldb-core.a(GDBRemoteCommunicationServerLLGS.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) llvm-svn: 241688
Diffstat (limited to 'lldb/source/Plugins/Process/Linux')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp17
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.h18
2 files changed, 16 insertions, 19 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index ae25fb4b4f1..41d6b7674a0 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -824,22 +824,15 @@ NativeProcessLinux::LaunchArgs::~LaunchArgs()
// -----------------------------------------------------------------------------
Error
-NativeProcessProtocol::Launch (
+NativeProcessLinux::LaunchProcess (
+ Module *exe_module,
ProcessLaunchInfo &launch_info,
NativeProcessProtocol::NativeDelegate &native_delegate,
NativeProcessProtocolSP &native_process_sp)
{
Log *log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
- lldb::ModuleSP exe_module_sp;
- PlatformSP platform_sp (Platform::GetHostPlatform ());
- Error error = platform_sp->ResolveExecutable(
- ModuleSpec(launch_info.GetExecutableFile(), launch_info.GetArchitecture()),
- exe_module_sp,
- nullptr);
-
- if (! error.Success())
- return error;
+ Error error;
// Verify the working directory is valid if one was specified.
FileSpec working_dir{launch_info.GetWorkingDirectory()};
@@ -913,7 +906,7 @@ NativeProcessProtocol::Launch (
}
std::static_pointer_cast<NativeProcessLinux> (native_process_sp)->LaunchInferior (
- exe_module_sp.get(),
+ exe_module,
launch_info.GetArguments ().GetConstArgumentVector (),
launch_info.GetEnvironmentEntries ().GetConstArgumentVector (),
stdin_file_spec,
@@ -937,7 +930,7 @@ NativeProcessProtocol::Launch (
}
Error
-NativeProcessProtocol::Attach (
+NativeProcessLinux::AttachToProcess (
lldb::pid_t pid,
NativeProcessProtocol::NativeDelegate &native_delegate,
NativeProcessProtocolSP &native_process_sp)
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h
index e3832d6eab2..fa8770430ef 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h
@@ -40,17 +40,21 @@ namespace process_linux {
/// Changes in the inferior process state are broadcasted.
class NativeProcessLinux: public NativeProcessProtocol
{
- friend Error
- NativeProcessProtocol::Launch (ProcessLaunchInfo &launch_info,
- NativeDelegate &native_delegate,
- NativeProcessProtocolSP &process_sp);
+ public:
- friend Error
- NativeProcessProtocol::Attach (lldb::pid_t pid,
+ static Error
+ LaunchProcess (
+ Module *exe_module,
+ ProcessLaunchInfo &launch_info,
+ NativeProcessProtocol::NativeDelegate &native_delegate,
+ NativeProcessProtocolSP &native_process_sp);
+
+ static Error
+ AttachToProcess (
+ lldb::pid_t pid,
NativeProcessProtocol::NativeDelegate &native_delegate,
NativeProcessProtocolSP &native_process_sp);
- public:
//------------------------------------------------------------------------------
/// @class Operation
/// @brief Represents a NativeProcessLinux operation.
OpenPOWER on IntegriCloud