How to view the value of a std::string on linux with gdb and libc++?

I can not view the value of a std::string. I tried using https://github.com/koutheir/libcxx-pretty-printers but I get an error:

Error during pretty printers setup: Error while executing Python code.

gdb --conf
This GDB was configured as follows:
   configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
         --with-auto-load-dir=$debugdir:$datadir/auto-load
         --with-auto-load-safe-path=$debugdir:$datadir/auto-load
         --with-expat
         --with-gdb-datadir=/usr/share/gdb (relocatable)
         --with-jit-reader-dir=/usr/lib/gdb (relocatable)
         --without-libunwind-ia64
         --with-lzma
         --without-babeltrace
         --without-intel-pt
         --with-mpfr
         --without-xxhash
         --with-python=/usr (relocatable)
         --with-python-libdir=/usr/lib (relocatable)
         --with-debuginfod
         --with-guile
         --enable-source-highlight
         --with-separate-debug-dir=/usr/lib/debug (relocatable)
         --with-system-gdbinit=/etc/gdb/gdbinit

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)

 

0

请先登录再写评论。