This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [Host/ConnectionFileDescriptor] Refactor to improve code reuse
ClosedPublic

Authored by mgorny on Oct 25 2021, 3:06 PM.

Details

Summary

Refactor ConnectionFileDescriptor to improve code reuse for different
types of sockets. Unify method naming.

While at it, remove some (now-)dead code from Socket.

Diff Detail

Event Timeline

mgorny requested review of this revision.Oct 25 2021, 3:06 PM
mgorny created this revision.
labath accepted this revision.Oct 27 2021, 1:45 AM
This revision is now accepted and ready to land.Oct 27 2021, 1:45 AM
This revision was landed with ongoing or failed builds.Oct 27 2021, 3:46 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 27 2021, 3:46 AM
mib added a subscriber: mib.Oct 27 2021, 9:51 AM

This patch broke TestPlatformSDK.py on GreenDragon (https://green.lab.llvm.org/green/job/lldb-cmake/37156/)

mib added a comment.Oct 27 2021, 3:12 PM

Looking at the test backtrace, it seems that we couldn't connect to debugserver:

File "/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/API/commands/platform/sdk/TestPlatformSDK.py", line 113, in test_macos_sdk
  self.assertTrue(connected, "could not connect to debugserver")

I checked the SBCommandReturnObject.GetError output, which says Failed to connect port. The only occurence for this error is in :

lldb/source/Host/common/TCPSocket.cpp
183:  error.SetErrorString("error: Failed to connect port");

I reverted the patch to fix GreenDragon, I'll try to investigate more tomorrow.

mib added a comment.Oct 27 2021, 3:56 PM

Build run #37166 (https://green.lab.llvm.org/green/job/lldb-cmake/37166/) confirms that this patch caused the failure.