CS270 Colorado State University ===================== Debugging ===================== --------------------- Where do bugs come from? --------------------- 9 Rules of Debugging From "Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems" by David Agans 1. Understand the System 2. Make it Fail 3. Quit Thinking and Look 4. Divide and Conquer 5. Change One Thing at a Time 6. Keep an Audit Trail 7. Check the Plug 8. Get a Fresh View 9. If You Didn't Fix it, it Ain't Fixed -------------------- The Debugging Process 1) 2) 3) 4) 5) -------------------- Debugging Activity -------------------- Types of bugs Syntax Error Runtime Error Logical Error --------------------- Debuggers How do they relate to the debugging process? ---- gdb Debugging runtime errors with gdb Debugging logical errors with gdb What to do once the error is isolated ---- C-- Debugging C-- code ---- MIPS Debugging runtime errors with MIPS Debugging logical errors with MIPS ---- LC3 Debugging runtime errors in LC3 Debugging logical errors in LC3 ------------------------------------------- Last modified Nov 18 2008 by Weston Pace