Back
Igor’s tip of the week #82: Decompiler options: pseudocode formatting

The default output of the Hex-Rays decompiler tries to strike a balance between conciseness and readability. However, everyone has different preferences so it offers a few options to control the layout and formatting of the pseudocode.
Because of its origins as a third-party plugin for IDA, the decompiler options are accessible not through IDA’s Options menu, but via Edit > Plugins > Hex-Rays Decompiler, Options button
Formatting options are available on the main page of the options dialog.
if
statements or for
/do
/while
loop bodies.if
statements, extra variables for intermediate results, or even additionalgoto
statements.if
condition:if
and goto
statements:When changing the settings from inside IDA using the UI described above, they apply only to the current database. To change the defaults for all new databases, either edit cfg/hexrays.cfg
in IDA’s install directory, or create one in the user directory with the options you want to override.
Extra empty lines can be added to the pseudocode to improve readability. This feature was described in the tip #43 (Annotating the decompiler output).
Stay up to date with the newest blog posts