130 likes | 279 Views
sbdb: A Semi-Automated Bidirectional DeBugger. Prasenjit Mitra Stanford University CS 343: Research Proposal. Introduction. Debugging requires a lot of manual effort. Problem: Overshoot a bug - re-execute. Solution: Backtracking. Related Work. Execution History:
E N D
sbdb: A Semi-Automated Bidirectional DeBugger Prasenjit Mitra Stanford University CS 343: Research Proposal
Introduction • Debugging requires a lot of manual effort. • Problem: Overshoot a bug - re-execute. • Solution: Backtracking.
Related Work • Execution History: • Balzer, Spring Joint Comp. Conf., 1969. • Lieberman and Fry, Software Viz., 1998. • Agrawal, et al. IEEE Software, 1991. • Netzer and Weaver, PLDI, 1994 . • Re-execution: • Tolmach and Appel, J. Func. Prog. 1993. • Bob Boothe, PLDI, 2000. • Checkpointing
Execution History • Step Counter: • number of steps from start of a program. • Change-Set of a Statement: • registers, memory variables that change value • Store: • Step counter, program counter, values of variables in change-set. • Portion of stack while entering/exiting function.
Coarser Granularity • Jump over loops. • Statement-level to Basic-Block-level. • Bb = {S1;S2} • Cs(Bb) = Cs(S1) U Cs(S2) - DefinedIn( S1) • Store <Var, Val> • where Val = Value of Var before S1
Exponential Thinning of Execution History Log • For distant points, granularity of logs coarser. • To jump within a Bb, rollback to start and then execute forward. Per 8Bb. Per 4Bb. Per Bb. Per 2Bb. Per Stmt.
Checkpoints • Large number of backward steps - inefficient. • Maintain checkpoints of program states at intermediate points. • Fork the program and use the OS’ copy on write policy. • Exponential thinning of checkpoints.
Hybrid Approach • Move backward incrementally using execution history log. • Move backward using coarse-grained log and then re-execute forward. • Jump back to a checkpoint prior to program point and re-execute forward. • Jump back to a checkpoint after program point and then use execution history log.
Operations • bstep n - step n • prev n - next n • bcontinue - continue • before - finish • until <cond.> - buntil <cond.> • undo • prove <condition>
Comparisons • Boothe • History • Checkpoints X X X X X X X X O O O O
Comparisons (contd.) • + Less checkpointing interval. • + Option to move forward or backward. • - History logs
Conclusion • Bidirectional Debugger. • Hybrid approach involving • execution history logs • checkpoints • Potential to analyze programs using stored program state.
And that will be…... • A million dollars please………… • Questions ???