Many debugging tools rely on compiler-produced metadata to present a source-language view of program states, such as variable values and source line numbers. While this tends to work for unoptimised programs, current compilers often generate only partial debugging information in optimised programs. Current approaches for measuring the extent of coverage of local variables are based on crude assumptions (for example, assuming variables could cover their whole parent scope) and are not comparable from one compilation to another. In this work, we propose some new metrics, computable by our tools, which could serve as motivation for language implementations to improve debugging quality.
翻译:许多调试工具依赖编译器生成的元数据来呈现程序状态的源语言视图,例如变量值和源代码行号。虽然这通常适用于未优化的程序,但当前的编译器在优化后的程序中往往仅生成部分调试信息。现有评估局部变量覆盖范围的测量方法基于粗略的假设(例如,假定变量可以覆盖其整个父作用域),且无法在不同编译版本之间进行有效比较。本研究提出了一些新的指标,这些指标可通过我们的工具计算,有望推动语言实现提升调试质量。