3.5.12 How Do I Know What Code the Compiler Is Producing?

The assembly list file (see 6.3 Assembly List Files) shows the assembly output for almost the entire program, including library routines linked in to your program, as well a large amount of the runtime startup code (see 5.10.2 Runtime Startup Code). If you are using the command-line, the option -Wa,-a will produce this file for you (see 4.6.10 Mapped Assembler Options). The assembly list file will have a .lst extension.

The list file shows assembly instructions, some assembly directives and information about the program, such as the call graph, pointer reference graph and information for every function. Not all assembly directives are shown in the list file if the assembly optimizers are enabled (they are produced in the intermediate assembly file). Temporarily disable the assembly optimizers (see 4.6.6 Options for Controlling Optimization), if you wish to see all the assembly directives produced by the compiler.