[Lldb-commits] [lldb] r250331 - Make uses of /dev/null portable across OSes.

2015-10-14 Thread Zachary Turner via lldb-commits
Author: zturner Date: Wed Oct 14 16:37:36 2015 New Revision: 250331 URL: http://llvm.org/viewvc/llvm-project?rev=250331&view=rev Log: Make uses of /dev/null portable across OSes. Most platforms have "/dev/null". Windows has "nul". Instead of hardcoding the string /dev/null at various places, ma

Re: [Lldb-commits] [PATCH] D13754: Split Socket class into Tcp/Udp/DomainSocket subclasses.

2015-10-14 Thread Zachary Turner via lldb-commits
zturner added a comment. Can you compile on Windows and make sure it works? Also should you add a unittest for Udp Sockets? http://reviews.llvm.org/D13754 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

Re: [Lldb-commits] [PATCH] D13727: Add task pool to LLDB

2015-10-15 Thread Zachary Turner via lldb-commits
zturner added a comment. The main thought I had was just that it would make the code simpler and delegate more of the synchronization stuff to the library. But if we don't get any of that benefit then I guess there's no point in doing that. That said, I really dont' want to see 48 threads runn

Re: [Lldb-commits] [PATCH] D13727: Add task pool to LLDB

2015-10-15 Thread Zachary Turner via lldb-commits
zturner added a comment. In http://reviews.llvm.org/D13727#268066, @clayborg wrote: > In http://reviews.llvm.org/D13727#268053, @zturner wrote: > > > The main thought I had was just that it would make the code simpler and > > delegate more of the synchronization stuff to the library. But if we

[Lldb-commits] [lldb] r250444 - Introduce a `PythonFile` object, and use it everywhere.

2015-10-15 Thread Zachary Turner via lldb-commits
Author: zturner Date: Thu Oct 15 14:35:48 2015 New Revision: 250444 URL: http://llvm.org/viewvc/llvm-project?rev=250444&view=rev Log: Introduce a `PythonFile` object, and use it everywhere. Python file handling got an overhaul in Python 3, and it affects the way we have to interact with files. N

Re: [Lldb-commits] [PATCH] D13727: Add task pool to LLDB

2015-10-15 Thread Zachary Turner via lldb-commits
zturner added a comment. In http://reviews.llvm.org/D13727#268086, @clayborg wrote: > > Yes. But an implementation of std::async is either going to use a global > > thread pool or it's not. If it does there's no problem, and if it doesn't, > > it's going to create one thread for each call, an

Re: [Lldb-commits] [PATCH] D13754: Split Socket class into Tcp/Udp/DomainSocket subclasses.

2015-10-15 Thread Zachary Turner via lldb-commits
zturner accepted this revision. zturner added a comment. Looks good. http://reviews.llvm.org/D13754 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] D13788: Factor the execution of a test method into its own function to ensure proper cleanup

2015-10-15 Thread Zachary Turner via lldb-commits
zturner added a subscriber: zturner. zturner accepted this revision. zturner added a reviewer: zturner. Comment at: test/lldbtest.py:2548-2550 @@ -2546,1 +2547,5 @@ +# Ensure all the references to SB objects have gone away so that we can +# be sure that all the m

[Lldb-commits] [PATCH] D13794: Update SWIG typemaps to use new `PythonFile` wrapper

2015-10-15 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added reviewers: clayborg, granata.enrico. zturner added a subscriber: lldb-commits. Handling of Python files is different in Python 3, to the point that it is unwieldy to try to write native C API calls in places that need to use files. A new type of pyth

Re: [Lldb-commits] [PATCH] D13794: Update SWIG typemaps to use new `PythonFile` wrapper

2015-10-15 Thread Zachary Turner via lldb-commits
zturner updated this revision to Diff 37546. zturner added a comment. Fixed indentation http://reviews.llvm.org/D13794 Files: scripts/Python/python-typemaps.swig source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h Inde

Re: [Lldb-commits] [PATCH] D13727: Add task pool to LLDB

2015-10-16 Thread Zachary Turner via lldb-commits
zturner accepted this revision. zturner added a comment. Your example makes sense. So go ahead and delete the std async implementation for now. As Tamas said, its very easy to put in, so a better thing to do perhaps is once there's something doing actual parallel work, just test it in a real

Re: [Lldb-commits] [PATCH] D13727: Add task pool to LLDB

2015-10-16 Thread Zachary Turner via lldb-commits
zturner added a comment. Sorry, should have mentioned that the lgtm is contingent on Todd's concerns. I like the idea of having a setting in LLDB that controls the maximum number of threads to use for parallel work. We should probably set this at a very h igh level in dotest so that all insta

[Lldb-commits] [lldb] r250525 - Update SWIG typemaps to use `PythonFile`.

2015-10-16 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Oct 16 11:39:18 2015 New Revision: 250525 URL: http://llvm.org/viewvc/llvm-project?rev=250525&view=rev Log: Update SWIG typemaps to use `PythonFile`. Using the Python native C API is non-portable across Python versions, so this patch changes them to use the `PythonFile`

