Pyxis GDB Auto-Load Plugin for DDT Container Debugging

This directory contains a GDB Python auto-load script that enables Linaro DDT (Forge) to fully resolve shared library symbols when debugging applications inside Pyxis containers.

How it works

When DDT’s GDB loads the target process’s dynamic linker (ld-linux), GDB’s auto-load mechanism loads this script. The script:

  1. Reads /proc/<pid>/environ from the target process

  2. Finds FORGE_SET_SYSROOT (set by Pyxis via spank_setenv)

  3. Sets GDB’s sysroot to /proc/<pid>/root (direct container FS access)

  4. Re-resolves all shared libraries from the container

This gives DDT full stack traces with symbols for all container libraries — not just the dynamic linker.

Installation layout

The RPM installs the canonical script and creates architecture-specific symlinks that GDB’s auto-load mechanism requires:

<prefix>/share/gdb/auto-load/
├── pyxis-sysroot.py                              (canonical source)
└── usr/
    ├── lib/
    │   ├── ld-linux-aarch64.so.1-gdb.py → ../../pyxis-sysroot.py
    │   └── ld-linux-x86-64.so.2-gdb.py → ../../pyxis-sysroot.py
    └── lib64/
        ├── ld-linux-aarch64.so.1-gdb.py → ../../pyxis-sysroot.py
        └── ld-linux-x86-64.so.2-gdb.py → ../../pyxis-sysroot.py

Activation

Set two environment variables before launching DDT:

export FORGE_ENABLE_CUSTOM_AUTOLOAD_DIR=/path/to/tools/pyxis-gdb-plugin
export FORGE_SET_SYSROOT="/"

Point this at the directory containing share/gdb/auto-load/. For SuPS: /opt/cray/sups/source/<version>/tools/pyxis-gdb-plugin.

For site-wide deployment, add these to the DDT/Forge modulefile.

Debug logging

Set PYXIS_GDB_PLUGIN_DEBUG=1 to write diagnostics to /tmp/pyxis-gdb-plugin.log.

Requirements

  • GDB 14+ with Python support (DDT 25.1.3 ships GDB 16.1)

  • DDT’s FORGE_ENABLE_CUSTOM_AUTOLOAD_DIR env var (supported in Forge 25.1+)

Full documentation

See Debugging with Linaro or TotalView for the complete user workflow.