6. Compile-Time Techniques

The transformation of the source code into bytes that will be executed by the CPU or an abstract virtual machine, such as the JVM, offers you ample opportunities to see what’s going on and affect the outcome. Both activities can help you zoom in on the fault you’re trying to locate.

Item 50: Examine Generated Code

Code often gets compiled through a series of transformations from one form to another until it finally reaches the form of the processor’s instructions. For example, a C or C++ file may first get preprocessed, then compiled into assembly language, which is then assembled into an object file; Java programs are compiled into JVM instructions; lexical and parser generation tools, such as lex, flex, yacc, and ...

Get Effective Debugging: 66 Specific Ways to Debug Software and Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.