


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



¾ ColdFire interrupts ¾ System design ¾ Prioritized interrupts ¾ Interrupt latency ¾ Race conditions ¾ Reentrancy ¾ Interrupt overload ¾ Missed interrupts ¾ Spurious interrupts
¾ Talked about tools a few weeks ago
¾ Definitions ¾ Good debugging techniques ¾ Ways to avoid debugging
¾ The most difficult bugs that you’ll run into will cannot be found casually
**1. Finding the bug that causes a symptom – hard!
¾ Complication: The time at which events occur must be considered part of the input
¾ Nondeterministic systems are much harder to debug ¾ Sometimes non-deterministic systems can be turned into deterministic ones ¾ Simulators are generally deterministic
¾ You will need to stare at the code very hard ¾ Or throw it all away and start over
¾ Accidentally running an old version of the software ¾ Environment variable (e.g. PATH) is hosed ¾ Buggy Makefile resulted in a file not being recompiled ¾ Software upgrade added a DLL that is buggy ¾ File not created since disk is full or you’re over quota ¾ File unavailable due to network glitch
¾ Rebuild entire application ¾ Reboot or switch to a different machine ¾ Etc.
Pin down system inputs and as many other variables as possible Buggy behavior must be repeatable (not necessarily deterministic)
Get rid of as much extraneous hardware and software as possible while still retaining the buggy behavior
Make educated guesses about causes that might explain the observed behavior Initial hypothesis is often pretty vague – this is ok Write down the hypothesis Rank possibilities in order of likelihood
¾ Preconditions – must be true for code to run successfully ¾ Postconditions – must be true after code runs ¾ Invariants – must be true at all times (except while data structure is being manipulated)
¾ Compiler support for these would be nice
¾ Failed assert == bug
¾ A way to run the program and automatically determine if a bug was encountered ¾ A deterministic system
**1. Run the program on input that makes the bug happen
¾ Scientific debugging ¾ Incremental development ¾ Defensive programming
¾ First impulse is to start hacking ¾ Rather, stop and think
¾ But the skill is learned, not hereditary