Thinking in C and *nix (CSC 295/282 2014S) : Outlines

Outline 06: Using Macros for Logging


Held: Thursday, 27 February 2014

Back to Outline 05 - Compilation, Macros, and the C Preprocessor. On to Outline 07 - Learning Vi (Optional).

Summary

We consider how C macros might allow us to write a system that helps us do better print-style debugger.

Related Pages

Overview

Administrivia

Cool uses of Macros and/or CPP

Requirements for a Simple "Debug by Printing" Environment

Messages that are easy to enable/disable

Print the values of expressions, along with the expression

Print each statement as we execute it

Generalized optional output (like printf)

Show nesting through indentation?

Copyright (c) 2013-14 Samuel A. Rebelsky.

Creative Commons License

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.