[Lldb-commits] [PATCH] Make lldb -P work on Windows
Todd Fiala
tfiala at google.com
Fri Jul 18 12:13:09 PDT 2014
That last comment was related to this here:
Okay, down to one test failure on MacOSX. Looking at that in a moment.
It’s running fine on MacOSX if you chop off that section I indicated
earlier (which is how I tested it here).
The complete test/dotest.py diff I was using on MacOSX was this:
Index: test/dotest.py
===================================================================
--- test/dotest.py (revision 213388)
+++ test/dotest.py (working copy)
@@ -1004,17 +1004,17 @@
# If our lldb supports the -P option, use it to find the python path:
init_in_python_dir = 'lldb/__init__.py'
- import pexpect
lldb_dash_p_result = None
if lldbHere:
- lldb_dash_p_result = pexpect.run("%s -P"%(lldbHere))
+ lldb_dash_p_result = subprocess.check_output("%s
-P"%(lldbHere), stderr=subprocess.STDOUT)
elif lldbExec:
- lldb_dash_p_result = pexpect.run("%s -P"%(lldbExec))
+ lldb_dash_p_result = subprocess.check_output("%s
-P"%(lldbExec), stderr=subprocess.STDOUT)
- if lldb_dash_p_result and not
lldb_dash_p_result.startswith(("<", "lldb: invalid option:")):
+ if lldb_dash_p_result and not
lldb_dash_p_result.startswith(("<", "lldb: invalid option:")) \
+ and not
lldb_dash_p_result.startswith("Traceback"):
lines = lldb_dash_p_result.splitlines()
- if len(lines) == 1 and
os.path.isfile(os.path.join(lines[0], init_in_python_dir)):
+ if len(lines) >= 1 and
os.path.isfile(os.path.join(lines[0], init_in_python_dir)):
lldbPath = lines[0]
if "freebsd" in sys.platform or "linux" in sys.platform:
os.environ['LLDB_LIB_DIR'] =
os.path.join(lldbPath, '..', '..')
Note the Linux subprocess issue still exists with this tweak.
On Fri, Jul 18, 2014 at 12:10 PM, Todd Fiala <tfiala at google.com> wrote:
> The MacOSX failure you can ignore. It wasn't related and runs fine over
> here now.
>
>
> On Fri, Jul 18, 2014 at 11:54 AM, Todd Fiala <tfiala at google.com> wrote:
>
>> Okay, down to one test failure on MacOSX. Looking at that in a moment.
>>
>> Now on Linux. Getting issues with subprocess calls. The first one looks
>> like this (and none of the tests are making it to the running phase there):
>>
>> File "/mnt/ssd/work/macosx.sync/mbp-svn/build-debug/../llvm/tools/lldb/test/dotest.py", line 1218, in <module>
>> setupSysPath()
>> File "/mnt/ssd/work/macosx.sync/mbp-svn/build-debug/../llvm/tools/lldb/test/dotest.py", line 1010, in setupSysPath
>> lldb_dash_p_result = subprocess.check_output("%s -P"%(lldbHere), stderr=subprocess.STDOUT)
>> File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
>> process = Popen(stdout=PIPE, *popenargs, **kwargs)
>> File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
>> errread, errwrite)
>> File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
>> raise child_exception
>> OSError: [Errno 2] No such file or directory
>>
>> Back after I look into those.
>>
>>
>>
>> On Fri, Jul 18, 2014 at 11:39 AM, Todd Fiala <tfiala at google.com> wrote:
>>
>>> Yep I'll try that out now.
>>>
>>>
>>> On Fri, Jul 18, 2014 at 11:38 AM, Zachary Turner <zturner at google.com>
>>> wrote:
>>>
>>>> Thanks, good catch. Can you confirm that it works without that? If so
>>>> I'll make the necessary adjustment locally but no need to re-upload a new
>>>> patch since it's so simple.
>>>>
>>>>
>>>> On Fri, Jul 18, 2014 at 11:37 AM, Todd Fiala <tfiala at google.com> wrote:
>>>>
>>>>> Typo:
>>>>>
>>>>> > for expect on MacOSX to be able to load pexpect.
>>>>>
>>>>> for the *lldb tests *on MacOSX to be able to load pexpect.
>>>>>
>>>>>
>>>>> On Fri, Jul 18, 2014 at 11:36 AM, Todd Fiala <tfiala at google.com>
>>>>> wrote:
>>>>>
>>>>>> Ok definitely related to changes in test/dotest.py.
>>>>>>
>>>>>> Let me see if I can adjust that. The key is you’re nuking the custom
>>>>>> pexpect-2.4 path, which is absolutely needed for expect on MacOSX to be
>>>>>> able to load pexpect.
>>>>>>
>>>>>> I think if you don’t nuke this part:
>>>>>>
>>>>>> ===================================================================--- test/dotest.py (revision 213388)+++ test/dotest.py (working copy)@@ -883,12 +883,7 @@
>>>>>>
>>>>>> os.environ["LLDB_SRC"] = os.path.join(sys.path[0], os.pardir)
>>>>>>
>>>>>> pluginPath = os.path.join(scriptPath, 'plugins')- pexpectPath = os.path.join(scriptPath, 'pexpect-2.4')
>>>>>> - # Put embedded pexpect at front of the load path so we ensure we- # use that version.- sys.path.insert(0, pexpectPath)-
>>>>>>
>>>>>> # Append script dir and plugin dir to the sys.path.
>>>>>> sys.path.append(scriptPath)
>>>>>> sys.path.append(pluginPath)
>>>>>>
>>>>>> everything would probably be fine.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Jul 18, 2014 at 11:32 AM, Todd Fiala <tfiala at google.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Oh it has to do with the pexpect (embedded - needs to show up in
>>>>>>> pythonpath) not being found on MacOSX.
>>>>>>>
>>>>>>> (I think pexpect comes embedded on most Linux distros, so wouldn't
>>>>>>> show up there).
>>>>>>>
>>>>>>> Let me see what went wrong. We use the pexpect from the lldb/test
>>>>>>> dir usually.
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Jul 18, 2014 at 11:28 AM, Todd Fiala <tfiala at google.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hmm, so I need to investigate but right now all the tests are
>>>>>>>> failing on MacOSX with this change.
>>>>>>>>
>>>>>>>> I'm going to reverse it out and make sure something isn't whack on
>>>>>>>> my laptop.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Jul 18, 2014 at 9:33 AM, Todd Fiala <tfiala at google.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Checking on this now.
>>>>>>>>>
>>>>>>>>> http://reviews.llvm.org/D4548
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Todd Fiala | Software Engineer | tfiala at google.com |
>>>>>>>> 650-943-3180
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
>>>
>>
>>
>>
>> --
>> Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
>>
>
>
>
> --
> Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
>
--
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140718/28657146/attachment.html>
More information about the lldb-commits
mailing list