[Lldb-commits] [lldb] r250530 - Convert SWIG typemap string operations to PythonObjects.

2015-10-16 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Oct 16 12:51:49 2015 New Revision: 250530 URL: http://llvm.org/viewvc/llvm-project?rev=250530&view=rev Log: Convert SWIG typemap string operations to PythonObjects. Modified: lldb/trunk/scripts/Python/python-typemaps.swig lldb/trunk/source/Plugins/ScriptInterpret

[Lldb-commits] [lldb] r250531 - Fix linkage of `init_lldb` SWIG method in Python 3.

2015-10-16 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Oct 16 12:52:03 2015 New Revision: 250531 URL: http://llvm.org/viewvc/llvm-project?rev=250531&view=rev Log: Fix linkage of `init_lldb` SWIG method in Python 3. Modified: lldb/trunk/source/API/SystemInitializerFull.cpp lldb/trunk/source/Plugins/ScriptInterpreter/P

[Lldb-commits] [lldb] r250532 - Make swig generation python scripts python 3 compatible.

2015-10-16 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Oct 16 12:52:12 2015 New Revision: 250532 URL: http://llvm.org/viewvc/llvm-project?rev=250532&view=rev Log: Make swig generation python scripts python 3 compatible. Modified: lldb/trunk/scripts/Python/finishSwigPythonLLDB.py lldb/trunk/scripts/finishSwigWrapperCl

[Lldb-commits] [lldb] r250533 - Make some more of the LLDB/SWIG/Python glue Python 3 aware.

2015-10-16 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Oct 16 12:52:32 2015 New Revision: 250533 URL: http://llvm.org/viewvc/llvm-project?rev=250533&view=rev Log: Make some more of the LLDB/SWIG/Python glue Python 3 aware. Mostly this is just converting some print statements to print functions. Modified: lldb/trunk/scri

[Lldb-commits] [PATCH] D13836: Fix write-after-close of file descriptor in ScriptInterpreterPython

2015-10-16 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added reviewers: clayborg, granata.enrico. zturner added a subscriber: lldb-commits. When we acquire the GIL with `Locker`, we save off the current stdio handles, redirect them, and when we release the GIL we put the old handles back. This triggers a poten

[Lldb-commits] [lldb] r250710 - Py3'ify some of the examples that get run at startup.

2015-10-19 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 19 12:35:02 2015 New Revision: 250710 URL: http://llvm.org/viewvc/llvm-project?rev=250710&view=rev Log: Py3'ify some of the examples that get run at startup. Even though these are under examples/, they actually get loaded when LLDB starts up during initialization of

[Lldb-commits] [lldb] r250709 - Disable libxml2 on Windows for now.

2015-10-19 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 19 12:34:51 2015 New Revision: 250709 URL: http://llvm.org/viewvc/llvm-project?rev=250709&view=rev Log: Disable libxml2 on Windows for now. Newer versions of CMake include a "smarter" FindLibxml2 package. In theory this is a good thing, but on Windows it's now smart

[Lldb-commits] [PATCH] D13879: Change print statements to print function calls

2015-10-19 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added a reviewer: tfiala. zturner added a subscriber: lldb-commits. This patch was generating by running `2to3` on the files in the lldb/test directory. This patch should be NFC, but it does introduce the `from __future__ import print_function` l

Re: [Lldb-commits] [PATCH] D13879: Change print statements to print function calls

2015-10-19 Thread Zachary Turner via lldb-commits
zturner updated this revision to Diff 37808. zturner added a comment. I missed a few files, this gets everything. (Still only print statements) http://reviews.llvm.org/D13879 Files: test/dosep.py test/dotest.py test/lldbtest.py Index: test/lldbtest.py ===

Re: [Lldb-commits] [PATCH] D13879: Change print statements to print function calls

2015-10-19 Thread Zachary Turner via lldb-commits
zturner updated this revision to Diff 37811. zturner added a comment. Sorry, uploaded the wrong patch the second time. This should be the one that gets everything. http://reviews.llvm.org/D13879 Files: test/bench.py test/curses_results.py test/dosep.py test/dotest.py test/dotest_arg

[Lldb-commits] [PATCH] D13880: Create an lldb/third_party folder, and add Python module 'six' to it.

2015-10-19 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added reviewers: tfiala, clayborg, dberlin. zturner added a subscriber: lldb-commits. `six` is a Python module licensed under MIT which provides a compatibility layer between Python 2 and Python 3. You can read about it at the project's homepage, here. ht

[Lldb-commits] [lldb] r250762 - Run py2to3 on lldb/scripts folder.

2015-10-19 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 19 18:45:25 2015 New Revision: 250762 URL: http://llvm.org/viewvc/llvm-project?rev=250762&view=rev Log: Run py2to3 on lldb/scripts folder. This mostly fixes some print statements, but there were also some instances of dict.iteritems() lingering that this found. Modi

[Lldb-commits] [lldb] r250763 - Convert print statements to print function calls.

