Python pretty-printer script (tools/gdb/pip_pp.py) for the GDB debugger: - PIString (UTF-16, escapes, surrogate pairs), PIByteArray (hex), PIChar - PIVector<T>, PIDeque<T>, PIStringList, PIMap<K,V>, PISet<T>, PIPair<K,V> - PIVariant (type + serialized size) - pointers: (PIString *) 0x... "hello"; long containers truncated - manual: gdb source tools/gdb/pip_pp.py - automatic: CMake install ships share/pip/gdb/pip_pp.py and the libpip.so-gdb.py auto-load stub next to the library (shared builds) - verification: tools/gdb/test/test_pp.sh <build-dir> - docs: doc/pages/debugging.md
15 lines
486 B
Plaintext
15 lines
486 B
Plaintext
# GDB auto-load stub for the PIP library pretty-printers.
|
|
#
|
|
# GDB evaluates this file automatically when the shared library it is named
|
|
# after (libpip.so) is loaded, see GDB manual "Auto-loading extensions".
|
|
#
|
|
# Generated by CMake from tools/gdb/gdb_autoload_stub.py.in. Do not edit.
|
|
import os
|
|
import sys
|
|
|
|
_here = os.path.dirname(os.path.realpath(__file__))
|
|
sys.path.insert(0, os.path.join(_here, "@PIP_GDB_PY_RELPATH@"))
|
|
|
|
import pip_pp
|
|
pip_pp.register_printers(gdb.current_objfile())
|