scispace - formally typeset
Open Access

Interactive source-level debugging for optimized programs (compilation, high-level)

Reads0
Chats0
TLDR
This dissertation shows that effective interactive source-level debuggers can be provided for optimized programs and can reduce debugging time and programmer confusion.
Abstract
The transformations performed by an optimizing compiler have traditionally impeded interactive debugging in source language terms: after optimization, a program's source text and object code do not have a straightforward correspondence. This dissertation shows that effective interactive source-level debuggers can be provided for optimized programs. Such debuggers can reduce debugging time and programmer confusion. These benefits are especially important given the increasing availability of optimizing compilers. The first half of the dissertation studies the overall problem of debugging optimized programs. It presents a general view of debuggers and defines two important levels of debugger behavior for optimized programs. A debugger provides expected behavior if it hides the effects of the optimizations from the user by doing behind-the-scenes processing. It provides truthful behavior if it indicates that it cannot give the exact answer to a debugging query (because the executing program differs from the source program). The user may be able to deduce the correct answer from the partial information displayed by a truthful response. A thorough study of the interactions between optimization and debugging is included. In addition, a collection of solution techniques to relive the problem caused by optimization are described. The second half of the dissertation implementation experience with one aspect of the problem. A prototype debugging system called Navigator was developed for the Cedar programming environment at the Xerox Palo Alto Research Center. Navigator can be used interactively to monitor program execution flow in the presence of two simple but nontrivial optimizations: inline procedure expansion and cross-jumping (merging identical tails of code paths that join). Navigator provides expected behavior by combining information collected by the compiler about the effects of the optimizations and information collected by the debugger about the control-flow history of the computation. Program execution space and speed are almost total unaffected when no debugging requests are active. When debugging is requested, Navigator provides its added functionality without noticeably degrading debugger response time for most programs. Proofs of correctness of the compiler and debugger algorithms are given, as well as an analysis of their efficiency.

read more

Citations
More filters
Proceedings ArticleDOI

Debugging optimized code with dynamic deoptimization

TL;DR: SELF's debugging system provides complete source-level debugging (expected behavior) with globally optimized code and is the first practical system providing full expected behavior with globally optimize code.
Journal ArticleDOI

WYSINWYX: What you see is not what you eXecute

TL;DR: The article presents the algorithms that were developed, explains how they are used to recover Intermediate Representations from executables that are similar to the IRs that would be available if one started from source code, and describes their application in the context of program understanding and automated bug hunting.

What You See Is Not What You eXecute

TL;DR: The WYSINWYX phenomenon create a mismatch between what a programmer intends and what is actually executed by the processor, which can cause analyses that are performed on source code to fail to detect certain bugs and vulnerabilities.
Book ChapterDOI

WYSINWYX: What You See Is Not What You eXecute

TL;DR: What You See Is Not What You eXecute (WYSINWYX) as discussed by the authors is a bug that occurs when a programmer intends to execute a program and what is actually executed by the processor.
Proceedings ArticleDOI

A new approach to debugging optimized code

TL;DR: A new compiler-debugger interfaces (CDI) was designed that supports providing visual feedback and the debugging of optimized code and relates each feature back to the debugger functionality it supports.