Debug information validation for optimized code
Yuanbo Li, Shuo Ding, Qirun Zhang, Davide Italiano
Abstract
Almost all modern production software is compiled with optimization. Debugging optimized code is a desirable functionality. For example, developers usually perform post-mortem debugging on the coredumps produced by software crashes. Designing reliable debugging techniques for optimized code has been well-studied in the past. However, little is known about the correctness of the debug information generated by optimizing compilers when debugging optimized code.
Optimizing compilers emit debug information (e.g., DWARF information) to support source code debuggers. Wrong debug information causes debuggers to either crash or to display wrong variable values. Existing debugger validation techniques only focus on testing the interactive aspect of debuggers for dynamic languages (i.e., with unoptimized code). Validating debug information for optimized code raises some unique challenges: (1) many breakpoints cannot be reached by debuggers due to code optimization; and (2) inspecting some arbitrary variables such as uninitialized variables introduces undefined behaviors.
This paper presents the first generic framework for systematically testing debug information with optimized code. We introduce a novel concept called actionable program. An actionable program P ⟨s,v ⟩ contains a program location s and a variable v to inspect. Our key insight is that in both the unoptimized program P ⟨s ,v ⟩ and the optimized program P ′ ⟨s,v ⟩ , debuggers should be able to stop at the program location s and inspect the value of the variable v without any undefined behaviors. Our framework generates actionable programs
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 01edd91f-b109-4ad0-9efc-00ec6c31f78dCited by top-tier papers16
- CcNav: Understanding Compiler Optimizations in Binary CodeSabin Devkota, Pascal Aschwanden, Adam Kunen, Matthew P. LeGendre et al.IEEE VIS 2020 · 34 citations
- Who's debugging the debuggers? exposing debug information bugs in optimized binariesGiuseppe Antonio Di Luna, Davide Italiano, Luca Massarelli, Sebastian Österlund et al.ASPLOS 2021 · 32 citations
- Where Did My Variable Go? Poking Holes in Incomplete Debug InformationCristian Assaiante, Daniele Cono D'Elia, Giuseppe Antonio Di Luna, Leonardo QuerzoniASPLOS 2023 · 14 citations
- D-Helix: A Generic Decompiler Testing Framework Using Symbolic DifferentiationMuqi Zou, Arslan Khan, Ruoyu Wu, Han Gao et al.USENIX Security 2024 · 14 citations
- Compilation Consistency Modulo Debug InformationTheodore Luo Wang, Yongqiang Tian, Yiwen Dong, Zhenyang Xu et al.ASPLOS 2023 · 14 citations
Builds on1
Related papers
- Debugging Debugging Information using Dynamic Call TreesJ. Ryan Stinnett, Stephen KellOOPSLA 2026
- Debugger Toolchain Validation via Cross-Level DebuggingYibiao Yang, Maolin Sun, Jiangchang Wu, Qingyang Li et al.ASPLOS 2025 · 8 citations
- Robustifying Debug Information Updates in LLVM via Control-Flow Conformance AnalysisShan Huang, Jingjing Liang, Ting Su, Qirun ZhangPLDI 2025 · 3 citations
- Refined Input, Degraded Output: The Counterintuitive World of Compiler BehaviorTheodoros Theodoridis, Zhendong SuPLDI 2024 · 14 citations
- FuzzyFlow: Leveraging Dataflow To Find and Squash Program Optimization BugsPhilipp Schaad, Timo Schneider, Tal Ben-Nun, Alexandru Calotoiu et al.SC 2023 · 3 citations
