[Lldb-commits] lldb windows branch
João Matos
ripzonetriton at gmail.com
Fri Sep 14 03:41:20 PDT 2012
The regex changes look fine, but it would be best to add the copy
constructor instead of allocating it on the heap.
+#ifdef _WIN32
bytes_sent = ::sendto (m_fd_send,
+ (char*)src,
+ src_len,
+ 0,
+ m_udp_send_sockaddr,
+ m_udp_send_sockaddr.GetLength());
+#else
Here we could maybe keep the cast, I think it would work even in non-MS
platforms (where it's void*), and avoid duplicating the code for both
platforms.
+//#include <ar.h>
Here maybe we should just ifdef it and add the missing declarations on
Win32? Either that or just remove the include and just use our own
definitions.
+#else
+ abort();
+#endif
I don't really like the use of abort on to be used as libraries, so maybe
an assert / llvm_unreachable? Also why is this added here? Is this code
expected to never run under non-Apple OS?
+#ifdef _WIN32
+ WSADATA dummy;
+ WSAStartup(0x202, &dummy);
+#endif
This should probably be added elsewhere on the LLDB initialization path on
Windows if other plugins use the socket functionality, else we'll need to
duplicate this in every plugin initialization path.
+#ifdef _WIN32
+ Sleep (100);
+#else
+ usleep (100000);
+#endif
We should add an abstracted function for this as sleeping seems to be used
on a couple places.
The rest of changes look fine to me.
On Thu, Sep 13, 2012 at 7:54 PM, Carlo Kok <ck at remobjects.com> wrote:
> So the patch below completes the initial windows patch from Joao Matos
> which had some files missing.
>
> In the attached patch I've got some more changes:a
> * RegularExpression: uses a Regex* that's deleted/created on demand. The
> llvm::Regex class doesn't have a copy constructor and this makes some
> copying issues.
> * ConnectionFileDescriptor: didn't send/receive any data to a socket,
> making it always fail. Works for sockets now (both tcp and udp)
> * Debugger: seems gcc has an implied 0's after an array constant, vc++ did
> not and failed.
> * Mutex: tryacquire returns 0 for failure; the mutex wants it in reverse
> * ObjectContainerBSDArchive and ObjectFileMachO compile now.
> * PlatformRemoteGDBServer initializes WSA which is rquired on windows for
> sockets.
> * Some minor tweaks to get things to compile on vc++
>
> If approved I'll commit. This lldb uses new stuff in clang/llvm so it
> requires a matching version (i used 163821)
>
> Op 13-9-2012 20:40, Carlo Kok schreef:
>
>> Author: carlokok
>> Date: Thu Sep 13 13:40:53 2012
>> New Revision: 163822
>>
>> URL: http://llvm.org/viewvc/llvm-**project?rev=163822&view=rev<http://llvm.org/viewvc/llvm-project?rev=163822&view=rev>
>> Log:
>> All other missing files for the lldb Windows branch (from Initial windows
>> patch from Joao Matos)
>>
>>
>>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
>
--
João Matos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20120914/9a352f60/attachment.html>
More information about the lldb-commits
mailing list