Use the Mixed code format of the source view to display the source code line and its associated disassembly code. This format enables you to understand how disassembly code lines relate to the source code lines.
There are three different Mixed formats, according to what type of code drives the mixed display:
The disassembly code is in order and the relevant source code line appears before the disassembly code lines. This view shows the disassembly lines according to the order of their execution.
Advantage: Shows the disassembly code as it appears in the binary file.
Disadvantage: Not easy to follow the flow of the source code.
The source code is in order and the relevant disassembly code lines appear under each source code line. This view shows the assembly lines that are generated from each source line.
Advantage: Use this to locate the disassembly code lines related to your source lines.
Disadvantage: The code shown does not appear in the actual execution order. The compiler optimization changes the order.
Both the source and the disassembly code appear in their order. In this format, in order to keep the numeric order of the code lines, some disassembly code lines may appear under an unrelated source code line. You can check the source code line in the Line Number column.
Advantage: Can often provide the advantages of both the other methods.
Disadvantage: May generate chunks of disassembly code that are misplaced from their original code, due to compiler reassignment.
Right-click the source pane and select the desired mix format.
The format you choose will be the default format, next time you choose Mixed format.
This code example enables showing the different mixed views and how they are presented.
The views show the resulting mixed format views using the different options. See the RVA and the Line Number on the left columns.
The basic code:
float divd_rout( float par1, float par2)
{
int i;
float ret_value;
for (i=0;i<10;i++)
ret_value = par1/par2;
return ret_value;
}
View using Mixed by Combination:
View using Mixed by Source:
View using Mixed by Execution:
You can set the visualization of the source view, right-click the source and select Mixed Mode:
Simple Visualization Mode. This mode shows all the code, source and disassembly.
Extended Visualization
Mode. This mode shows the leading code with a icon wherever there is hidden disassembly code.
Click the icon to view the disassembly. Click the
icon to hide the disassembly.
Bookmarks are not available for Mixed Extended Visualization Mode.