Show: Object Pascal C++
Display Preferences

Disassembly Pane

From Appmethod Topics
Jump to: navigation, search

Go Up to CPU Windows Index


View > Debug Windows > CPU Windows > Disassembly

Displays the address, the hexadecimal representation of the machine code instructions (opcodes), and the assembly instructions for each line of source code. The address is the offset into the disassembled method. The Disassembly pane is located at the upper left side of the product window when the Entire CPU view is displayed (View > Debug Windows > CPU Windows > Entire CPU).

If debug information is available, the debugger displays the source code that corresponds to the assembly instructions.

A right arrow (Execution point) to the left of an address indicates the current execution point.

When the current instruction is a transfer instruction (for example, call or jmp), either an up or down arrow after the instruction indicates the target direction for the transfer instruction. For example, if the target is located before the current instruction, an up arrow is displayed. If the target is after the current instruction, a down arrow is displayed.

For conditional transfer instructions (for example, jz or jle), an arrow is displayed only if the condition is true. For conditional set instructions (for example, seta or setz), a left arrow is displayed if the condition is true.

Scrolling the Disassembly Pane

Use any of the following methods to scroll the Disassembly pane:

  • Press CTRL+LEFT-ARROW and CTRL+RIGHT-ARROW to shift the starting point of the display up or down one byte. Changing the starting point of the display changes where the debugger begins disassembling the machine code.
  • Click above or below the vertical scrollbar to scroll up or down a screen. (Due to the high volume of information available for display in the Disassembly pane, dragging the scrollbar is disabled.)
  • Use the Goto Address, Goto Current EIP, Follow, and Previous context menu commands, as described in the following table.


Context Menu

Item Description

Enabled

Available only when right-clicking a breakpoint. Toggles the breakpoint between enabled and disabled.

Breakpoint Properties

Available only when right-clicking a breakpoint. Displays the Address Breakpoint Properties dialog box.

Run to Current

Runs your program at full speed to the instruction that you have selected in the CPU window. After your program is paused, you can use this command to resume debugging at a specific program instruction.

Toggle Breakpoint

Sets or removes a breakpoint at the currently selected address.

Goto Address

Displays the Enter Address to Position dialog box where you can enter a symbol or, for managed code, an address in just in time (JIT) compiler format.

Goto Current EIP

Positions the CPU window to the location of the current program counter (the location indicated by the EIP register). This location indicates the next instruction to be executed by your program.

Follow

Positions the pane at the destination address of the selected instruction.

Use the Follow command in conjunction with instructions that cause a transfer of control (such as CALL, JMP, and INT) and with conditional jump instructions (such as JZ, JNE, LOOP, and so forth). For conditional jumps, the address is shown as if the jump condition is true. Use the Previous command to return to the origin of the jump.

Caller

Positions the Disassembly pane to the instruction past the one that called the current interrupt or subroutine. If the current interrupt routine has pushed data items onto the stack, the debugger might not be able to determine where the routine was called from.
Caller works best when you turn on Stack frames option under Code Generation on the Project > Options > Compiling dialog box (Object Pascal) or turn on Standard stack frames on the Project > Options > C++ Compiler (C++).

Previous

Restores the CPU window to the display it had before the last Follow command.

Search

Displays the Enter Search Bytes dialog box where you can search forward in the CPU window for an expression or byte list (click Help on the Enter Search Bytes dialog box for details).

View Source

Activates the Code Editor and positions the insertion point at the source code line that most closely corresponds to the disassembled instruction selected in the CPU window. If there is no corresponding source code, this command has no effect.

Mixed Source

Toggles the display between assembly instructions only and assembly instructions and their corresponding source code (if debug information is available).

Mixed IL Code

When debugging managed code, toggles the display to include MSIL instructions.

Show Addresses

Includes instruction addresses.

Show Opcodes

Includes instruction opcodes. Choices are Auto, Always, and Never. The default value is Auto, which displays opcodes whenever the window is wide enough to contain the opcode column.

New EIP

Changes the location of the instruction pointer (the value of EIP register) to the line currently highlighted in the Disassembly pane. Use this command when you want to skip certain machine instructions. When you resume program execution, execution starts at this address. This command is not the same as stepping through instructions; the debugger does not execute any instructions that you might skip.

Caution: Use this command with extreme care; when you skip over program instructions, it is easy to place your system in an unstable state. The stack frame and registers might not be accurate for the current program location.

Copy

Copies all selected instructions to the clipboard. From the disassembly pane, you can select a single instruction or you can use the SHIFT key to select multiple instructions. In all other panes, you can only select a single item to copy.

View FPU

Displays the FPU view, which displays the floating-point registers, MMX registers, and SSE registers.

See Also

Personal tools
In other languages