Fast breakpoints

Author:

Kessler Peter B.1

Affiliation:

1. Sun Microsystems, Inc., Santa Clara, CA

Abstract

In re-implementing fast breakpoints for stock hardware, I discovered the joys of putting self-modifying code to good use.By "fast breakpoints" I mean inserting transfers of control to change the behavior of a running program. I don't claim to have invented fast breakpoints: I have traced their use back to 1951 [1]. I didn't even put these breakpoints to novel uses. All I did was rediscover how easy it is to take statically compiled code and modify it at runtime to alter the semantics of programs. The most obvious application is to evaluate predicates and expressions for debugging, but other uses are possible.We have designed and implemented a fast breakpoint facility. Breakpoints are usually thought of as a feature of an interactive debugger, in which case the breakpoints need not be particularly fast. In our environment breakpoints are often used for non-interactive information gathering; for example, procedure call count and statement execution count profiling [Swinehart, et al.]. When used non-interactively, breakpoints should be as fast as possible, so as to perturb the execution of the program as little as possible. Even in interactive debuggers, a conditional breakpoint facility would benefit from breakpoints that could transfer to the evaluation of the condition rapidly, and continue expeditiously if the condition were not satisfied. Such conditional breakpoints could be used to check assertions, etc. Program advising could also make use of fast breakpoints [Teitelman]. Examples of advising include tracing, timing, and even animation, all of which should be part of an advanced programming environment.We have ported the Cedar environment from a machine with microcode support for breakpoints [Lampson and Pier] to commercial platforms running C code [Atkinson, et al.]. Most of our ports run under the Unix* operating system, so one choice for implementing breakpoints for Cedar was to use the breakpoint facility provided by that system. The breakpoints provided by the Unix operating system are several orders of magnitude too slow (and also several process switches too complicated) for the applications we have in mind. So we designed a breakpoint system that was fast enough for our purposes.Breakpoints for uni-processors running single threads of control used to be fast and simple to implement. This paper shows that breakpoints can still be fast, even with multiple threads of control on multi-processors. This paper describes problems in the design of a breakpoint package for modern computer architectures and programming styles, and our solutions to them for a particular architecture.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference27 articles.

1. The Diagnosis of Mistakes in Programmes on the EDSAC;Gill S.;Proceedings of the Royal Society, Series A

2. A structural view of the Cedar programming environment

3. A processor for a high-performance personal computer

4. Sun Microsystems Inc. The SPARC Architecture Manual Part number 800-1399-03 June 1987.]] Sun Microsystems Inc. The SPARC Architecture Manual Part number 800-1399-03 June 1987.]]

5. Sun Microsystems Inc. Debugging Tools Part number 800-1775-10 May 1988.]] Sun Microsystems Inc. Debugging Tools Part number 800-1775-10 May 1988.]]

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3