We present a new approach combining dynamic slicing with path conditions in dependence graphs enhanced by dynamic information collected in a program trace. While dynamic slicing can only tell you that certain dependences have been holding during program execution, the combination with dynamic path conditions tells you why, as well.
The approach described here has been implemented for full ANSI-C. It uses the static dependence graph to produce a fine-grained variable and dependence trace of an executing program. This information can be exploited for dynamic slicing, yielding significantly smaller sets of statements than static slices, as well as for increasing precision of the path condition between two statements. Such a dynamic path condition contains explicit information about if and how one statement influenced the other. Dynamic path conditions work even when tracing information is incomplete or corrupted e.g. in case of a "damaged flight recorder".