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)
require("nvim-dap-disasm").setup({
-- Add disassembly view to elements of nvim-dap-ui
dapui_register = true,
-- Add custom REPL commands for stepping with instruction granularity
repl_commands = 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 =
6709
span> {
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,
},
}
})
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