Viewing disassembled code

A disassembler translates machine language into assembly language for human-readability.

The Disassembler view displays disassembled code for the current function. It is useful for low-level commands for checking single instructions, such as Step Into and Step Over.

Disassembler view

By default, GDB shows AT&T style disassembly. To switch to the Intel style, go to Preferences > Debugger > GDB > Use Intel style disassembly.

When you operate by instruction, Qt Creator shows the source code in a split next to the Disassembler view, and both follow the current debugger location. Move the cursor or the mouse pointer to an instruction to highlight the source line it was compiled from, or to a source line to highlight its instructions. To show only the disassembly, go to Preferences > Debugger > General and clear Show source code beside disassembly.

To open the Disassembler view:

  • Go to Debug > Operate by Instruction while the debugger is running.
  • Select Operate by Instruction (Operate by Instruction) on the debugger toolbar.
  • In the Registers view, select a value, and then select Open Disassembler at <value> in the context menu.

Starting disassembler

To start a disassembler from the Registers view, select Open Disassembler and set the disassembler address:

Select Start Address dialog

See also How to: Debug, Debugging, and Debuggers.