[PATCH] D67238: Add gdb pretty printers for a wide variety of libc++ data structures (take 2).

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 2 04:51:27 PDT 2019


MaskRay added a comment.

In D67238#1691125 <https://reviews.llvm.org/D67238#1691125>, @peter.smith wrote:

> In D67238#1691120 <https://reviews.llvm.org/D67238#1691120>, @MaskRay wrote:
>
> > > I'm not sure what is going on here. It looks like the build is debug, or if it is something specific to our machines. Would you be able to investigate what could cause that error? If we can't work it out I recommend that we disable the test on Arm and AArch64.
> >
> > I suspect this is a Python 2/3 difference.
> >
> > > check_literal = check_literal_string.encode("utf-8")
> >
> > The result of `'a'.encode('utf-8')` is `str` in Python 2, while `bytes` in Python 3. The code may be written for Python 2.
>
>
> Thanks, that would make sense. It seems like the Python interpreter used is the version that gdb is built for:
>  On the system python --version is 2.7.12
>  On GDB I get:
>
>    (gdb) py
>   >import sys
>   >print (sys.version)
>   >end
>    3.5.2 (default, Nov 23 2017, 16:37:01) 
>    [GCC 5.4.0 20160609]
>   
>
> ldd on gdb gives me:
>
>   libpython3.5m.so.1.0 => /usr/lib/aarch64-linux-gnu/libpython3.5m.so.1.0 (0x0000ffff8b6dc000)
>
>
> If that is the case and we can't know which version of python gdb is going to be built with (this is Ubuntu 16.04 on Arm and AArch64) then the scripts ought to be Python version neutral?


Pushed a hypothetical fix rL373452 <https://reviews.llvm.org/rL373452>...

(I haven't set up the libc++ + gdb testing environment yet.)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67238/new/

https://reviews.llvm.org/D67238





More information about the llvm-commits mailing list