2015-10-19 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 19 18:45:41 2015 New Revision: 250763 URL: http://llvm.org/viewvc/llvm-project?rev=250763&view=rev Log: Convert print statements to print function calls. This patch was generating by running `2to3` on the files in the lldb/test directory. This patch should be NFC, b

Re: [Lldb-commits] [PATCH] D13879: Change print statements to print function calls

2015-10-19 Thread Zachary Turner via lldb-commits
zturner closed this revision. zturner added a comment. Submitted in http://reviews.llvm.org/rL250763 http://reviews.llvm.org/D13879 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] D13880: Create an lldb/third_party folder, and add Python module 'six' to it.

2015-10-19 Thread Zachary Turner via lldb-commits
zturner added a comment. Todd, do you have any good ideas on how to organize this and make it play nicely with python's module / package system? `dotest` is just an arbitrary script under lldb/test and is not part of any installed package or anything. At the same time, third party code needs

Re: [Lldb-commits] [PATCH] D13836: Fix write-after-close of file descriptor in ScriptInterpreterPython

2015-10-20 Thread Zachary Turner via lldb-commits
zturner added a comment. Greg, Enrico, anyone have a chance to take a look at this? I think it's probably just a rubber stamp but rather err on the side of caution. http://reviews.llvm.org/D13836 ___ lldb-commits mailing list lldb-commits@lists.ll

Re: [Lldb-commits] [lldb] r250832 - Revert "Make dwarf parsing multi-threaded"

2015-10-20 Thread Zachary Turner via lldb-commits
This is kind of why I pushed back against this in the first place :-/ It's hard to get right. I still wish we could find a way to use standard library facilities for this, either by splitting the compile units into hardware_concurrency chunks, or kicking off no more than hardware_concurrency comp

[Lldb-commits] [PATCH] D13906: Introduce a mechanism for sharing code across lldb/test and lldb/scripts

2015-10-20 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added a reviewer: tfiala. zturner added a subscriber: lldb-commits. We have a lot of Python code in test and scripts that in theory could be reused amongst the two. Until now there is no mechanism to support this because Python's module / packaging system

[Lldb-commits] [lldb] r250838 - Fix potential file i/o problem with python handles.

2015-10-20 Thread Zachary Turner via lldb-commits
Author: zturner Date: Tue Oct 20 12:38:49 2015 New Revision: 250838 URL: http://llvm.org/viewvc/llvm-project?rev=250838&view=rev Log: Fix potential file i/o problem with python handles. Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp lldb/trunk/source/Pl

Re: [Lldb-commits] [PATCH] D13880: Create an lldb/third_party folder, and add Python module 'six' to it.

2015-10-20 Thread Zachary Turner via lldb-commits
zturner added a comment. Greg, do you have any concerns here? http://reviews.llvm.org/D13880 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D13912: Make uses of metaclasses portable across Python versions

2015-10-20 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added a reviewer: tfiala. zturner added a subscriber: lldb-commits. This uses the `six.add_metaclass()` decorator for portable metaclass specification. http://reviews.llvm.org/D13912 Files: test/dotest.py test/lldbtest.py Index: test/lldbtest.py =

Re: [Lldb-commits] [PATCH] D13912: Make uses of metaclasses portable across Python versions

2015-10-20 Thread Zachary Turner via lldb-commits
zturner added a comment. Thanks. This is still blocked on my 2 earlier CLs (one adding six to the repo, and the other hooking up six to be recognized by dotest). If you get a chance can you take a look at those? http://reviews.llvm.org/D13912 __

Re: [Lldb-commits] [PATCH] D13880: Create an lldb/third_party folder, and add Python module 'six' to it.

2015-10-20 Thread Zachary Turner via lldb-commits
zturner added a comment. Yea, I actually did something very similar to that. Check out http://reviews.llvm.org/D13906 http://reviews.llvm.org/D13880 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

Re: [Lldb-commits] [PATCH] D13912: Make uses of metaclasses portable across Python versions

2015-10-20 Thread Zachary Turner via lldb-commits
zturner added a comment. Thanks! http://reviews.llvm.org/D13912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] r250859 - Use six to portably assign metaclasses in Python 2 and 3.

2015-10-20 Thread Zachary Turner via lldb-commits
Author: zturner Date: Tue Oct 20 16:06:05 2015 New Revision: 250859 URL: http://llvm.org/viewvc/llvm-project?rev=250859&view=rev Log: Use six to portably assign metaclasses in Python 2 and 3. Modified: lldb/trunk/test/dotest.py lldb/trunk/test/lldbtest.py Modified: lldb/trunk/test/dotest

[Lldb-commits] [lldb] r250857 - Add `six` Python module to lldb/third_party.

2015-10-20 Thread Zachary Turner via lldb-commits
Author: zturner Date: Tue Oct 20 16:05:49 2015 New Revision: 250857 URL: http://llvm.org/viewvc/llvm-project?rev=250857&view=rev Log: Add `six` Python module to lldb/third_party. Six is a python module designed to smooth the process of porting Python 2 code to Python 3. Specifically, six provide

