Dynamic Query-Based Debugging of Object-Oriented Programs

  • Authors:
  • Raimondas Lencevicius;Urs Hölzle;Ambuj K. Singh

  • Affiliations:
  • Nokia Research Center, 5 Wayside Road, Burlington, MA 01803, USA. Raimondas.Lencevicius@nokia.com http://alumni.cs.ucsb.edu/~raimisl;Google Inc, 2400 Bayshore Parkway, Mountain View, CA 94043, USA. urs@google.com http://www.cs.ucsb.edu/~urs;Department of Computer Science, University of California, Santa Barbara, CA 93106, USA. ambuj@cs.ucsb.edu http://www.cs.ucsb.edu/~ambuj

  • Venue:
  • Automated Software Engineering
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Program errors are hard to find because of the cause-effect gap between the instant when an error occurs and when the error becomes apparent to the programmer. Although debugging techniques such as conditional and data breakpoints help in finding errors in simple cases, they fail to effectively bridge the cause-effect gap in many situations. This paper proposes two debuggers that provide programmers with an instant error alert by continuously checking inter-object relationships while the debugged program is running. We call such tool a dynamic query-based debugger. To speed up dynamic query evaluation, our debugger implemented in portable Java uses a combination of program instrumentation, load-time code generation, query optimization, and incremental reevaluation. Experiments and a query cost model show that selection queries are efficient in most cases, while more costly join queries are practical when query evaluations are infrequent or query domains are small. To enable query-based debugging in the middle of program execution in a portable way, our debugger performs efficient Java class file instrumentation. We call such debugger an on-the-fly debugger. Though the on-the-fly debugger has a higher overhead than a dynamic query-based debugger, it offers additional interactive power and flexibility while maintaining complete portability.