Reverse Engineering for Beginners (CH1.1 Code Patterns)
The Method
The author began by explaining that when he first started learning C and C++, he used a website called Godbolt to view the small pieces of code he wrote and see the Assembly that the Compiler generated. This site helped him a lot in understanding how the compilation process works.
Optimization levels and debug information
The author then explained that the code a programmer writes can be compiled using different Compilers, and each one can apply a different level of optimization to make the resulting code run faster.
He mentioned that there are about three optimization levels. The first one — often referred to as level 0 — means that no optimization is performed. This is typically used by a compiler in Debug mode, where the code is compiled exactly as written, without any performance adjustments. This level is especially useful when a programmer wants to perform debugging and trace the code step by step.