DEBUGGING OPTIMIZED CODE WITHOUT BEING MISLED

被引:15
|
作者
COPPERMAN, M
机构
[1] Univ. of California, Santa Cruz
关键词
PERFORMANCE; VERIFICATION;
D O I
10.1145/177492.177517
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Correct optimization can change the behavior of an incorrect program; therefore at times it is necessary to debug optimized code. However, optimizing compilers produce code that impedes source-level debugging. Optimization can cause an inconsistency between where the user expects a breakpoint to be located and the breakpoint's actual location. This article describes a mapping between statements and breakpoint locations that ameliorates this problem. The mapping enables debugger behavior on optimized code that approximates debugger behavior on unoptimized code sufficiently closely for the user to use traditional debugging strategies. Optimization can also cause the value of a variable to be noncurrent-to differ from the value that would be predicted by a close reading of the source code. This article presents a method of determining when this has occurred, and shows how a debugger can describe the relevant effects of optimization. The determination method is more general than previously published methods; it handles global optimization and many flow graph transformations, and it is not tightly coupled to optimizations performed by a particular compiler. Necessary compiler support is also described.
引用
收藏
页码:387 / 427
页数:41
相关论文
共 50 条
  • [41] Handling code displacements in the debugging of optimised programs
    Shu, WS
    CARI'96 - PROCEEDINGS OF THE 3RD AFRICAN CONFERENCE ON RESEARCH IN COMPUTER SCIENCE, 1996, : 854 - 863
  • [42] Systematic Debugging of Logical Errors in Source Code
    Ziemann, Felix
    Reuss, Florian
    PROCEEDINGS OF THE 19TH WIPSCE CONFERENCE IN PRIMARY AND SECONDARY COMPUTING EDUCATION RESEARCH, WIPSCE 2024, 2024,
  • [43] DEBUGGING CODE REORGANIZED BY A TRACE SCHEDULING COMPILER
    GUPTA, R
    STRUCTURED PROGRAMMING, 1990, 11 (03): : 141 - 150
  • [44] Concept assignment as a debugging technique for code generators
    Singer, J
    FIFTH IEEE INTERNATIONAL WORKSHOP ON SOURCE CODE ANALYSIS AND MANIPULATION, PROCEEDINGS, 2005, : 75 - 84
  • [45] Disqover: Debugging via Code Sequence Covers
    Elsaka, Ethar
    Memon, Atif
    2015 IEEE INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING WORKSHOPS (ISSREW), 2015, : 85 - 92
  • [46] BugSpotter: Automated Generation of Code Debugging Exercises
    Padurean, Victor-Alexandru
    Denny, Paul
    Singla, Adish
    PROCEEDINGS OF THE 56TH ACM TECHNICAL SYMPOSIUM ON COMPUTER SCIENCE EDUCATION, SIGCSE TS 2025, VOL 2, 2025, : 896 - 902
  • [47] BugSpotter: Automated Generation of Code Debugging Exercises
    Padurean, Victor-Alexandru
    Denny, Paul
    Singla, Adish
    PROCEEDINGS OF THE 56TH ACM TECHNICAL SYMPOSIUM ON COMPUTER SCIENCE EDUCATION, SIGCSE TS 2025, VOL 1, 2025, : 896 - 902
  • [48] Distributed source code debugging for embedded systems
    Parson, D
    Herrera-Bendezu, L
    Vollmer, J
    PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED PROCESSING TECHNIQUES AND APPLICATIONS, VOLS I-V, 2000, : 2409 - 2415
  • [49] SOURCE LEVEL DEBUGGING OF AUTOMATICALLY PARALLELIZED CODE
    COHN, R
    SIGPLAN NOTICES, 1991, 26 (12): : 132 - 143
  • [50] Visualizing debugging activity in source code repositories
    Voinea, Lucian
    Telea, Alexandru
    4TH IEEE INTERNATIONAL WORKSHOP ON VISUALIZING SOFTWARE FOR UNDERSTANDING AND ANALYSIS, PROCEEDINGS, 2007, : 156 - +