Lecture 18: May 15, 2023

Reading: zyBooks text, §2.21, 5.8, 10.4
Assignments: Homework 3 and Extra Credit 3, due May 25

  1. Announcements
    1. We haven’t graded the midterms yet

  2. Static debugging
    1. How to narrow down where the problem is using printf [sample1.c, sample2.c]
    2. Handle multiple bugs [sample3.c]

  3. Dynamic debugging with gdb [sample1.c, sample2.c, sample3.c, nfact2.c]
    1. Bringing a program into gdb
    2. Breakpoints, conditions, commands
    3. Stepping through it
    4. Printing values
    5. Watchpoints

UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: mabishop@ucdavis.edu
ECS 36A, Programming & Problem Solving
Version of May 22, 2023 at 11:47AM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh