This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] bound_registers.py: Add support for Python 3


Hi,

It looks like the wrong version of my patch was merged. Sorry if I
didn't understand the proper process for providing an updated version
of the patch.

The initial version was missing the import sys, this is the correct
one: https://sourceware.org/ml/gdb-patches/2016-11/msg00900.html

Jonah
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On 22 March 2017 at 09:16, Yao Qi <qiyaoltc@gmail.com> wrote:
> On Fri, Mar 17, 2017 at 3:00 PM, Pedro Alves <palves@redhat.com> wrote:
>> diff --git a/gdb/python/lib/gdb/printer/bound_registers.py b/gdb/python/lib/gdb/printer/bound_registers.py
>> index b315690..104ea7f 100644
>> --- a/gdb/python/lib/gdb/printer/bound_registers.py
>> +++ b/gdb/python/lib/gdb/printer/bound_registers.py
>> @@ -16,6 +16,11 @@
>>
>>  import gdb.printing
>>
>> +if sys.version_info[0] > 2:
>> +    # Python 3 removed basestring and long
>> +    basestring = str
>> +    long = int
>> +
>
> This change causes some fails in gdb.python/py-pp-maint.exp,
>
> disable pretty-printer^M
> 6 printers disabled^M
> 0 of 6 printers enabled^M
> (gdb) FAIL: gdb.python/py-pp-maint.exp: disable pretty-printer
>
> looks the number of pretty-printer is changed.  Without this patch,
> there are 7 pretty-printers,
>
> info pretty-printer^M
> global pretty-printers:^M
>   builtin^M
>     mpx_bound128^M
>   lookup_function_lookup_test^M
>   pp-test^M
>     enum flag_enum^M
>     s^M
>     ss^M
>     struct s^M
>     struct ss^M
> (gdb) PASS: gdb.python/py-pp-maint.exp: info pretty-printer
>
> but with this patch applied, it becomes 6, mpx_bound128 is
> disappeared.
>
> info pretty-printer^M
> global pretty-printers:^M
>   builtin^M
>   lookup_function_lookup_test^M
>   pp-test^M
>     enum flag_enum^M
>     s^M
>     ss^M
>     struct s^M
>     struct ss^M
> (gdb) PASS: gdb.python/py-pp-maint.exp: info pretty-printer
>
> I'll look into this problem further.
>
> --
> Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]