[Lldb-commits] Review: Fixes for the test suite and API

Johnny Chen johnny.chen at apple.com
Fri May 11 10:27:12 PDT 2012


Hi Filipe,

Great!  Check it in when you're ready!

Johnny

On May 11, 2012, at 8:22 AM, Filipe Cabecinhas <filcab at gmail.com> wrote:

> Hi Johnny, 
> 
> Everything works fine using swig-1.3.40.
> I'm attaching another fix for a test that prints the number we're looking for and an additional 'L' character when using longs (swig 2.0 stuff, I suppose).
> 
> If everything is okay on your side, I'll commit these 3 patches (I just tested with trunk and everything runs fine here (10.7.4)).
> 
> Regards, 
> 
>  Filipe
> 
> 
> On Thursday, May 10, 2012 at 8:53 PM, Johnny Chen wrote:
> 
>> We are using 1.3.40 and don't plan to move to swig 2.* due to its GPL license terms.
>> Thanks.
>> 
>> On May 10, 2012, at 12:43 PM, Filipe Cabecinhas <filcab at gmail.com (mailto:filcab at gmail.com)> wrote:
>>> Okay, I'll do that when I get home. Do you have more specific version requirements? 
>>> 
>>> Regards,
>>> 
>>> Filipe 
>>> 
>>> -- 
>>> Filipe Cabecinhas
>>> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>>> 
>>> 
>>> On Thursday, 10 de May de 2012 at 18:51, Johnny Chen wrote:
>>> 
>>>> Hi Filipe,
>>>> 
>>>> Can you try 1.3-ish swig to see whether your patch is backward compatible?
>>>> 
>>>> On May 10, 2012, at 6:45 AM, Filipe Cabecinhas <filcab at gmail.com (mailto:filcab at gmail.com)> wrote:
>>>> 
>>>>> Hi all, 
>>>>> 
>>>>> My test suite was erring out (on trunk) on some tests. I tracked it and found out that swig (at least version 2.0.6, that I installed with homebrew) always converts ints and longs into PyLongObject. which will fail in any of lldb's __len__() methods, since these methods _must_ return a PyIntObject. I get an exception in TestSBData.SBDataAPICase.test_with_dsym_and_run_command saying this: 
>>>>> 
>>>>> ERROR: test_with_dsym_and_run_command (TestSBData.SBDataAPICase)
>>>>> Test the SBData APIs.
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "/Users/filcab/dev/lldb-mine/test/lldbtest.py", line 376, in wrapper
>>>>> return func(self, *args, **kwargs)
>>>>> File "/Users/filcab/dev/lldb-mine/test/lldbtest.py", line 410, in wrapper
>>>>> return func(self, *args, **kwargs)
>>>>> File "/Users/filcab/dev/lldb-mine/test/python_api/sbdata/TestSBData.py", line 20, in test_with_dsym_and_run_command
>>>>> self.data_api()
>>>>> File "/Users/filcab/dev/lldb-mine/test/python_api/sbdata/TestSBData.py", line 235, in data_api
>>>>> self.assertTrue(data2.uint64s == [1,2,3,4,5], 'read_data_helper failure: data2 == [1,2,3,4,5]')
>>>>> File "/Users/filcab/dev/lldb-mine/build/Debug/LLDB.framework/Resources/Python/lldb/__init__.py", line 2198, in _read_all_uint64
>>>>> return self._make_helper_uint64().all()
>>>>> File "/Users/filcab/dev/lldb-mine/build/Debug/LLDB.framework/Resources/Python/lldb/__init__.py", line 2153, in all
>>>>> return self[0:len(self)]
>>>>> TypeError: __len__() should return an int
>>>>> Config=i386-clang
>>>>> ----------------------------------------------------------------------
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> I'm attaching for review a patch that converts every __len__() return to a PyInt, which makes this test pass.
>>>>> I'm also attaching for review a patch that makes SBProcess::ReadMemory accept PyLongObjects for the byteSize argument, as well as PyIntObjects.
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> Filipe
>>>>> 
>>>>> <lldb-SBProcess_ReadMemory-bugfix.patch><lldb-fix-__len__-methods.patch>_______________________________________________
>>>>> lldb-commits mailing list
>>>>> lldb-commits at cs.uiuc.edu (mailto:lldb-commits at cs.uiuc.edu)
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>>>> 
>>> 
>> 
> 
> 
> <lldb-fix-issue_11588.patch>




More information about the lldb-commits mailing list