A NEW APPROACH TO DEBUGGING OPTIMIZED CODE

被引:0
|
作者
BROOKS, G [1 ]
HANSEN, GJ [1 ]
SIMMONS, S [1 ]
机构
[1] CONVEX COMP CORP,RICHARDSON,TX 75083
来源
SIGPLAN NOTICES | 1992年 / 27卷 / 07期
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Debugging optimized code is a desirable capability not provided by most current debuggers. Users are forced to debug the unoptimized code when a bug occurs in the optimized version. Current research offers partial solutions for a small class of optimizations, but not a unified approach that handles a wide range of optimizations, such as the sophisticated optimizations performed by supercomputer compilers. The trend with current research is to make the effects of optimization transparent, i.e., provide the same behavior as that of the unoptimized program. We contend that this approach is neither totally feasible nor entirely desirable. Instead, we propose a new approach based on the premise that one should be able to debug the optimized code. This implies mapping the current state of execution back to the original source, tracking the location of variables, and mapping compiler-synthesized variables back to user-defined induction variables. To aid the user in understanding program behavior, various visual means are provided, e.g., different forms of highlighting and annotating of the source/assembly code. While this unavoidably requires the user to have a basic understanding of the optimizations performed, it permits the user to see what is actually happening, infer the optimizations performed, and detect bugs. An example illustrates the effectiveness of visual feedback. To support conventional debugger functionality for optimized code, the compiler must generate additional information. Current compiler-debugger interfaces (CDIs) were neither designed to handle this new information nor are they extensible in a straight forward manner. Therefore, a new CDI was designed that supports providing visual feedback and the debugging of optimized code. This paper specifies the details of a new CDI and relates each feature back to the debugger functionality it supports.
引用
收藏
页码:1 / 11
页数:11
相关论文
共 50 条
  • [1] A new framework for debugging globally optimized code
    Wu, LC
    Mirani, R
    Patil, H
    Olsen, B
    Hwu, WMW
    ACM SIGPLAN NOTICES, 1999, 34 (05) : 181 - 191
  • [2] Comparison checking: An approach to avoid debugging of optimized code
    Jaramillo, C
    Gupta, R
    Soffa, ML
    SOFTWARE ENGINEERING - ESEC/FSE '99, PROCEEDINGS, 1999, 1687 : 268 - 284
  • [3] SYMBOLIC DEBUGGING OF OPTIMIZED CODE
    HENNESSY, J
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1982, 4 (03): : 323 - 344
  • [4] DEBUGGING OPTIMIZED CODE WITH DYNAMIC DEOPTIMIZATION
    HOLZLE, U
    CHAMBERS, C
    UNGAR, D
    SIGPLAN NOTICES, 1992, 27 (07): : 32 - 43
  • [5] Transparent Debugging of Dynamically Optimized Code
    Kumar, Naveen
    Childers, Bruce R.
    Soffa, Mary Lou
    CGO 2009: INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, PROCEEDINGS, 2009, : 275 - +
  • [6] SYMBOLIC DEBUGGING OF OPTIMIZED CODE - NOTE
    WALL, D
    SRIVASTAVA, A
    TEMPLIN, F
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1985, 7 (01): : 176 - 181
  • [7] DOC - A PRACTICAL APPROACH TO SOURCE-LEVEL DEBUGGING OF GLOBALLY OPTIMIZED CODE
    COUTANT, DS
    MELOY, S
    RUSCETTA, M
    SIGPLAN NOTICES, 1988, 23 (07): : 125 - 134
  • [8] SYMBOLIC DEBUGGING OF OPTIMIZED CODE - A FURTHER NOTE
    COPPERMAN, M
    MCDOWELL, CE
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1993, 15 (02): : 357 - 365
  • [9] DEBUGGING OPTIMIZED CODE WITHOUT BEING MISLED
    COPPERMAN, M
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1994, 16 (03): : 387 - 427
  • [10] Source-level debugging of scalar optimized code
    AdlTabatabai, AR
    Gross, T
    ACM SIGPLAN NOTICES, 1996, 31 (05) : 33 - 43