Debugging, quality and modern C

This part of the C course is how a program is checked: a debugger, the compiler flags that catch a bug before the program runs, a tiny test harness, a profiler and a build pipeline. It ends with the C23 features that the current GCC compiles on by default.

11.1 Debugging with gdb breakpoints, stepping, backtraces, inspecting variables Open 11.2 Compiler flags and optimisation warnings, -O levels, -fanalyzer, debug info Open 11.3 Testing C code assertions, a tiny test harness, table-driven tests Open 11.4 Profiling clock_gettime timing, gprof, hot loops Open 11.5 Build automation and CI make check, shell scripts, a CI pipeline Open 11.6 C23 features typeof, constexpr, auto, nullptr, attributes, digit separators Open

Lessons