Back to The Rust Foundation
GSoC 2026

Utilize debugger APIs to improve debug­ info test accuracy and error reporting

Currently, the debuginfo test suite has a number of shortcomings: it is sensi­tive to the installed debugger and python version; it does not account for the unavoidable visualization difference between PDB and DWARF debug info; the raw string comparisons are fragile and cause unreasonable numbers of failures when visualizer scripts are changed intentionally; and many properties the visualizers rely on are only tested incidentally. As a result, the tests are difficult to run in CI, difficult to run locally (particularly on Windows), failures are difficult to diagnose, and updating tests for expected changes is arduous. This proposal intends to add a new directive ("{debugger_prefix}-repr") to compiletest/runtest/debugger that leverages the debuggers’ public Python API. Python scripts will check the debugger’s in-­memory representation of objects and the underlying debugee memory to verify accurate debug info and visualization. These scripts will also be able to alter their behavior based on debugger version and debug info format. This will allow for more specific errors when tests fail. Test data will be “bless­able” (i.e. automatically updateable) to make intentional changes to the visualizer scripts significantly easier.

Project details

Contributor

walnut356

Mentors

Not available

Technologies

Not listed in the archive