Build and debugging

The compiler options the course uses, the listing file the compiler can write, and the warning groups that turn a warning into a failure. A Makefile builds several programs and skips the work already done. The part ends on a checked debug build, a run under the debugger in batch mode, and the trace a run prints.

13.1 cobc options -x, -m, -c, -O and -O2, -std=, -fsyntax-only, and the options this course uses Open 13.2 The -t listing a listing file, the C that cobc writes, and the line number a diagnostic points at Open 13.3 Warning groups with -W -W, -Wall and -Werror, the groups 3.2 knows, and a warning turned into a failure Open 13.4 A Makefile for several programs two programs and a module, make, and a rebuild that skips the work already done Open 13.5 Debug and runtime checks -debug, a subscript out of range, the message a checked run prints, and the cost Open 13.6 cobcrun and gdb cobcrun, a module built with -m, gdb in batch mode, and a breakpoint on a paragraph Open 13.7 COB_SET_TRACE and -ftrace -ftrace, COB_SET_TRACE=1, the trace a run prints, and the paragraph names in it Open

Lessons