A new framework for debugging globally optimized code

  • Authors:
  • Le-Chun Wu;Rajiv Mirani;Harish Patil;Bruce Olsen;Wen-mei W. Hwu

  • Affiliations:
  • The Coordinated Science Laboratory, University of Illinois, Urbana, IL;Application Delivery Laboratory, Hewlett-Packard Company, Cupertino, CA;Compaq Computer Corporation, Shrewsbury, MA and Application Delivery Laboratory, Hewlett-Packard Company, Cupertino, CA;Application Delivery Laboratory, Hewlett-Packard Company, Cupertino, CA;The Coordinated Science Laboratory, University of Illinois, Urbana, IL

  • Venue:
  • Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

With an increasing number of executable binaries generated by optimizing compilers today, providing a clear and correct source-level debugger for programmers to debug optimized code has become a necessity. In this paper, a new framework for debugging globally optimized code is proposed. This framework consists of a new code location mapping scheme, a data location tracking scheme, and an emulation-based forward recovery model. By taking over the control early and emulating instructions selectively, the debugger can preserve and gather the required program state for the recovery of expected variable values at source breakpoints. The framework has been prototyped in the IMPACT compiler and GDB-4.16. Preliminary experiments conducted on several SPEC95 integer programs have yielded encouraging results. The extra time needed for the debugger to calculate the limits of the emulated region and to emulate instructions is hardly noticeable, while the increase in executable file size due to the extra debug information is on average 76% of that of the executable file with no debug information.