Le 09/12/2013 17:15, Ed Maste a écrit :
> On 8 December 2013 16:24, Xavier de Gaye <[email protected]> wrote:
>>
>> Build fails on linux after Revision 196547:
>> Modified local spawning in debugserver processes
>>
>> This patch seems to fix it:
>>
>> diff --git a/tools/lldb/source/Core/ConnectionFileDescriptor.cpp
>> b/tools/lldb/source/Core/ConnectionFileDescriptor.cpp
>> --- a/tools/lldb/source/Core/ConnectionFileDescriptor.cpp
>> +++ b/tools/lldb/source/Core/ConnectionFileDescriptor.cpp
>> @@ -1380,8 +1380,7 @@
>> {
>> struct sockaddr_in accept_addr;
>> ::memset (&accept_addr, 0, sizeof accept_addr);
>> - accept_addr.sin_len = sizeof accept_addr;
>
> We still need to set .sin_len on the platforms that have it though.
The (crappy) attached patch fixes the build failure under GNU/Linux. If
you are ok, I can apply it.
However, some tests freezes. Not sure it is related.
Sylvestre
Index: llvm-toolchain-snapshot_3.5~svn196895/lldb/source/Core/ConnectionFileDescriptor.cpp
===================================================================
--- llvm-toolchain-snapshot_3.5~svn196895.orig/lldb/source/Core/ConnectionFileDescriptor.cpp 2013-12-06 18:46:35.000000000 +0100
+++ llvm-toolchain-snapshot_3.5~svn196895/lldb/source/Core/ConnectionFileDescriptor.cpp 2013-12-10 11:01:47.615592169 +0100
@@ -1371,27 +1371,29 @@
// us to wait for the port predicate to be set to a non-zero value from
// another thread in an efficient manor.
m_port_predicate.SetValue(port, eBroadcastAlways);
-
-
+
+
bool accept_connection = false;
-
+
// Loop until we are happy with our connection
while (!accept_connection)
{
struct sockaddr_in accept_addr;
::memset (&accept_addr, 0, sizeof accept_addr);
+#if ! defined (__linux__)
accept_addr.sin_len = sizeof accept_addr;
+#endif
socklen_t accept_addr_len = sizeof accept_addr;
int fd = ::accept (listen_fd, (struct sockaddr *)&accept_addr, &accept_addr_len);
-
+
if (fd == -1)
{
if (error_ptr)
error_ptr->SetErrorToErrno();
break;
}
-
+
if (listen_addr.sockaddr_in().sin_addr.s_addr == INADDR_ANY)
{
accept_connection = true;
@@ -1399,9 +1401,14 @@
}
else
{
+#if ! defined (__linux__)
if (accept_addr_len == listen_addr.sockaddr_in().sin_len &&
accept_addr.sin_addr.s_addr == listen_addr.sockaddr_in().sin_addr.s_addr)
{
+#else
+ if (accept_addr.sin_addr.s_addr == listen_addr.sockaddr_in().sin_addr.s_addr)
+ {
+#endif
accept_connection = true;
m_fd_send = m_fd_recv = fd;
}
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev