Disassembly view for nvim-dap
Install like any other Neovim plugin:
git clone https://github.com/Jorenar/nvim-dap-disasm.git ~/.config/nvim/pack/plugins/start/nvim-dap-disasm- or with vim-plug:
Plug 'Jorenar/nvim-dap-disasm' - or with packer.nvim:
use 'Jorenar/nvim-dap-disasm' - or any other plugin manager.
- nvim-dap
- nvim-dap-ui (optional)
- nvim-dap-view (optional)
require("nvim-dap-disasm").setup({ -- Add disassembly view to elements of nvim-dap-ui dapui_register = true, -- Add disassembly view to nvim-dap-view dapview_register = true, -- Add custom REPL commands for stepping with instruction granularity repl_commands = true, -- Show winbar with buttons to step into the code with instruction granularity -- This settings is overriden (disabled) if the dapview integration is enabled and the plugin is installed winbar = true, -- The sign to use for instruction the exectution is stopped at sign = "DapStopped", -- Number of instructions to show before the memory reference ins_before_memref = 16, -- Number of instructions to show after the memory reference ins_after_memref = 16, -- Labels of buttons in winbar controls = { step_into = "Step Into", step_over = "Step Over", step_back = "Step Back", }, -- Columns to display in the disassembly view columns = { "address", "instructionBytes", "instruction", }, })If you are using nvim-dap-ui, you can add it to its layouts, e.g.:
require("nvim-dap-ui").setup({ layouts = { { elements = { { id = "disassembly" } }, position = "bottom", size = 0.15, }, } })If you are using nvim-dap-view, you can add it as a section, e.g.:
require("dap-view").setup({ winbar = { sections = { "disassembly", -- ... }, } })To use the disassembly view, start a debugging session with nvim-dap and open the disassembly view using :DapDisasm command. The disassembly view will display the instructions at the current execution point.
- The initial code was pulled from Jorenar/dotfiles
- Highly inspired by vimspector, and prototype for nvim-dap-ui by @ColinKennedy