Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Fast breakpoints: design and implementation

Published: 01 June 1990 Publication History

Abstract

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.

References

[1]
Z. Aral, and I. Gertner, "High-Level Debugging in Parasight", in Proceedings of the Workshop on Parallel and Distributed Debugging, SIGPLAN Notices Volume 24, Number 1, January 1989.
[2]
R. Atkinson, A. Demers, C. Hauser, C. Jacobi, P. Kessler, M. Weiser, "Experiences Creating a Portable Cedar", in Proceedings of the SIGPLAN'89 Conference on Programming Design and Implementation, S IGPLAN Notices Vol. 24, No. 7, July 1989.
[3]
A. Demers, M. Weiser, B. Hayes, H. Boehm, D. Bobrow, S. Shenker, "Combining Generational and Conservative Garbage Collection: Framework and Implementations", in Proceedings of the 17th Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, January 1990.
[4]
T. G. Evans and D. L. Darley, "On-line Debugging Techniques: A Survey", in Proceedings of the Fall Joint Computer Conference, 1966.
[5]
R. S. Fabry, "MADBUG - A MAD Debugging System", in The Compatible Time-Sharing System. A Programmer's Guide, Second Edition, MIT Press, Cambridge MA, 1965.
[6]
S. Gill, "The Diagnosis of Mistakes in Programmes on the EDSAC", in Proceedings of the Royal Society, Series A, Vol. 206, pp. 538-554.
[7]
S. Graham, P. Kessler, M. McKusick, "gprof: A Call Graph Execution Profiler", in Proceedings of the SIGPLAN'82 Symposium on Compiler Construction, SIGPLAN Notices Vol. 17, No. 2, June 1982.
[8]
M. S. Johnson, An Annotated Software Debugging Bibliography, Hewlett-Packard Laboratories, March 1982.
[9]
G. Kane, MIPS RISC Architecture, Prentice-Hall inc., Englewood Cliffs, NJ, 1988.
[10]
T. J. Klensk and L. E. Larson, IBM Technical Disclosure Bulletin, Vol. 15, No. 4, pp 1248-50, September 1972.
[11]
D. E. Knuth, The Art of Computer Programming, Vol. 1, p. 189, Addison-Wesley, 1968.
[12]
B. Lampson and K. Pier, "A Processor for High- Performance Personal Computer", in SIGAR CH/IEEE Proceedings of the 7th Symposium on Computer Architecture, La Baule, May 1980.
[13]
C. H. Pappas and W. H. Murray III, 80386 Microprocessor Handbook, Osborne McGraw-Hill, Berkeley, CA, 1988.
[14]
T. G. Stockham and J. B. Dennis, "FLIT- Flex0writer Interrogation Tape: A Symbolic Utility Program for the TX-0", Memo 5001-23, Department of Electrical Engineering, MIT, July 1960.
[15]
Sun Microsystems, Inc., Debugging Tools, Part No. 800-1775-10, May 1988.
[16]
Sun Microsystems, Inc., The SPARC Architecture Manual, Part No. 800-1399-03, June 1987.
[17]
D. Swinehart, P. Zellweger, R. Beach, R. Hagmann, "A Structural View of the Cedar Programming Environment", Transactions on Programming Languages and Systems, Vol. 8, No. 4, October 1986.
[18]
W. Teitelman, Interlisp Reference Manual, Xerox Corporation, Palo Alto, CA, Oct, 1978.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1990
Published in SIGPLAN Volume 25, Issue 6

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)98
  • Downloads (Last 6 weeks)36
Reflects downloads up to 22 Sep 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media