[Lldb-commits] [lldb] r250858 - Introduce a mechanism for reusing Python modules out of tree.

2015-10-20 Thread Zachary Turner via lldb-commits
Author: zturner Date: Tue Oct 20 16:05:57 2015 New Revision: 250858 URL: http://llvm.org/viewvc/llvm-project?rev=250858&view=rev Log: Introduce a mechanism for reusing Python modules out of tree. Right now our Python code does not all share a common root. Tests and scripts both contain python co

[Lldb-commits] [PATCH] D13921: Use six to portably handle module renames

2015-10-20 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added a reviewer: tfiala. zturner added a subscriber: lldb-commits. http://reviews.llvm.org/D13921 Files: test/api/check_public_api_headers/TestPublicAPIHeaders.py test/api/multiple-debuggers/TestMultipleDebuggers.py test/api/multithreaded/TestMultithr

Re: [Lldb-commits] [lldb] r250874 - Revert r250872 in source/Plugins/Disassembler to fix MSVC builds failures.

2015-10-20 Thread Zachary Turner via lldb-commits
You can probably put this CL back in, just make sure you #include the appropriate file from LLVM in the header file. On Tue, Oct 20, 2015 at 6:44 PM Eugene Zelenko via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: eugenezelenko > Date: Tue Oct 20 20:42:15 2015 > New Revision: 25087

Re: [Lldb-commits] [lldb] r250870 - When a REPL creates a new target for itself, it is that target's REPL.

2015-10-20 Thread Zachary Turner via lldb-commits
This is a good example of where a "null repl" would be great for testing. You don't need a language to verify, for example, that when a repl creates a new target for itself, it is correcly set as the repl for that target. And even if you had a language specific repl, that wouldn't really be the rig

Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-21 Thread Zachary Turner via lldb-commits
zturner added a subscriber: zturner. Comment at: include/lldb/Core/Timer.h:89 @@ +88,3 @@ + +static thread_local unsigned g_depth; + clayborg wrote: > Not sure if all platforms support thread_local correctly. MacOSX might not. I > also spoke with some compile

[Lldb-commits] [lldb] r250915 - Use six to portably handle module renames in Python 2 and 3

