The regex changes look fine, but it would be best to add the copy constructor instead of allocating it on the heap.<div><br></div><div><div>+#ifdef _WIN32</div><div> bytes_sent = ::sendto (m_fd_send, </div>
<div>+ (char*)src, </div><div>+ src_len, </div><div>+ 0, </div><div>+ m_udp_send_sockaddr, </div>
<div>+ m_udp_send_sockaddr.GetLength());</div><div>+#else</div><div><br></div><div>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.</div>
<div><br></div><div>+//#include <ar.h></div><div><br></div><div>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.</div>
<div><br></div><div><div>+#else</div><div>+ abort();</div><div>+#endif</div></div><div><br></div><div>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?</div>
<div><br></div><div><div>+#ifdef _WIN32</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>WSADATA dummy;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>WSAStartup(0x202, &dummy);</div>
<div>+#endif</div></div><div><br></div><div>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.</div>
<div><br></div><div><div>+#ifdef _WIN32</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>Sleep (100);</div><div>+#else</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>usleep (100000);</div>
<div>+#endif</div></div><div><br></div><div>We should add an abstracted function for this as sleeping seems to be used on a couple places.</div><div><br></div><div>The rest of changes look fine to me.</div><div><br></div>
<div><br></div><div><br></div><div><br></div><div><br></div><div> </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Thu, Sep 13, 2012 at 7:54 PM, Carlo Kok <span dir="ltr"><<a href="mailto:ck@remobjects.com" target="_blank">ck@remobjects.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So the patch below completes the initial windows patch from Joao Matos which had some files missing.<br>
<br>
In the attached patch I've got some more changes:a<br>
* 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.<br>
* ConnectionFileDescriptor: didn't send/receive any data to a socket, making it always fail. Works for sockets now (both tcp and udp)<br>
* Debugger: seems gcc has an implied 0's after an array constant, vc++ did not and failed.<br>
* Mutex: tryacquire returns 0 for failure; the mutex wants it in reverse<br>
* ObjectContainerBSDArchive and ObjectFileMachO compile now.<br>
* PlatformRemoteGDBServer initializes WSA which is rquired on windows for sockets.<br>
* Some minor tweaks to get things to compile on vc++<br>
<br>
If approved I'll commit. This lldb uses new stuff in clang/llvm so it requires a matching version (i used 163821)<br>
<br>
Op 13-9-2012 20:40, Carlo Kok schreef:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: carlokok<br>
Date: Thu Sep 13 13:40:53 2012<br>
New Revision: 163822<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=163822&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=163822&view=rev</a><br>
Log:<br>
All other missing files for the lldb Windows branch (from Initial windows patch from Joao Matos)<br>
<br>
<br>
</blockquote>
<br>
<br>_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>João Matos<br>
</div></div>