sbdb: A Semi-Automated Bidirectional DeBugger

Preview:

DESCRIPTION

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: - PowerPoint PPT Presentation

Citation preview

1

sbdb: A Semi-Automated Bidirectional DeBugger

Prasenjit MitraStanford University

CS 343: Research Proposal

2

Introduction

• Debugging requires a lot of manual effort.

• Problem: Overshoot a bug - re-execute.

• Solution: Backtracking.

3

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

4

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.

5

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

6

Exponential Thinning of Execution History Log

Per Stmt.Per 2Bb.

• For distant points, granularity of logs coarser.

• To jump within a Bb, rollback to start and then execute forward.

Per Bb.Per 4Bb.Per 8Bb.

7

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.

8

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.

9

Operations

• bstep n - step n

• prev n - next n

• bcontinue - continue

• before - finish

• until <cond.> - buntil <cond.>

• undo

• prove <condition>

10

Comparisons

X X X XXXXX

O OOO

• Boothe

• History

• Checkpoints

11

Comparisons (contd.)

• + Less checkpointing interval.

• + Option to move forward or backward.

• - History logs

12

Conclusion

• Bidirectional Debugger.

• Hybrid approach involving– execution history logs– checkpoints

• Potential to analyze programs using stored program state.

13

And that will be…...

• A million dollars please…………

•Questions ???

Recommended