2015-10-21 Thread Zachary Turner via lldb-commits
Author: zturner Date: Wed Oct 21 12:48:52 2015 New Revision: 250915 URL: http://llvm.org/viewvc/llvm-project?rev=250915&view=rev Log: Use six to portably handle module renames in Python 2 and 3 Modified: lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py lldb/trunk/test/

Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-21 Thread Zachary Turner via lldb-commits
zturner added a comment. Sad as it may seem, I actually think we may *need* this `LLDB_THREAD_LOCAL` at some point in the future. The reason is that there is at least one place in LLDB (I think it might even be in `Timer`, but it's been a while since I found this) that relies on thread local d

Re: [Lldb-commits] [PATCH] D13073: Add an expression parser for Go

2015-10-21 Thread Zachary Turner via lldb-commits
On Tue, Oct 20, 2015 at 7:40 PM Jim Ingham via lldb-commits < lldb-commits@lists.llvm.org> wrote: > jingham added a comment. > > The generic parts of this change look fine to me, with a few inlined style > comments. > > I didn't read the Go specific parts of this in detail, I assume you're > going

Re: [Lldb-commits] [PATCH] D13968: [LLDB] Attempt to fix MSVC builds after rL250966

2015-10-21 Thread Zachary Turner via lldb-commits
zturner accepted this revision. zturner added a comment. This revision is now accepted and ready to land. lgtm. In the future you don't need to ask for a review to unbreak a build. Repository: rL LLVM http://reviews.llvm.org/D13968 ___ lldb-comm

Re: [Lldb-commits] [PATCH] D13968: [LLDB] Attempt to fix MSVC builds after rL250966

2015-10-22 Thread Zachary Turner via lldb-commits
I would have done this last night but I didn't have a machine handy. I'll test it out now and commit if it fixes. And yea, in the future please just commit fixes. On Thu, Oct 22, 2015 at 6:04 AM Siva Chandra wrote: > sivachandra added a subscriber: sivachandra. > sivachandra added a comment. >

Re: [Lldb-commits] [PATCH] D13968: [LLDB] Attempt to fix MSVC builds after rL250966

2015-10-22 Thread Zachary Turner via lldb-commits
zturner added a subscriber: zturner. zturner added a comment. I would have done this last night but I didn't have a machine handy. I'll test it out now and commit if it fixes. And yea, in the future please just commit fixes. Repository: rL LLVM http://reviews.llvm.org/D13968

[Lldb-commits] [lldb] r251047 - Remove special case logic for finding 3rd party libs

2015-10-22 Thread Zachary Turner via lldb-commits
Author: zturner Date: Thu Oct 22 14:55:18 2015 New Revision: 251047 URL: http://llvm.org/viewvc/llvm-project?rev=251047&view=rev Log: Remove special case logic for finding 3rd party libs Modified: lldb/trunk/lldb_shared_base.py lldb/trunk/test/dotest.py Modified: lldb/trunk/lldb_shared_b

[Lldb-commits] [lldb] r251060 - Python 3 porting - Wrap returns from map() in list()

2015-10-22 Thread Zachary Turner via lldb-commits
Author: zturner Date: Thu Oct 22 15:39:59 2015 New Revision: 251060 URL: http://llvm.org/viewvc/llvm-project?rev=251060&view=rev Log: Python 3 porting - Wrap returns from map() in list() Under Python 2 this has no effect, since map() returns a list. In Python 3 map() returns an iterable, so wrapp

Re: [Lldb-commits] [PATCH] D14020: Port the python api decorator to use test categories

2015-10-23 Thread Zachary Turner via lldb-commits
zturner added a comment. Could you call this something less generic than `categories`? The name of the decorator should be descriptive enough to hint that it can only be applied to test methods. `test_categories` even. http://reviews.llvm.org/D14020 ___

Re: [Lldb-commits] [PATCH] D14020: Port the python api decorator to use test categories

2015-10-23 Thread Zachary Turner via lldb-commits
Yea that sounds good too. On Fri, Oct 23, 2015 at 10:12 AM Pavel Labath wrote: > labath added a comment. > > test_categories is the name of .py file. :/ How about > `add_test_categories` ? > > > http://reviews.llvm.org/D14020 > > > > ___ lldb-commits m

[Lldb-commits] [lldb] r251128 - Remove argparse_compat.

2015-10-23 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Oct 23 12:53:30 2015 New Revision: 251128 URL: http://llvm.org/viewvc/llvm-project?rev=251128&view=rev Log: Remove argparse_compat. We don't support versions of Python less than 2.7 Removed: lldb/trunk/test/argparse_compat.py Modified: lldb/trunk/test/dotest_arg

[Lldb-commits] [lldb] r251129 - Python3 - Wrap more statements in calls to list()

2015-10-23 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Oct 23 12:53:51 2015 New Revision: 251129 URL: http://llvm.org/viewvc/llvm-project?rev=251129&view=rev Log: Python3 - Wrap more statements in calls to list() Modified: lldb/trunk/test/attic/tester.py lldb/trunk/test/dosep.py lldb/trunk/test/dotest.py lldb

[Lldb-commits] [lldb] r251130 - Disable a compiler warning on MSVC.

2015-10-23 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Oct 23 12:54:00 2015 New Revision: 251130 URL: http://llvm.org/viewvc/llvm-project?rev=251130&view=rev Log: Disable a compiler warning on MSVC. This is caused by a bug in MSVC's library implementation. It's fixed in the next version of the compiler, but for now the only

[Lldb-commits] [PATCH] D14023: Fix uses of range / xrange for Python 3

2015-10-23 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added a reviewer: tfiala. zturner added a subscriber: lldb-commits. Herald added subscribers: srhines, danalbert, tberghammer. Hi Todd, I've been putting most of this stuff in withouty review, but I figure every once in a while I should pass one your way as

Re: [Lldb-commits] [PATCH] D14023: Fix uses of range / xrange for Python 3

2015-10-23 Thread Zachary Turner via lldb-commits
zturner added inline comments. Comment at: test/lang/go/types/TestGoASTContext.py:134 @@ -131,3 +133,3 @@ self.assertEqual(5, v.GetNumChildren()) -for i in xrange(5): +for i in six.moves.xrange(5): self.assertEqual(str(i + 1), v.GetChildAtInde

[Lldb-commits] [lldb] r251139 - Make uses of unicode literals portable.

2015-10-23 Thread Zachary Turner via lldb-commits
Author: zturner Date: Fri Oct 23 14:52:36 2015 New Revision: 251139 URL: http://llvm.org/viewvc/llvm-project?rev=251139&view=rev Log: Make uses of unicode literals portable. Six provides six.u() which resolves to either u"" or "" depending on Python version, and and six.unichr() which resolves to

[Lldb-commits] [PATCH] D14028: Convert long to int and portably detect integral types

2015-10-23 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added a reviewer: tfiala. zturner added a subscriber: lldb-commits. In a few of the examples fixed up here, the distinction between long and int was not important here. As a result, I converted those to use int instead of long everywhere to make the code s

Re: [Lldb-commits] [PATCH] D14029: [TestBreakpointCommand] Fix after r251121

2015-10-23 Thread Zachary Turner via lldb-commits
Can you leave the from __future__ import print_function at the top? That's orthogonal to changing the dynamically executed code. I can reproduce this problem by running LLDB in 2.7 and entering the embedded interpreter and typing print("foo", file=sys.stdout). So I can probably fix that and this

[Lldb-commits] [lldb] r251302 - Fix usages of range() and xrange() for Python 3.

2015-10-26 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 26 11:49:57 2015 New Revision: 251302 URL: http://llvm.org/viewvc/llvm-project?rev=251302&view=rev Log: Fix usages of range() and xrange() for Python 3. Modified: lldb/trunk/test/example/TestSequenceFunctions.py lldb/trunk/test/functionalities/inferior-assert

[Lldb-commits] [lldb] r251308 - Fix tabs and spaces in one of the python files.

2015-10-26 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 26 11:51:36 2015 New Revision: 251308 URL: http://llvm.org/viewvc/llvm-project?rev=251308&view=rev Log: Fix tabs and spaces in one of the python files. Modified: lldb/trunk/examples/synthetic/gnu_libstdcpp.py Modified: lldb/trunk/examples/synthetic/gnu_libstdcpp

[Lldb-commits] [lldb] r251303 - Convert deprecated unittest method names.

2015-10-26 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 26 11:50:39 2015 New Revision: 251303 URL: http://llvm.org/viewvc/llvm-project?rev=251303&view=rev Log: Convert deprecated unittest method names. Plural methods were long deprecated, and in Python 3 they are gone. Convert to the actual supported method names. Modifi

[Lldb-commits] [lldb] r251305 - Convert `long` to `int`, and portably detect all integral types.

2015-10-26 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 26 11:51:09 2015 New Revision: 251305 URL: http://llvm.org/viewvc/llvm-project?rev=251305&view=rev Log: Convert `long` to `int`, and portably detect all integral types. Modified: lldb/trunk/test/functionalities/abbreviation/TestCommonShortSpellings.py lldb/tr

[Lldb-commits] [lldb] r251306 - Python3 - Change sys.maxint to sys.maxsize.

2015-10-26 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 26 11:51:20 2015 New Revision: 251306 URL: http://llvm.org/viewvc/llvm-project?rev=251306&view=rev Log: Python3 - Change sys.maxint to sys.maxsize. Python3 has no analogue to sys.maxint since ints in Python 3 have arbitrary size. However, the distinction was not act

[Lldb-commits] [lldb] r251307 - Wrap call to zip() in list()

2015-10-26 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 26 11:51:28 2015 New Revision: 251307 URL: http://llvm.org/viewvc/llvm-project?rev=251307&view=rev Log: Wrap call to zip() in list() Modified: lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py Modified: lldb/trunk/test/terminal/TestSTTYBeforeAndAfter.py URL: h

[Lldb-commits] [lldb] r251304 - Python3 - Change `dict.has_key(x)` to `x in dict`

2015-10-26 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 26 11:50:51 2015 New Revision: 251304 URL: http://llvm.org/viewvc/llvm-project?rev=251304&view=rev Log: Python3 - Change `dict.has_key(x)` to `x in dict` Modified: lldb/trunk/test/functionalities/tty/TestTerminal.py lldb/trunk/test/plugins/builder_base.py Mo

Re: [Lldb-commits] [PATCH] D14085: Make Socket to support plugin interface

2015-10-26 Thread Zachary Turner via lldb-commits
zturner added a subscriber: zturner. zturner requested changes to this revision. zturner added a reviewer: zturner. zturner added a comment. This revision now requires changes to proceed. I'm not sure I agree with this change. The interface to programming with socket is by definition a property

[Lldb-commits] [lldb] r251328 - Remove use of octal literals.

2015-10-26 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 26 13:48:14 2015 New Revision: 251328 URL: http://llvm.org/viewvc/llvm-project?rev=251328&view=rev Log: Remove use of octal literals. Python 3 has a different syntax for octal literals than Python 2 and they are incompatible with each other. Six doesn't provide a tr

[Lldb-commits] [lldb] r251329 - Python 3: Convert uses of `callable(x)` to `six.callable(x)`.

2015-10-26 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Oct 26 13:48:24 2015 New Revision: 251329 URL: http://llvm.org/viewvc/llvm-project?rev=251329&view=rev Log: Python 3: Convert uses of `callable(x)` to `six.callable(x)`. Modified: lldb/trunk/test/dotest.py lldb/trunk/test/lldbcurses.py lldb/trunk/test/lldbtes

Re: [Lldb-commits] [PATCH] D14085: Make Socket to support plugin interface

2015-10-26 Thread Zachary Turner via lldb-commits
zturner added a comment. I still think implementation should be in Host as well. If the idea is to simplify the creation scheme, then you could create an enum: enum class SocketType { Tcp, Udp, UnixDomain }; and provide a static method on SocketBase like this: class So

Re: [Lldb-commits] [PATCH] D14085: Make Socket to support plugin interface

2015-10-26 Thread Zachary Turner via lldb-commits
zturner added a comment. I think most of the time they are used in a Connection class, but I don't think it's necessarily guaranteed they will always be that way. I can think of at least one use case in the future where we will need to open a socket to a server we don't control and stream some

Re: [Lldb-commits] [PATCH] D14085: Add Socket::Create factory method which uses socket scheme (tcp, unix, ..) to find an appropriate implementation class.

2015-10-26 Thread Zachary Turner via lldb-commits
zturner added a comment. Do we need this `GetScheme()` method? And instead of having `Create` take a string, couldn't it just take a `SocketProtocol` instead? It seems like the logic of converting the string to the enum should be done in the `Acceptor` class, as this URI format is defined by

[Lldb-commits] [PATCH] D14131: Preparation for making a Python package out of lldb's Python code

2015-10-27 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added reviewers: clayborg, tfiala. zturner added a subscriber: lldb-commits. See the thread in lldb-dev for context. After this patch, the remaining piece of work is to literally move `lldb/test` to `lldb/packages/Python/lldbsuite/test` and apply 1 or 2 fix

Re: [Lldb-commits] [PATCH] D14131: Preparation for making a Python package out of lldb's Python code

2015-10-27 Thread Zachary Turner via lldb-commits
zturner updated this revision to Diff 38595. zturner added a comment. Moved `progress.py` from `lldb/test` to `lldb/third_party`. This seems to be a third party module that had also snuck into the test folder. It's used by both `unittest2` and `dosep.py` so it has to be in `third_party` to be

Re: [Lldb-commits] [PATCH] D14131: Preparation for making a Python package out of lldb's Python code

2015-10-27 Thread Zachary Turner via lldb-commits
zturner updated this revision to Diff 38600. zturner added a comment. Fixed `lldbsuite` module initialization. I'm having to do this all by eye / memory since this code isn't actually exercised yet until the move actually happens. http://reviews.llvm.org/D14131 Files: packages/Python/lldbs

[Lldb-commits] [lldb] r251460 - Preparation for turning lldbsuite into a Python package.

2015-10-27 Thread Zachary Turner via lldb-commits
Author: zturner Date: Tue Oct 27 17:33:47 2015 New Revision: 251460 URL: http://llvm.org/viewvc/llvm-project?rev=251460&view=rev Log: Preparation for turning lldbsuite into a Python package. The idea behind this patch is to expose the meat of LLDB's Python infrastructure (test suite, scripts, etc

Re: [Lldb-commits] [PATCH] D14131: Preparation for making a Python package out of lldb's Python code

2015-10-27 Thread Zachary Turner via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251460: Preparation for turning lldbsuite into a Python package. (authored by zturner). Changed prior to commit: http://reviews.llvm.org/D14131?vs=38600&id=38606#toc Repository: rL LLVM http://revie

[Lldb-commits] [lldb] r251462 - Fix line endings to be LF instead of CRLF.

2015-10-27 Thread Zachary Turner via lldb-commits
Author: zturner Date: Tue Oct 27 17:54:46 2015 New Revision: 251462 URL: http://llvm.org/viewvc/llvm-project?rev=251462&view=rev Log: Fix line endings to be LF instead of CRLF. Modified: lldb/trunk/packages/Python/lldbsuite/__init__.py lldb/trunk/packages/Python/lldbsuite/test/__init__.py

Re: [Lldb-commits] [PATCH] D14136: Refactor Windows process plugin to enable sharing of code between live and post-mortem debugging

2015-10-28 Thread Zachary Turner via lldb-commits
zturner added inline comments. Comment at: source/Plugins/Process/Windows/Common/ProcessWindowsForward.h:20 @@ +19,1 @@ +#endif \ No newline at end of file Put a newline here Comment at: source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump

[Lldb-commits] [lldb] r251544 - Try to fix the linux buildbot.

2015-10-28 Thread Zachary Turner via lldb-commits
Author: zturner Date: Wed Oct 28 14:18:53 2015 New Revision: 251544 URL: http://llvm.org/viewvc/llvm-project?rev=251544&view=rev Log: Try to fix the linux buildbot. It's complaining that it doesn't under the "import" command, so I guess I need this hashbang at the beginning so that it knows it's

[Lldb-commits] [PATCH] D14157: Make dosep correctly invoke the top level script when doing the multiprocessing fork

2015-10-28 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added a reviewer: tfiala. zturner added a subscriber: lldb-commits. This patch disables the ability to run `packages/Python/lldbsuite/test/dotest.py` as a standalone script by explicitly erroring out if it detects that to be the case. Then, it fixes up the

[Lldb-commits] [PATCH] D14159: Add a Visual Studio solution for LLDB's Python code

2015-10-28 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added a reviewer: amccarth. zturner added a subscriber: lldb-commits. Herald added subscribers: srhines, danalbert, tberghammer. If you have PTVS [https://github.com/Microsoft/PTVS] installed, you can open this solution in Visual Studio and get an integrated

[Lldb-commits] [PATCH] D14162: Create Python library `seven` in lldbsuite.support

2015-10-28 Thread Zachary Turner via lldb-commits
zturner created this revision. zturner added a reviewer: tfiala. zturner added a subscriber: lldb-commits. The purpose of this file is to fill in the gaps where `six` is lacking support for some operation that we need. Initially this just provides a replacement for the `commands` module which is

Re: [Lldb-commits] [PATCH] D14163: Address another race condition running tests on Windows

2015-10-28 Thread Zachary Turner via lldb-commits
zturner added inline comments. Comment at: packages/Python/lldbsuite/test/lldbtest.py:1823-1830 @@ -1822,3 +1822,10 @@ -os.rename(src, dst) +try: +os.rename(src, dst) +except: +

Re: [Lldb-commits] [PATCH] D14162: Create Python library `seven` in lldbsuite.support

2015-10-28 Thread Zachary Turner via lldb-commits
zturner added inline comments. Comment at: packages/Python/lldbsuite/support/seven.py:12 @@ +11,3 @@ +import subprocess +return (0, subprocess.check_output(command, shell=True)) +except subprocess.CalledProcessError as e: tfiala wro

Re: [Lldb-commits] [lldb] r251681 - Added real editline tests.

2015-10-29 Thread Zachary Turner via lldb-commits
On Thu, Oct 29, 2015 at 7:57 PM Todd Fiala via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: tfiala > Date: Thu Oct 29 21:54:52 2015 > New Revision: 251681 > > URL: http://llvm.org/viewvc/llvm-project?rev=251681&view=rev > Log: > Added real editline tests. > > These are two simple t

Re: [Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-10-29 Thread Zachary Turner via lldb-commits
Wow. That's a weird problem. Thanks for finding it! Would it work if we move the definition of the `lldbtest_config` class into lldbsuite/test/__init__.py? This way the configuration should be part of the global package state of the lldbsuite.test package, which all the tests are already member

Re: [Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-10-30 Thread Zachary Turner via lldb-commits
I'm also still a little confused why this worked before my patch. How is unittest2 importing the individual tests in a way that behaves differently when dotest is a package (now) versus a standalone script (before)? On Thu, Oct 29, 2015 at 11:31 PM Zachary Turner wrote: > Wow. That's a weird p

Re: [Lldb-commits] [lldb] r251681 - Added real editline tests.

2015-10-30 Thread Zachary Turner via lldb-commits
BTW, can you add EditlineTests.cpp to unittests/Editline/CMakeLists.txt? Currently this unittest only appears to be enabled for the Xcode build (and it might actually break the CMake build since CMake complains if there is a cpp file that is not added to a target) On Fri, Oct 30, 2015 at 9:43 AM T

Re: [Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-10-30 Thread Zachary Turner via lldb-commits
Can you give me a command line which will reproduce the original problem? Because I ran through the entire test suite and nothing failed, so I want to make sure we're doing the same thing. I'm still a little confused about how this happens, but I plan to look into it when I'm back on Monday and se

Re: [Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-10-30 Thread Zachary Turner via lldb-commits
Thanks. I'll follow up next week after I do some investigation On Fri, Oct 30, 2015 at 1:25 PM Enrico Granata wrote: > I think what I was doing is be in lldb/test and do > > $ ./dotest.py ../packages/python/lldbsuite/functionalities/completion > > On Oct 30, 2015, at 12:22 PM, Zachary Turner w

Re: [Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-11-02 Thread Zachary Turner via lldb-commits
I looked into this some more, and unfortunately I can't reproduce it. That being said, I'm not convinced this patch fixes anything. The reason is that when you import something, whether it be through the `__import__` function or the `import` statement, the module itself is cached in `sys.modules`

[Lldb-commits] [lldb] r251819 - Make dosep correctly invoke the top-level script when forking out

2015-11-02 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Nov 2 13:19:49 2015 New Revision: 251819 URL: http://llvm.org/viewvc/llvm-project?rev=251819&view=rev Log: Make dosep correctly invoke the top-level script when forking out packages/Python/lldbsuite is now a Python package, and it relies on its __init__.py being called

Re: [Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-11-02 Thread Zachary Turner via lldb-commits
). > > Is that correct or I am misunderstanding something? > > pl > > > On 2 November 2015 at 11:11, Zachary Turner via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >> I looked into this some more, and unfortunately I can't reproduce it. >> Tha

Re: [Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-11-02 Thread Zachary Turner via lldb-commits
a >> check-lldb), and therefore we will remove it once everybody gets a chance >> to migrate (I have already changed our buildbots to not use it). >> >> Is that correct or I am misunderstanding something? >> >> pl >> >> >> On 2 November 2015 at 11:

Re: [Lldb-commits] [lldb] r251678 - Some test cases that need the lldbExec path were failing because lldbExec was turning out to be None even though it was being validly set by dotest.py

2015-11-02 Thread Zachary Turner via lldb-commits
s a chance >>> to migrate (I have already changed our buildbots to not use it). >>> >>> Is that correct or I am misunderstanding something? >>> >>> pl >>> >>> >>> On 2 November 2015 at 11:11, Zachary Turner via lldb-commits <

[Lldb-commits] [lldb] r251822 - Remove the __import__ hack of lldbtest_config.

2015-11-02 Thread Zachary Turner via lldb-commits
Author: zturner Date: Mon Nov 2 13:38:58 2015 New Revision: 251822 URL: http://llvm.org/viewvc/llvm-project?rev=251822&view=rev Log: Remove the __import__ hack of lldbtest_config. I think the underlying problem was fixed by r251819, but I can't reproduce the problem. So this is to check whether

<    5   6   7   8   9   10   11   12   13   14   >