Skip to content

Disassembly Debugging

Haneef Mohammed edited this page Jan 5, 2022 · 14 revisions

This is an experimental feature for both Cortex-Debug and VSCode but is functional to the extent of what is released

While in a debug session and in a paused state, you can invoke the disassembler and view the disassembly for that source code. This Disassembly view is provided by Microsoft/VSCode and I would still consider it a work in progress but it has been functional thus far. Cortex-Debug provides the backend and VSCode provides the window/menus that you interact with. Here are the features thus far

  • Trigger Disassembly either from the editor or in the CALL STACK window by right-clicking
    • It can disassemble an entire executable but it will only do it based on how far you scroll. It is more like on-demand disassembly.
    • As of this writing, the source is being embedded into the assembly but source lines are repeated when there are multiple instructions for the same line. You can toggle 'Source code' embedding from the Command Palette. Hint: Create a keyboard shortcut
  • You can arrange your windows such that the disassembly and source code windows are side by side
  • You can single step in either of the windows. If the focus is in the disassembly window, it will do a step/next at an instruction level
  • You can set breakpoints at any instruction just like you do for source files (in the gutter area). The UI to set conditions and hit counts are not yet enabled although our backend supports conditions