Source-level debugging of compiler-optimised code: ill-posed, but not impossible
summary
Argues it is possible to get both full source-level debuggability and full optimisation by residualize state into the debugging metadata rather than assuming all state lives in the object program, and gives a working example that reconstructs an eliminated loop index from pointer arithmetic. Shows DWARF limitations and recent extensions, proposes a partial correctness criterion for debug metadata, and cites the limit case of run unoptimized and optimized in parallel as a conceptual proof; discusses practical collection costs and debug info as Turing-powerful stack machine.
AI-written summary · about
chapters (11)
- 0:00Source-level debugging challenges
- 1:04Debugging without environments
- 4:13Recompiling without optimization isn't solution
- 7:01Debugging lags behind optimizations
- 9:26Residualizing state in debug info
- 12:36Hardware’s residual state management
- 14:02State loss and need for residualization
- 15:49Open challenges in residualization
- 16:52Side-by-side execution limit case
- 17:55Debugging program variants
- 18:39Q&A
related talks
22mCompilers should get over themselves and respect semantic dependencies!
01h 15mReliable Stack Traces, the Reality of Myth
59mCompilers can be surprising
16mReconciling Optimization With Secure Compilation
27mTowards Type Debugging using Partial Evaluation
53mFrom Within: Compiler Testing and Validation via Compilers
22mReconciling High-level Optimizations and Low-level Code in LLVM
17mRecent Developments in Optimizing Compilers for RISC-V
