forked from OSchip/llvm-project
[lldb] Move PlatformPOSIX::ConnectToWaitingProcesses to RemoteAwarePlatform
The functionality is not posix specific. Also force the usage of the gdb-remote process plugin in the gdb platform class. This is not sufficient to make TestPlatformConnect pass on windows (it seems it suffers from module loading issues, unrelated to this test), but it at least makes it shut down correctly, so I change the skip to an xfail.
This commit is contained in:
parent
166620a4f0
commit
463863fffe
|
@ -97,6 +97,9 @@ public:
|
|||
|
||||
Status KillProcess(const lldb::pid_t pid) override;
|
||||
|
||||
size_t ConnectToWaitingProcesses(Debugger &debugger,
|
||||
Status &error) override;
|
||||
|
||||
protected:
|
||||
lldb::PlatformSP m_remote_platform_sp;
|
||||
};
|
||||
|
|
|
@ -994,13 +994,6 @@ PlatformPOSIX::GetLibdlFunctionDeclarations(lldb_private::Process *process) {
|
|||
)";
|
||||
}
|
||||
|
||||
size_t PlatformPOSIX::ConnectToWaitingProcesses(Debugger &debugger,
|
||||
Status &error) {
|
||||
if (m_remote_platform_sp)
|
||||
return m_remote_platform_sp->ConnectToWaitingProcesses(debugger, error);
|
||||
return Platform::ConnectToWaitingProcesses(debugger, error);
|
||||
}
|
||||
|
||||
ConstString PlatformPOSIX::GetFullNameForDylib(ConstString basename) {
|
||||
if (basename.IsEmpty())
|
||||
return basename;
|
||||
|
|
|
@ -71,9 +71,6 @@ public:
|
|||
lldb_private::Status UnloadImage(lldb_private::Process *process,
|
||||
uint32_t image_token) override;
|
||||
|
||||
size_t ConnectToWaitingProcesses(lldb_private::Debugger &debugger,
|
||||
lldb_private::Status &error) override;
|
||||
|
||||
lldb_private::ConstString GetFullNameForDylib(lldb_private::ConstString basename) override;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -843,7 +843,7 @@ size_t PlatformRemoteGDBServer::ConnectToWaitingProcesses(Debugger &debugger,
|
|||
GetPendingGdbServerList(connection_urls);
|
||||
|
||||
for (size_t i = 0; i < connection_urls.size(); ++i) {
|
||||
ConnectProcess(connection_urls[i].c_str(), "", debugger, nullptr, error);
|
||||
ConnectProcess(connection_urls[i].c_str(), "gdb-remote", debugger, nullptr, error);
|
||||
if (error.Fail())
|
||||
return i; // We already connected to i process succsessfully
|
||||
}
|
||||
|
|
|
@ -437,3 +437,10 @@ Status RemoteAwarePlatform::KillProcess(const lldb::pid_t pid) {
|
|||
return m_remote_platform_sp->KillProcess(pid);
|
||||
return Status("the platform is not currently connected");
|
||||
}
|
||||
|
||||
size_t RemoteAwarePlatform::ConnectToWaitingProcesses(Debugger &debugger,
|
||||
Status &error) {
|
||||
if (m_remote_platform_sp)
|
||||
return m_remote_platform_sp->ConnectToWaitingProcesses(debugger, error);
|
||||
return Platform::ConnectToWaitingProcesses(debugger, error);
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@ class TestPlatformProcessConnect(TestBase):
|
|||
|
||||
@skipIfRemote
|
||||
@expectedFailureAll(hostoslist=["windows"], triple='.*-android')
|
||||
@skipIfWindows # lldb-server does not terminate correctly
|
||||
@skipIfDarwin # lldb-server not found correctly
|
||||
@expectedFailureAll(oslist=["windows"]) # process modules not loaded
|
||||
@add_test_categories(["lldb-server"])
|
||||
def test_platform_process_connect(self):
|
||||
self.build()
|
||||
|
|
Loading…
Reference in New Issue