[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 03:59:23 PDT 2019


MaskRay added a comment.

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

> Apologies for being a bit late, just rotated on to buildbot monitoring duty.
>  The test is currently failing on all of our Arm and AArch64 builders:
>  With errors such as:
>
>   No symbol table is loaded.  Use the "file" command.
>   Traceback (most recent call last):
>     File "/home/buildslave/buildslave/libcxx-libcxxabi-libunwind-aarch64-linux/llvm/projects/libcxx/test/pretty_printers/gdb_pretty_printer_test.py", line 64, in invoke
>       print("   " + check_literal)
>   TypeError: Can't convert 'bytes' object to str implicitly
>   terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'
>
>
> http://lab.llvm.org:8011/builders/libcxx-libcxxabi-libunwind-aarch64-linux/builds/2293/steps/test.libcxx/logs/FAIL%3A%20libc%2B%2B%3A%3Agdb_pretty_printer_test.sh.cpp
>
> There is a similar error on Arm 32-bit
>
>   No symbol table is loaded.  Use the "file" command.
>   Cannot parse expression `.L1185 4 at r4'.
>   warning: Probes-based dynamic linker interface failed.
>   Reverting to original interface.
>  
>   Traceback (most recent call last):
>     File "/home/buildslave/buildslave/libcxx-libcxxabi-libunwind-armv7-linux/llvm/projects/libcxx/test/pretty_printers/gdb_pretty_printer_test.py", line 64, in invoke
>       print("   " + check_literal)
>   TypeError: Can't convert 'bytes' object to str implicitly
>   terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'
>
>
> http://lab.llvm.org:8011/builders/libcxx-libcxxabi-libunwind-armv7-linux/builds/1024/steps/test.libcxx/logs/FAIL%3A%20libc%2B%2B%3A%3Agdb_pretty_printer_test.sh.cpp
>
> 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.


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